Gnash  0.8.11dev
Public Member Functions | Static Public Member Functions | List of all members
gnash::image::JpegOutput Class Reference

#include <GnashImageJpeg.h>

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

Public Member Functions

 JpegOutput (std::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
 Constract a JpegOutput for writing to an IOChannel. More...
 
 ~JpegOutput ()
 
virtual void writeImageRGB (const unsigned char *rgbData)
 Write RGB image data using the parameters supplied at construction. More...
 
virtual void writeImageRGBA (const unsigned char *rgbaData)
 Write RGBA image data using the parameters supplied at construction. More...
 
- Public Member Functions inherited from gnash::image::Output
 Output (std::shared_ptr< IOChannel > out, size_t width, size_t height)
 Construct an Output for writing to an IOChannel. More...
 
virtual ~Output ()
 

Static Public Member Functions

static std::unique_ptr< Outputcreate (std::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
 Create a JpegOutput, transferring ownership to the caller. More...
 
- Static Public Member Functions inherited from gnash::image::Output
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...
 

Additional Inherited Members

- Protected Attributes inherited from gnash::image::Output
const size_t _width
 
const size_t _height
 
std::shared_ptr< IOChannel_outStream
 

Constructor & Destructor Documentation

§ JpegOutput()

gnash::image::JpegOutput::JpegOutput ( std::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::_height, gnash::image::Output::_outStream, and gnash::image::Output::_width.

Referenced by create().

§ ~JpegOutput()

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

Member Function Documentation

§ create()

std::unique_ptr< Output > gnash::image::JpegOutput::create ( std::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().

§ writeImageRGB()

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 gnash::image::Output::_height, gnash::image::Output::_width, and y.

Referenced by writeImageRGBA().

§ 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::_height, gnash::image::Output::_width, data, and writeImageRGB().


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