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)
 

Function Documentation

◆ writePNG()

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

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.