Gnash
0.8.10
|
The base class for reading image data. More...
#include <GnashImage.h>
Public Member Functions | |
Input (boost::shared_ptr< IOChannel > in) | |
Construct an Input object to read from an IOChannel. | |
virtual | ~Input () |
virtual void | read ()=0 |
Begin processing the image data. | |
virtual size_t | getHeight () const =0 |
Get the image's height in pixels. | |
virtual size_t | getWidth () const =0 |
Get the image's width in pixels. | |
virtual size_t | getComponents () const =0 |
Get number of components (channels) | |
virtual void | readScanline (unsigned char *rgbData)=0 |
Read a scanline's worth of image data into the given buffer. | |
ImageType | imageType () |
Get the ImageType of the image. | |
Static Public Member Functions | |
static DSOEXPORT std::auto_ptr < ImageRGBA > | readSWFJpeg3 (boost::shared_ptr< gnash::IOChannel > in) |
For reading SWF JPEG3-style image data, like ordinary JPEG, but stores the data in ImageRGBA format. | |
static DSOEXPORT std::auto_ptr < GnashImage > | readImageData (boost::shared_ptr< gnash::IOChannel > in, FileType type) |
Read image data from an IOChannel into an GnashImage. | |
Protected Attributes | |
boost::shared_ptr< IOChannel > | _inStream |
ImageType | _type |
The base class for reading image data.
gnash::image::Input::Input | ( | boost::shared_ptr< IOChannel > | in | ) | [inline] |
virtual gnash::image::Input::~Input | ( | ) | [inline, virtual] |
virtual size_t gnash::image::Input::getComponents | ( | ) | const [pure virtual] |
Get number of components (channels)
Implemented in gnash::image::JpegInput.
virtual size_t gnash::image::Input::getHeight | ( | ) | const [pure virtual] |
Get the image's height in pixels.
Implemented in gnash::image::JpegInput.
virtual size_t gnash::image::Input::getWidth | ( | ) | const [pure virtual] |
Get the image's width in pixels.
Implemented in gnash::image::JpegInput.
ImageType gnash::image::Input::imageType | ( | ) | [inline] |
virtual void gnash::image::Input::read | ( | ) | [pure virtual] |
Begin processing the image data.
Implemented in gnash::image::JpegInput.
std::auto_ptr< GnashImage > gnash::image::Input::readImageData | ( | boost::shared_ptr< gnash::IOChannel > | in, |
FileType | type | ||
) | [static] |
Read image data from an IOChannel into an GnashImage.
in | The IOChannel to read the image from. |
type | The type of image to read. |
References gnash::GNASH_FILETYPE_PNG, gnash::image::createPngInput(), gnash::GNASH_FILETYPE_GIF, gnash::image::createGifInput(), gnash::GNASH_FILETYPE_JPEG, gnash::image::JpegInput::create(), height, width, gnash::image::TYPE_RGB, gnash::image::TYPE_RGBA, _, gnash::key::e, gnash::key::i, and gnash::image::scanline().
virtual void gnash::image::Input::readScanline | ( | unsigned char * | rgbData | ) | [pure virtual] |
Read a scanline's worth of image data into the given buffer.
rgbData | The buffer for writing raw RGB data to. |
Implemented in gnash::image::JpegInput.
std::auto_ptr< ImageRGBA > gnash::image::Input::readSWFJpeg3 | ( | boost::shared_ptr< gnash::IOChannel > | in | ) | [static] |
For reading SWF JPEG3-style image data, like ordinary JPEG, but stores the data in ImageRGBA format.
References gnash::image::JpegInput::createSWFJpeg2HeaderOnly(), assert, height, width, y, data, gnash::image::scanline(), and x.
boost::shared_ptr<IOChannel> gnash::image::Input::_inStream [protected] |
ImageType gnash::image::Input::_type [protected] |
Referenced by imageType(), and gnash::image::JpegInput::read().