ScummVM API documentation
Image::ImageDecoder Class Referenceabstract

#include <image_decoder.h>

Inheritance diagram for Image::ImageDecoder:
Director::BITDDecoder Director::DIBDecoder Image::BitmapDecoder Image::Cel3DODecoder Image::GIFDecoder Image::HLZFileDecoder Image::HNMFileDecoder Image::IFFDecoder Image::JPEGDecoder Image::NeoDecoder Image::PCXDecoder Image::PICTDecoder Image::PNGDecoder Image::ScrDecoder Image::TGADecoder Image::XBMDecoder MM::MM1::Gfx::ScreenDecoder Prince::MhwanhDecoder Sludge::HSIDecoder Supernova::MSNImage Ultima::Ultima4::U4ImageDecoder

Public Member Functions

virtual bool loadStream (Common::SeekableReadStream &stream)=0
 
virtual void destroy ()=0
 
virtual const Graphics::SurfacegetSurface () const =0
 
virtual const byte * getPalette () const
 
virtual bool hasPalette () const
 
virtual uint16 getPaletteColorCount () const
 
virtual bool hasTransparentColor () const
 
virtual uint32 getTransparentColor () const
 

Detailed Description

A representation of an image decoder that maintains ownership of the surface and palette it decodes to.

This is designed for still frames only.

Member Function Documentation

◆ loadStream()

◆ destroy()

◆ getSurface()

virtual const Graphics::Surface* Image::ImageDecoder::getSurface ( ) const
pure virtual

◆ getPalette()

virtual const byte* Image::ImageDecoder::getPalette ( ) const
inlinevirtual

Get the decoded palette.

This palette is owned by this ImageDecoder and remains valid until destroy() or loadStream() is called, or until the destructor of this ImageDecoder is called.

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

Returns
The decoded palette, or undefined if no palette is present.

Reimplemented in Image::IFFDecoder, Image::BitmapDecoder, Director::BITDDecoder, Image::TGADecoder, Image::PICTDecoder, Image::PNGDecoder, Image::Cel3DODecoder, Image::PCXDecoder, Image::GIFDecoder, Image::NeoDecoder, MM::MM1::Gfx::ScreenDecoder, Director::DIBDecoder, Image::HLZFileDecoder, Image::XBMDecoder, Supernova::MSNImage, Ultima::Ultima4::U4ImageDecoder, and Prince::MhwanhDecoder.

◆ hasPalette()

virtual bool Image::ImageDecoder::hasPalette ( ) const
inlinevirtual

Query whether the decoded image has a palette.

◆ getPaletteColorCount()

◆ hasTransparentColor()

virtual bool Image::ImageDecoder::hasTransparentColor ( ) const
inlinevirtual

Query whether the decoded image has a transparent color.

Reimplemented in Image::PNGDecoder, and Image::GIFDecoder.

◆ getTransparentColor()

virtual uint32 Image::ImageDecoder::getTransparentColor ( ) const
inlinevirtual

Return the transparent color.

Reimplemented in Image::PNGDecoder, and Image::GIFDecoder.


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