Unit Gif

+--------------------------------------------------------------------------+ | Component: TGifImage & TGif | Created: 4/12/96 11:52:35 PM | Author: Jeff Kinzer | Copyright 1996, all rights reserved. | Description: Displays / Converts GIF Files | Version: 2.0 | Revision: 4.2 | History: | * Borland Pascal - GifUtl.pas Sean Wenzel ( CompuServe: 71736,1245 ) | * Created TGifImage - GifImg.pas Jeff Kinzer ( CompuServe: 102413,3557 ) | * Created TGif - Gif.pas Jeff Kinzer | Unsupported GIF Features: | * Misc. Extension Blocks: | + Graphic Control extension | + Comment extension | + Plain text extension | + Application extension | Note: I'm not sure what will happen if these | blocks are encountered but it'll be interesting +--------------------------------------------------------------------------+

Classes

TGif -

Functions

Types

PGif
PGifDataSubBlock
PGifHeader
TColorItem
TColorTable
TGifDataSubBlock
TGifHeader
TGifImageDescriptor
TGifInfo
TGifStatus
TGifVersion
TGraphicLine
TLogicalScreenDescriptor
TStatusChangeEvent

Constants

MAXCODES
MAXSCREENWIDTH

Variables


Functions


Types


PGif = ^TGif

PGifDataSubBlock = ^TGifDataSubBlock

PGifHeader = ^TGifHeader
The data
TColorItem = record
Red : Byte;
Green : Byte;
Blue : Byte;
end;
Actual ratio = (AspectRatio + 15) / 64
TColorTable = array[0..255] of TColorItem;

TGifDataSubBlock = record
Size : Byte;
Data : array[1..255] of Byte;
end;

TGifHeader = record
Signature : array[0..2] of Char;
Version : array[0..2] of Char;
end;

TGifImageDescriptor = record
Separator : Byte;
ImageLeftPos : Word;
ImageTopPos : Word;
ImageWidth : Word;
ImageHeight : Word;
PackedFields : Byte;
end;
The color table
TGifInfo = record
Header : TGifHeader;
LogicalScreen : TLogicalScreenDescriptor;
ImageDescriptor : TGifImageDescriptor;
Interlaced : Boolean;
UseLocalColors : Boolean;
end;
See below
TGifStatus = 0..100
the maximum number of different codes 0 inclusive
TGifVersion = (v87a, v89a);

TGraphicLine = array [0..2048] of Byte;
TExtensionBlock = record Introducer: Byte; { Fixed value of ExtensionIntroducer } ExtensionLabel: Byte; BlockSize: Byte; end; PGifCodeItem = ^TGifCodeItem; TGifCodeItem = record Code1, Code2: Byte; end;
TLogicalScreenDescriptor = record
ScreenWidth : Word;
ScreenHeight : Word;
PackedFields : Byte;
BackGroundColorIndex : Byte;
AspectRatio : Byte;
end;
'87a' or '89a'
TStatusChangeEvent = procedure(Sender: TObject; Status: TGifStatus) of object

Constants

MAXCODES = 4095

MAXSCREENWIDTH = 800

General Purpose Constants

Variables