Unit BGRAPNGComn

Description

Common types for PNG format. This extents PNGComn unit for animated PNG.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TAnimationControlChunk PNG chunk to specify animation
Packed Record TFrameControlChunk PNG chunk for frame in animation
Record TFrameDataChunk PNG chunk for frame data
Packed Record THeaderChunk PNG header chunk
Packed Record TPNGPhysicalDimensions PNG resolution chunk

Functions and Procedures

function CalculateChunkCRC(AChunkCode: TChunkCode; AData: Pointer; ALength: integer): LongWord;
function CheckSignature(const ASignature: TPNGSignature): boolean;
function GetChunkCode(AChunkType: TChunkTypes): TChunkCode;
function GetChunkType(AChunkCode: TChunkCode): TChunkTypes;
function GetSignature: TPNGSignature;
function IsAnimatedChunkType(AChunkType: TChunkTypes): boolean;

Types

EightLong = PNGComn.EightLong;
PAnimationControlChunk = ˆTAnimationControlChunk;
PFrameControlChunk = ˆTFrameControlChunk;
PFrameDataChunk = ˆTFrameDataChunk;
PNGImageException = PNGComn.PNGImageException;
PPNGPhysicalDimensionsTPNGPhysicalDimensions;
TAnimatedChunkTypes = (...);
TChunk = PNGComn.TChunk;
TChunkCode = PNGComn.TChunkCode;
TChunkHeader = PNGComn.TChunkHeader;
TChunkTypes = PNGComn.TChunkTypes;
TPNGSignature = array[0..7] of byte;

Constants

AnimatedChunkTypes : array[low(TAnimatedChunkTypes)..high(TAnimatedChunkTypes)] of TChunkCode = ( 'acTL', 'fcTL', 'fdAT' );
APNG_BLEND_OP_OVER = 1;
APNG_BLEND_OP_SOURCE = 0;
APNG_DISPOSE_OP_BACKGROUND = 1;
APNG_DISPOSE_OP_NONE = 0;
APNG_DISPOSE_OP_PREVIOUS = 2;
ctbKGD = PNGComn.ctbKGD;
ctcHRM = PNGComn.ctcHRM;
ctgAMA = PNGComn.ctgAMA;
cthIST = PNGComn.cthIST;
ctiCCP = PNGComn.ctiCCP;
ctIDAT = PNGComn.ctIDAT;
ctIEND = PNGComn.ctIEND;
ctIHDR = PNGComn.ctIHDR;
ctiTXt = PNGComn.ctiTXt;
ctoFFs = PNGComn.ctoFFs;
ctpHYs = PNGComn.ctpHYs;
ctPLTE = PNGComn.ctPLTE;
ctsBIT = PNGComn.ctsBIT;
ctsCAL = PNGComn.ctsCAL;
ctsPLT = PNGComn.ctsPLT;
ctsRGB = PNGComn.ctsRGB;
cttEXt = PNGComn.cttEXt;
cttIME = PNGComn.cttIME;
cttRNS = PNGComn.cttRNS;
ctUnknown = PNGComn.ctUnknown;
ctzTXt = PNGComn.ctzTXt;
MaxChunkLength = PNGComn.MaxChunkLength;

Description

Functions and Procedures

function CalculateChunkCRC(AChunkCode: TChunkCode; AData: Pointer; ALength: integer): LongWord;

This item has no description.

function CheckSignature(const ASignature: TPNGSignature): boolean;

This item has no description.

function GetChunkCode(AChunkType: TChunkTypes): TChunkCode;

This item has no description.

function GetChunkType(AChunkCode: TChunkCode): TChunkTypes;

This item has no description.

function GetSignature: TPNGSignature;

This item has no description.

function IsAnimatedChunkType(AChunkType: TChunkTypes): boolean;

This item has no description.

Types

EightLong = PNGComn.EightLong;

Array of 8 longwords

PAnimationControlChunk = ˆTAnimationControlChunk;

Frame Data: Contains image data for one frame

PFrameControlChunk = ˆTFrameControlChunk;

This item has no description.

PFrameDataChunk = ˆTFrameDataChunk;

This item has no description.

PNGImageException = PNGComn.PNGImageException;

Exception when reading/writing PNG files

PPNGPhysicalDimensionsTPNGPhysicalDimensions;

This item has no description.

TAnimatedChunkTypes = (...);

Animated PNG chunks

Values
  • ctacTL = 128: extends TChunkTypes
  • ctfcTL: Animation Control: Specifies number of frames and repeat count
  • ctfdAT: Frame Control: Position, delay and render mode of the next frame
TChunk = PNGComn.TChunk;

PNG chunk

TChunkCode = PNGComn.TChunkCode;

PNG chunk code

TChunkHeader = PNGComn.TChunkHeader;

PNG chunk header

TChunkTypes = PNGComn.TChunkTypes;

Static PNG chunks

TPNGSignature = array[0..7] of byte;

PNG signature

Constants

AnimatedChunkTypes : array[low(TAnimatedChunkTypes)..high(TAnimatedChunkTypes)] of TChunkCode = ( 'acTL', 'fcTL', 'fdAT' );

Animated PNG chunks codes

APNG_BLEND_OP_OVER = 1;

This item has no description.

APNG_BLEND_OP_SOURCE = 0;

This item has no description.

APNG_DISPOSE_OP_BACKGROUND = 1;

This item has no description.

APNG_DISPOSE_OP_NONE = 0;

This item has no description.

APNG_DISPOSE_OP_PREVIOUS = 2;

This item has no description.

ctbKGD = PNGComn.ctbKGD;

Palette: Lists the colors in the image palette.

ctcHRM = PNGComn.ctcHRM;

Image Header: Contains image's size, depth and compression method

ctgAMA = PNGComn.ctgAMA;

Chromaticity: Provides the chromaticity coordinates

cthIST = PNGComn.cthIST;

Background Color: Specifies the background color.

ctiCCP = PNGComn.ctiCCP;

Standard RGB Color Space: Indicates that the image uses the sRGB color space.

ctIDAT = PNGComn.ctIDAT;

Physical Dimensions: Specifies the intended pixel size or aspect ratio for display.

ctIEND = PNGComn.ctIEND;

Compressed Textual Data: Similar to tEXt but the text is compressed.

ctIHDR = PNGComn.ctIHDR;

static PNG chunks

ctiTXt = PNGComn.ctiTXt;

ICC Profile: Contains an ICC color profile.

ctoFFs = PNGComn.ctoFFs;

Transparency: Contains transparency information.

ctpHYs = PNGComn.ctpHYs;

Offset: Gives position on a printed page.

ctPLTE = PNGComn.ctPLTE;

Significant Bits: Indicates the color-accuracy of the source data.

ctsBIT = PNGComn.ctsBIT;

Gamma factor: Specifies gamma correction.

ctsCAL = PNGComn.ctsCAL;

Image Last-Modification Time: Stores the time that the image was last changed.

ctsPLT = PNGComn.ctsPLT;

International Textual Data: Allows embedding text data with character encoding information.

ctsRGB = PNGComn.ctsRGB;

Image End: Marks the end of the PNG data stream.

cttEXt = PNGComn.cttEXt;

Physical Scale: Provides physical scale information of the image.

cttIME = PNGComn.cttIME;

Image Data: Contains image data which is compressed and possibly filtered.

cttRNS = PNGComn.cttRNS;

Histogram: Provides a histogram of the color usage in the image.

ctUnknown = PNGComn.ctUnknown;

Suggested Palette: Suggests a palette to use if the full range of colors is unavailable.

ctzTXt = PNGComn.ctzTXt;

Textual Data: Stores text data associated with a keyword.

MaxChunkLength = PNGComn.MaxChunkLength;

Maximum length for a PNG chunk