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