ScummVM API documentation
PNG decoder

Description

Decoder for PNG images.

This decoder has a dependency on the libpng library.

Used in engines:

Classes

class  Image::PNGDecoder
 

Functions

bool Image::writePNG (Common::WriteStream &out, const Graphics::Surface &input, const byte *palette=nullptr, uint paletteCount=256)
 
bool Image::writePNG (Common::WriteStream &out, const Graphics::Surface &input, const Graphics::Palette &palette)
 

Function Documentation

◆ writePNG() [1/2]

bool Image::writePNG ( Common::WriteStream out,
const Graphics::Surface input,
const byte *  palette = nullptr,
uint  paletteCount = 256 
)

Outputs a compressed PNG stream of the given input surface.

Parameters
outStream to which to write the PNG image.
inputThe surface to save as a PNG image..
paletteThe palette (in RGB888), if the source format has a bpp of 1.
paletteCountNumber of colors in the palette (default: 256).

◆ writePNG() [2/2]

bool Image::writePNG ( Common::WriteStream out,
const Graphics::Surface input,
const Graphics::Palette palette 
)

Outputs a compressed PNG stream of the given input surface.

Parameters
outStream to which to write the PNG image.
inputThe surface to save as a PNG image..
paletteThe palette if the source format has a bpp of 1.