Gnash  0.8.10
Classes | Enumerations | Functions
gnash::image Namespace Reference

Image handling functions and classes. More...

Classes

class  GnashImage
 Base class for different types of bitmaps. More...
class  ImageRGB
 24-bit RGB bitmap More...
class  ImageRGBA
 32-bit RGBA bitmap More...
class  Input
 The base class for reading image data. More...
class  Output
class  JpegInput
 Class for reading JPEG image data. More...
class  JpegOutput
class  ARGB
 Adapt a pixel_iterator to use 32-bit values in ARGB byte order. More...
struct  pixel_iterator
 The pixel_iterator class is a pixel-level adaptor for a GnashImage. More...

Enumerations

enum  ImageType { GNASH_IMAGE_INVALID, TYPE_RGB, TYPE_RGBA }
 The types of images handled in Gnash. More...
enum  ImageLocation { GNASH_IMAGE_CPU = 1, GNASH_IMAGE_GPU }
 The locations of images handled in Gnash. More...

Functions

void mergeAlpha (ImageRGBA &im, GnashImage::const_iterator alphaData, const size_t bufferLength)
size_t numChannels (ImageType t)
GnashImage::iterator scanline (GnashImage &im, size_t row)
 Get a pointer to a given row of any image.
GnashImage::const_iterator scanline (const GnashImage &im, size_t row)
 Get a read-only pointer to a given row of any image.
std::auto_ptr< InputcreateGifInput (boost::shared_ptr< IOChannel > in)
 Create a GifInput and transfer ownership to the caller.
std::auto_ptr< InputcreatePngInput (boost::shared_ptr< IOChannel > in)
 Create a PngInput and transfer ownership to the caller.
std::auto_ptr< OutputcreatePngOutput (boost::shared_ptr< IOChannel > o, size_t width, size_t height, int quality)
template<typename T >
pixel_iterator< T > begin (GnashImage &im)
template<typename T >
pixel_iterator< T > end (GnashImage &im)

Detailed Description

Image handling functions and classes.


Enumeration Type Documentation

The locations of images handled in Gnash.

Enumerator:
GNASH_IMAGE_CPU 
GNASH_IMAGE_GPU 

The types of images handled in Gnash.

Enumerator:
GNASH_IMAGE_INVALID 
TYPE_RGB 
TYPE_RGBA 

Function Documentation

template<typename T >
pixel_iterator<T> gnash::image::begin ( GnashImage &  im)
std::auto_ptr< Input > gnash::image::createGifInput ( boost::shared_ptr< IOChannel >  in)

Create a GifInput and transfer ownership to the caller.

Parameters:
inThe IOChannel to read GIF data from.

Referenced by gnash::image::Input::readImageData().

std::auto_ptr< Input > gnash::image::createPngInput ( boost::shared_ptr< IOChannel >  in)

Create a PngInput and transfer ownership to the caller.

Parameters:
inThe IOChannel to read PNG data from.

Referenced by gnash::image::Input::readImageData().

std::auto_ptr< Output > gnash::image::createPngOutput ( boost::shared_ptr< IOChannel >  o,
size_t  width,
size_t  height,
int  quality 
)
template<typename T >
pixel_iterator<T> gnash::image::end ( GnashImage &  im)
DSOEXPORT void gnash::image::mergeAlpha ( ImageRGBA &  im,
GnashImage::const_iterator  alphaData,
const size_t  bufferLength 
)
size_t gnash::image::numChannels ( ImageType  t) [inline]

References TYPE_RGBA, and TYPE_RGB.

Referenced by gnash::image::GnashImage::channels().

GnashImage::iterator gnash::image::scanline ( GnashImage &  im,
size_t  row 
) [inline]

Get a pointer to a given row of any image.

Parameters:
rowThe index of the required row.
Returns:
A pointer to the first byte of the specified row.

References assert, gnash::image::GnashImage::height(), gnash::image::GnashImage::begin(), and gnash::image::GnashImage::stride().

Referenced by gnash::image::ImageRGBA::setPixel(), gnash::image::Input::readImageData(), gnash::image::Input::readSWFJpeg3(), and gnash::image::JpegInput::readSWFJpeg2WithTables().

GnashImage::const_iterator gnash::image::scanline ( const GnashImage &  im,
size_t  row 
) [inline]

Get a read-only pointer to a given row of any image.

Parameters:
yThe index of the required row.
Returns:
A read-only pointer to the first byte of the specified row.

References assert, gnash::image::GnashImage::height(), gnash::image::GnashImage::begin(), and gnash::image::GnashImage::stride().