TPNGImage help

PNG Delphi

Components > TPNGList > Methods > Add


Add a new item using the class from parameter.

type
TChunkClass = class of TChunk;
procedure
Add(ChunkClass: TChunkClass): TChunk;

Description

Add method will create a new item using the ChunkClass from the parameter and return a pointer to it. The Add method will select the most appropriate position to add depending on the chunk class.
Note
It's not allowed to add a second critical chunk such as TChunkIHDR. Calling Add using these on the parameters will return an error.