#include <image_decoder.h>
Public Member Functions | |
virtual bool | loadStream (Common::SeekableReadStream &stream)=0 |
virtual void | destroy ()=0 |
virtual const Graphics::Surface * | getSurface () const =0 |
virtual const byte * | getPalette () const |
virtual bool | hasPalette () const |
virtual uint16 | getPaletteColorCount () const |
virtual bool | hasTransparentColor () const |
virtual uint32 | getTransparentColor () const |
A representation of an image decoder that maintains ownership of the surface and palette it decodes to.
This is designed for still frames only.
|
pure virtual |
Load an image from the specified stream.
loadStream() should implicitly call destroy() to free the memory of the last loadStream() call.
stream | Input stream. |
Implemented in Image::IFFDecoder, Image::BitmapDecoder, Image::TGADecoder, Director::BITDDecoder, Ultima::Ultima4::U4LzwImageDecoder, Image::PICTDecoder, Image::PNGDecoder, Image::Cel3DODecoder, Image::PCXDecoder, Image::JPEGDecoder, Ultima::Ultima4::U4RleImageDecoder, Image::GIFDecoder, Image::ScrDecoder, Image::NeoDecoder, Director::DIBDecoder, Image::HNMFileDecoder, Image::HLZFileDecoder, Image::XBMDecoder, Supernova::MSNImage, MM::MM1::Gfx::ScreenDecoder, Prince::MhwanhDecoder, Ultima::Ultima4::U4RawImageDecoder, Ultima::Ultima4::FMTOWNSImageDecoder, and Sludge::HSIDecoder.
|
pure virtual |
Destroy this decoder's surface and palette.
This should be called by a loadStream() implementation as well as by the destructor.
Implemented in Image::IFFDecoder, Image::BitmapDecoder, Director::BITDDecoder, Image::TGADecoder, Image::PICTDecoder, Image::PNGDecoder, Image::Cel3DODecoder, Image::PCXDecoder, Image::GIFDecoder, Image::JPEGDecoder, Image::ScrDecoder, Image::NeoDecoder, Director::DIBDecoder, Image::HNMFileDecoder, Image::HLZFileDecoder, Image::XBMDecoder, Supernova::MSNImage, Ultima::Ultima4::U4ImageDecoder, MM::MM1::Gfx::ScreenDecoder, Prince::MhwanhDecoder, and Sludge::HSIDecoder.
|
pure virtual |
Get the decoded surface.
This surface is owned by this ImageDecoder and remains valid until destroy() or loadStream() is called, or until the destructor of this ImageDecoder is called.
Implemented in Image::IFFDecoder, Image::BitmapDecoder, Director::BITDDecoder, Image::TGADecoder, Image::PICTDecoder, Image::PNGDecoder, Image::Cel3DODecoder, Image::GIFDecoder, Image::PCXDecoder, Image::JPEGDecoder, Image::ScrDecoder, Image::NeoDecoder, Director::DIBDecoder, Image::HNMFileDecoder, MM::MM1::Gfx::ScreenDecoder, Image::HLZFileDecoder, Image::XBMDecoder, Supernova::MSNImage, Ultima::Ultima4::U4ImageDecoder, Prince::MhwanhDecoder, and Sludge::HSIDecoder.
|
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).
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.
|
inlinevirtual |
Query whether the decoded image has a palette.
|
inlinevirtual |
Return the number of colors in the palette.
Reimplemented in Image::IFFDecoder, Image::BitmapDecoder, Director::BITDDecoder, Image::TGADecoder, Image::PICTDecoder, Image::PNGDecoder, Image::Cel3DODecoder, Image::PCXDecoder, Image::GIFDecoder, Image::NeoDecoder, Director::DIBDecoder, MM::MM1::Gfx::ScreenDecoder, Image::HLZFileDecoder, Image::XBMDecoder, and Ultima::Ultima4::U4ImageDecoder.
|
inlinevirtual |
Query whether the decoded image has a transparent color.
Reimplemented in Image::PNGDecoder, and Image::GIFDecoder.
|
inlinevirtual |
Return the transparent color.
Reimplemented in Image::PNGDecoder, and Image::GIFDecoder.