nCine::PngDecodeOptions struct

How PngCodec reads an image.

Public variables

bool VerifyCrc
Whether the checksums of the chunks that are read are checked.
std::int64_t MaxPixels
Most pixels an image may have, so a damaged size can't take all of the memory.

Variable documentation

bool nCine::PngDecodeOptions::VerifyCrc

Whether the checksums of the chunks that are read are checked.

Off by default — images of the game are read intact from its own content, some of them were written with the checksums left zero, and not computing them is faster. Images from anywhere else should be checked, a damaged critical chunk is refused then, a damaged ancillary one is ignored. An ancillary chunk that isn't used (anything but tRNS) is skipped without its checksum, whatever it holds changes nothing.