ScummVM API documentation
Ultima::Ultima4::U4LzwImageDecoder Class Reference

#include <imageloader_u4.h>

Inheritance diagram for Ultima::Ultima4::U4LzwImageDecoder:
Ultima::Ultima4::U4ImageDecoder Image::ImageDecoder

Public Member Functions

 U4LzwImageDecoder (int width, int height, int bpp)
 
bool loadStream (Common::SeekableReadStream &stream) override
 
- Public Member Functions inherited from Ultima::Ultima4::U4ImageDecoder
 U4ImageDecoder (int width, int height, int bpp)
 
void destroy () override
 
const Graphics::SurfacegetSurface () const override
 
const byte * getPalette () const override
 
uint16 getPaletteColorCount () const override
 
- Public Member Functions inherited from Image::ImageDecoder
virtual bool hasPalette () const
 
virtual bool hasTransparentColor () const
 
virtual uint32 getTransparentColor () const
 

Additional Inherited Members

- Protected Member Functions inherited from Ultima::Ultima4::U4ImageDecoder
void setFromRawData (const byte *rawData)
 
Graphics::PixelFormat getPixelFormatForBpp () const
 
- Protected Attributes inherited from Ultima::Ultima4::U4ImageDecoder
Graphics::Surface_surface
 
const byte * _palette
 
uint16 _paletteColorCount
 
int _width
 
int _height
 
int _bpp
 

Detailed Description

Decoder for U4 images with LZW compression. Like raw images, the data is just a stream of pixel data with no palette information (e.g. title.ega, tree.ega). This decoder handles the original 4-bit images, as well as the 8-bit VGA upgrade images.

Member Function Documentation

◆ loadStream()

bool Ultima::Ultima4::U4LzwImageDecoder::loadStream ( Common::SeekableReadStream stream)
overridevirtual

Load an image from the specified stream.

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

Parameters
streamInput stream.
Returns
Whether loading the file succeeded.
See also
getSurface
getPalette

Implements Image::ImageDecoder.


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