Public Member Functions | Static Public Member Functions

gnash::image::PngInput Class Reference

#include <GnashImagePng.h>

Inheritance diagram for gnash::image::PngInput:
Inheritance graph
[legend]
Collaboration diagram for gnash::image::PngInput:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PngInput (boost::shared_ptr< IOChannel > in)
 Construct a PngInput object to read from an IOChannel.
 ~PngInput ()
void read ()
 Begin processing the image data.
size_t getHeight () const
 Get the image's height in pixels.
size_t getWidth () const
 Get the image's width in pixels.
void readScanline (unsigned char *imageData)
 Read a scanline's worth of image data into the given buffer.

Static Public Member Functions

static DSOEXPORT std::auto_ptr
< Input
create (boost::shared_ptr< IOChannel > in)
 Create a PngInput and transfer ownership to the caller.

Constructor & Destructor Documentation

gnash::image::PngInput::PngInput ( boost::shared_ptr< IOChannel in  ) 

Construct a PngInput object to read from an IOChannel.

Parameters:
in The stream to read PNG data from. Ownership is shared between caller and JpegInput, so it is freed automatically when the last owner is destroyed.

Referenced by create().

gnash::image::PngInput::~PngInput (  ) 

Member Function Documentation

static DSOEXPORT std::auto_ptr<Input> gnash::image::PngInput::create ( boost::shared_ptr< IOChannel in  )  [inline, static]

Create a PngInput and transfer ownership to the caller.

Parameters:
in The IOChannel to read PNG data from.

References PngInput().

size_t gnash::image::PngInput::getHeight (  )  const [virtual]

Get the image's height in pixels.

Returns:
The height of the image in pixels.

Implements gnash::image::Input.

size_t gnash::image::PngInput::getWidth (  )  const [virtual]

Get the image's width in pixels.

Returns:
The width of the image in pixels.

Implements gnash::image::Input.

void gnash::image::PngInput::read (  )  [virtual]

Begin processing the image data.

Implements gnash::image::Input.

void gnash::image::PngInput::readScanline ( unsigned char *  imageData  )  [virtual]

Read a scanline's worth of image data into the given buffer.

The amount of data read is getWidth() * getComponents().

Parameters:
rgbData The buffer for writing raw RGB data to.

Implements gnash::image::Input.


The documentation for this class was generated from the following files: