Gnash  0.8.11dev
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
gnash::image::Output Class Referenceabstract

#include <GnashImage.h>

Inheritance diagram for gnash::image::Output:
gnash::image::JpegOutput

Public Member Functions

 Output (std::shared_ptr< IOChannel > out, size_t width, size_t height)
 Construct an Output for writing to an IOChannel. More...
 
virtual ~Output ()
 
virtual void writeImageRGB (const unsigned char *rgbData)=0
 Write RGB image data using the parameters supplied at construction. More...
 
virtual void writeImageRGBA (const unsigned char *)
 Write RGBA image data using the parameters supplied at construction. More...
 

Static Public Member Functions

static DSOEXPORT void writeImageData (FileType type, std::shared_ptr< gnash::IOChannel > out, const GnashImage &image, int quality)
 Write the given image to the given IOChannel in a specified format. More...
 

Protected Attributes

const size_t _width
 
const size_t _height
 
std::shared_ptr< IOChannel_outStream
 

Constructor & Destructor Documentation

§ Output()

gnash::image::Output::Output ( std::shared_ptr< IOChannel out,
size_t  width,
size_t  height 
)
inline

Construct an Output for writing to an IOChannel.

Parameters
outThe gnash::IOChannel to write the image to. Ownership is shared.
widthThe width of the resulting image
heightThe height of the resulting image.

§ ~Output()

virtual gnash::image::Output::~Output ( )
inlinevirtual

Member Function Documentation

§ writeImageData()

void gnash::image::Output::writeImageData ( FileType  type,
std::shared_ptr< gnash::IOChannel out,
const GnashImage image,
int  quality 
)
static

Write the given image to the given IOChannel in a specified format.

Parameters
typeThe image format to write in (see GnashEnums.h)
outThe IOChannel to write to.
imageThe image to write.
qualityThe quality of the image output, from 0..100. Values outside this range will be clamped to the minimum or maxium value. The quality is not used for all formats.

References _, gnash::image::GnashImage::begin(), gnash::image::JpegOutput::create(), gnash::image::createPngOutput(), gnash::GNASH_FILETYPE_JPEG, gnash::GNASH_FILETYPE_PNG, gnash::image::GnashImage::height(), gnash::log_error(), gnash::image::GnashImage::type(), gnash::image::TYPE_RGB, gnash::image::TYPE_RGBA, and gnash::image::GnashImage::width().

§ writeImageRGB()

virtual void gnash::image::Output::writeImageRGB ( const unsigned char *  rgbData)
pure virtual

Write RGB image data using the parameters supplied at construction.

Parameters
rgbDataThe raw RGB image data to write as an image.

Implemented in gnash::image::JpegOutput.

§ writeImageRGBA()

virtual void gnash::image::Output::writeImageRGBA ( const unsigned char *  )
inlinevirtual

Write RGBA image data using the parameters supplied at construction.

Parameters
rgbaDataThe raw RGBA image data to write as an image.

Reimplemented in gnash::image::JpegOutput.

References _, DSOEXPORT, and gnash::log_error().

Member Data Documentation

§ _height

const size_t gnash::image::Output::_height
protected

§ _outStream

std::shared_ptr<IOChannel> gnash::image::Output::_outStream
protected

§ _width

const size_t gnash::image::Output::_width
protected

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