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

Image::BitmapDecoder Class Reference

#include <bmp.h>

Inheritance diagram for Image::BitmapDecoder:
Collaboration diagram for Image::BitmapDecoder:

List of all members.

Public Member Functions

 BitmapDecoder ()
virtual ~BitmapDecoder ()
void destroy ()
 Destroy this decoder's surface and palette.
virtual bool loadStream (Common::SeekableReadStream &stream)
 Load an image from the specified stream.
virtual 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.

Private Attributes

Codec_codec
const Graphics::Surface_surface
byte_palette
uint16 _paletteColorCount

Detailed Description

Definition at line 51 of file bmp.h.


Constructor & Destructor Documentation

Image::BitmapDecoder::BitmapDecoder (  ) 

Definition at line 34 of file bmp.cpp.

Image::BitmapDecoder::~BitmapDecoder (  )  [virtual]

Definition at line 41 of file bmp.cpp.


Member Function Documentation

void Image::BitmapDecoder::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 45 of file bmp.cpp.

const byte* Image::BitmapDecoder::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 60 of file bmp.h.

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

Return the number of colors in the palette.

Reimplemented from Image::ImageDecoder.

Definition at line 61 of file bmp.h.

virtual const Graphics::Surface* Image::BitmapDecoder::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 59 of file bmp.h.

bool Image::BitmapDecoder::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 57 of file bmp.cpp.


Member Data Documentation

Definition at line 64 of file bmp.h.

Definition at line 66 of file bmp.h.

Definition at line 67 of file bmp.h.

Definition at line 65 of file bmp.h.


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


Generated on Sat Aug 17 2019 05:03:09 for ResidualVM by doxygen 1.7.1
curved edge   curved edge