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

#include <png.h>

Inheritance diagram for Image::PNGDecoder:
Collaboration diagram for Image::PNGDecoder:

List of all members.

Public Member Functions

 PNGDecoder ()
 ~PNGDecoder ()
bool loadStream (Common::SeekableReadStream &stream)
 Load an image from the specified stream.
void destroy ()
 Destroy this decoder's surface and palette.
const Graphics::SurfacegetSurface () const
 Get the decoded surface.
const bytegetPalette () const
 Get the decoded palette.
uint16 getPaletteColorCount () const
 Return the number of colors in the palette.
void setSkipSignature (bool skip)

Private Member Functions

Graphics::PixelFormat getByteOrderRgbaPixelFormat () const

Private Attributes

byte_palette
uint16 _paletteColorCount
bool _skipSignature
Graphics::Surface_outputSurface

Detailed Description

Definition at line 50 of file png.h.


Constructor & Destructor Documentation

Image::PNGDecoder::PNGDecoder (  ) 

Definition at line 42 of file png.cpp.

Image::PNGDecoder::~PNGDecoder (  ) 

Definition at line 49 of file png.cpp.


Member Function Documentation

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

Destroy this decoder's surface and palette.

This should be called by a loadStream() implementation as well as the destructor.

Implements Image::ImageDecoder.

Definition at line 53 of file png.cpp.

Graphics::PixelFormat Image::PNGDecoder::getByteOrderRgbaPixelFormat (  )  const [private]

Definition at line 63 of file png.cpp.

const byte* Image::PNGDecoder::getPalette (  )  const [inline, virtual]

Get the decoded palette.

This palette is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

The palette's format is the same as PaletteManager's palette (interleaved RGB values).

Returns:
the decoded palette, or undefined if no palette is present

Reimplemented from Image::ImageDecoder.

Definition at line 58 of file png.h.

uint16 Image::PNGDecoder::getPaletteColorCount (  )  const [inline, virtual]

Return the number of colors in the palette.

Reimplemented from Image::ImageDecoder.

Definition at line 59 of file png.h.

const Graphics::Surface* Image::PNGDecoder::getSurface (  )  const [inline, virtual]

Get the decoded surface.

This surface is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

Returns:
the decoded surface, or 0 if no surface is present

Implements Image::ImageDecoder.

Definition at line 57 of file png.h.

bool Image::PNGDecoder::loadStream ( Common::SeekableReadStream stream  )  [virtual]

Load an image from the specified stream.

loadStream() should implicitly call destroy() to free the memory of the last loadStream() call.

Parameters:
stream the input stream
Returns:
whether loading the file succeeded
See also:
getSurface
getPalette

Implements Image::ImageDecoder.

Definition at line 110 of file png.cpp.

void Image::PNGDecoder::setSkipSignature ( bool  skip  )  [inline]

Definition at line 60 of file png.h.


Member Data Documentation

Definition at line 71 of file png.h.

Definition at line 65 of file png.h.

Definition at line 66 of file png.h.

Definition at line 69 of file png.h.


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


Generated on Sat Sep 14 2019 05:04:41 for ResidualVM by doxygen 1.7.1
curved edge   curved edge