Gnash  0.8.10
Public Member Functions | Static Public Member Functions
gnash::image::JpegOutput Class Reference

#include <GnashImageJpeg.h>

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

List of all members.

Public Member Functions

 JpegOutput (boost::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
 Constract a JpegOutput for writing to an IOChannel.
 ~JpegOutput ()
virtual void writeImageRGB (const unsigned char *rgbData)
 Write RGB image data using the parameters supplied at construction.
virtual void writeImageRGBA (const unsigned char *rgbaData)
 Write RGBA image data using the parameters supplied at construction.

Static Public Member Functions

static std::auto_ptr< Outputcreate (boost::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
 Create a JpegOutput, transferring ownership to the caller.

Constructor & Destructor Documentation

gnash::image::JpegOutput::JpegOutput ( boost::shared_ptr< IOChannel out,
size_t  width,
size_t  height,
int  quality 
)

Constract a JpegOutput for writing to an IOChannel.

Parameters:
outThe gnash::IOChannel to write the image to
widthThe width of the resulting image
heightThe height of the resulting image.
qualityThe quality of the created image, from 1-100.

References gnash::image::Output::_outStream, gnash::image::Output::_width, and gnash::image::Output::_height.

Referenced by create().

gnash::image::JpegOutput::~JpegOutput ( )

Member Function Documentation

std::auto_ptr< Output > gnash::image::JpegOutput::create ( boost::shared_ptr< IOChannel out,
size_t  width,
size_t  height,
int  quality 
) [static]

Create a JpegOutput, transferring ownership to the caller.

Parameters:
outThe gnash::IOChannel to write the image to
widthThe width of the resulting image
heightThe height of the resulting image.
qualityThe quality of the created image, from 1-100.

References JpegOutput().

Referenced by gnash::image::Output::writeImageData().

void gnash::image::JpegOutput::writeImageRGB ( const unsigned char *  rgbData) [virtual]

Write RGB image data using the parameters supplied at construction.

Parameters:
rgbDataThe raw RGB image data to write as a JPEG.

Implements gnash::image::Output.

References y, gnash::image::Output::_height, and gnash::image::Output::_width.

Referenced by writeImageRGBA().

void gnash::image::JpegOutput::writeImageRGBA ( const unsigned char *  rgbaData) [virtual]

Write RGBA image data using the parameters supplied at construction.

Note: transparency is ignored because JPEG doesn't support it!

Parameters:
rgbaDataThe raw RGBA image data to write as a JPEG.

Reimplemented from gnash::image::Output.

References gnash::image::Output::_width, gnash::image::Output::_height, data, and writeImageRGB().


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