TPNGImage help

TPNGImage

Components > TChunk > Methods > LoadFromStream


Called when the chunk should load data.

function
LoadFromStream(Stream: TStream; const ChunkName: TChunkName; Size: Integer): Boolean;

Description

This method is called to load the chunk from a stream using the property Stream. ChunkName is the name of the chunk and size is the size of the data. After this methods reads the data it should also read and check the crc (network ordered longint, 4 bytes).

To avoid reading the data and calculating the crc, call inherited method to let the ancestor do the work. Finally use Data property to get information.

The method should return true or false if it sucessfully readed the data.