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

Image::JPEGDecoder Class Reference

#include <jpeg.h>

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

List of all members.

Public Types

enum  ColorSpace { kColorSpaceRGBA, 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.

Private Attributes

Graphics::Surface _surface
ColorSpace _colorSpace

Detailed Description

Definition at line 46 of file jpeg.h.


Member Enumeration Documentation

Enumerator:
kColorSpaceRGBA 

Output 32bit RGBA data.

This is the default output.

kColorSpaceYUV 

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 47 of file jpeg.cpp.

Image::JPEGDecoder::~JPEGDecoder (  ) 

Definition at line 50 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.

Returns:
a pointer to the decoded frame

Implements Image::Codec.

Definition at line 62 of file jpeg.cpp.

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

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 69 of file jpeg.cpp.

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

Definition at line 54 of file jpeg.cpp.

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

Definition at line 177 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 RGBA.

Parameters:
outSpace The color space to output.

Definition at line 93 of file jpeg.h.


Member Data Documentation

Definition at line 97 of file jpeg.h.

Definition at line 96 of file jpeg.h.


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


Generated on Sat Mar 23 2019 05:08:24 for ResidualVM by doxygen 1.7.1
curved edge   curved edge