ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <jpeg.h>

Inheritance diagram for Image::JPEGDecoder:
Collaboration diagram for Image::JPEGDecoder:

List of all members.

Public Types

enum  ColorSpace { kColorSpaceRGB, kColorSpaceYUV }

Public Member Functions

 JPEGDecoder ()
 ~JPEGDecoder ()
virtual void destroy ()
virtual bool loadStream (Common::SeekableReadStream &str)
virtual const Graphics::SurfacegetSurface () const
const Graphics::SurfacedecodeFrame (Common::SeekableReadStream &stream)
 Decode the frame for the given data and return a pointer to a surface containing the decoded frame.
Graphics::PixelFormat getPixelFormat () const
 Get the format that the surface returned from decodeImage() will be in.
void setOutputColorSpace (ColorSpace outSpace)
 Request the output color space.
void setOutputPixelFormat (const Graphics::PixelFormat &format)
 Request the output pixel format.

Private Member Functions

Graphics::PixelFormat getByteOrderRgbPixelFormat () const

Private Attributes

Graphics::Surface _surface
ColorSpace _colorSpace
Graphics::PixelFormat _requestedPixelFormat

Detailed Description

Definition at line 46 of file jpeg.h.

Member Enumeration Documentation


Output RGB data in the pixel format specified using `setOutputPixelFormat`.

This is the default output.


Output (interleaved) YUV data.

Be aware that some images cannot be output in YUV mode. These are (non-standard) JPEG images which are in RGB colorspace.

The resulting Surface will have a PixelFormat with 3 bytes per pixel and the remaining entries are completely zeroed. This works around the fact that PixelFormat can only describe RGB formats.

You should only use this when you are really aware of what you are doing!

Definition at line 61 of file jpeg.h.

Constructor & Destructor Documentation

Image::JPEGDecoder::JPEGDecoder (  ) 

Definition at line 48 of file jpeg.cpp.

Image::JPEGDecoder::~JPEGDecoder (  ) 

Definition at line 54 of file jpeg.cpp.

Member Function Documentation

const Graphics::Surface * Image::JPEGDecoder::decodeFrame ( Common::SeekableReadStream stream  )  [virtual]

Decode the frame for the given data and return a pointer to a surface containing the decoded frame.

a pointer to the decoded frame

Implements Image::Codec.

Definition at line 74 of file jpeg.cpp.

void Image::JPEGDecoder::destroy (  )  [virtual]

Definition at line 70 of file jpeg.cpp.

Graphics::PixelFormat Image::JPEGDecoder::getByteOrderRgbPixelFormat (  )  const [private]

Definition at line 58 of file jpeg.cpp.

Graphics::PixelFormat Image::JPEGDecoder::getPixelFormat (  )  const [virtual]

Get the format that the surface returned from decodeImage() will be in.

Implements Image::Codec.

Definition at line 81 of file jpeg.cpp.

const Graphics::Surface * Image::JPEGDecoder::getSurface (  )  const [virtual]

Definition at line 66 of file jpeg.cpp.

bool Image::JPEGDecoder::loadStream ( Common::SeekableReadStream str  )  [virtual]

Definition at line 231 of file jpeg.cpp.

void Image::JPEGDecoder::setOutputColorSpace ( ColorSpace  outSpace  )  [inline]

Request the output color space.

This can be used to obtain raw YUV data from the JPEG file. But this might not work for all files!

The decoder itself defaults to RGB.

outSpace The color space to output.

Definition at line 93 of file jpeg.h.

void Image::JPEGDecoder::setOutputPixelFormat ( const Graphics::PixelFormat format  )  [inline]

Request the output pixel format.

The JPEG decoder provides high performance color conversion routines for some pixel formats. This setting allows to use them and avoid costly subsequent color conversion.

Definition at line 100 of file jpeg.h.

Member Data Documentation

Definition at line 104 of file jpeg.h.

Definition at line 103 of file jpeg.h.

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

Generated on Sat May 18 2019 05:06:51 for ResidualVM by doxygen 1.7.1
curved edge   curved edge