| Class TGif (unit GifCode) |
TObject
| Constructors |
constructor Create;------------------------------------------------------------------------------} { TGif
| Functions |
procedure ConvertfromMem(AMemStream: TMemoryStream; ABmpName: string);
procedure Decode;
destructor Destroy;
procedure GifConvert(AGifName: string);
procedure GifToBmp(AGifName, ABmpName: string);
procedure WriteBitmapToFile(ABMPName: string);
procedure WriteBitmapToStream;
procedure CreateBitHeader;
procedure CreateLine;------------------------------------------------------------------------------} {fills in Line list with current line
procedure Error(ErrCode: integer);------------------------------------------------------------------------------} {Raise exception with a message
procedure InitCompressionStream;
function NextCode: word;
procedure ParseMem;------------------------------------------------------------------------------
procedure ReadSubBlock;------------------------------------------------------------------------------
| Properties |
| Events |
| Variables |
BadCodeCount : word;
BitsLeft : integer;
BmHeader : TBitmapInfoHeader;
BmpStream : TMemoryStream;
BytesLeft : integer;
ClearCode : integer;
CurrByte : byte;
CurrCodeSize : integer;
CurrentX : integer;
CurrentY : integer;
DecodeStack : array[0..MAXCODES] of byte;
EndingCode : integer;
GifStream : TMemoryStream;
GlobalColorTable : TColorTable;
Header : THeader;
HighCode : word;
ImageData : TDataSubBlock;
ImageDescriptor : TImageDescriptor;
ImageLines : TList;
Interlaced : boolean;
InterlacePass : byte;
LineBuffer : GraphicLine;
LocalColorTable : TColorTable;
LogicalScreen : TLogicalScreenDescriptor;
LZWCodeSize : byte;
NextByte : integer;
Prefix : array[0..MAXCODES] of integer;
Slot : word;
Status : word;
Suffix : array[0..MAXCODES] of integer;
TableSize : word;
TopSlot : word;
UseLocalColors : boolean;| Constructors |
constructor Create;Takes the gif header information and converts it to BMP
------------------------------------------------------------------------------} { TGif
| Functions |
procedure ConvertfromMem(AMemStream: TMemoryStream; ABmpName: string);------------------------------------------------------------------------------
procedure Decode;------------------------------------------------------------------------------
destructor Destroy;------------------------------------------------------------------------------
procedure GifConvert(AGifName: string);------------------------------------------------------------------------------
procedure GifToBmp(AGifName, ABmpName: string);------------------------------------------------------------------------------
procedure WriteBitmapToFile(ABMPName: string);------------------------------------------------------------------------------
procedure WriteBitmapToStream;------------------------------------------------------------------------------
procedure CreateBitHeader;------------------------------------------------------------------------------
procedure CreateLine;reads a data subblock from the stream
------------------------------------------------------------------------------} {fills in Line list with current line
procedure Error(ErrCode: integer);returns the next available code
------------------------------------------------------------------------------} {Raise exception with a message
procedure InitCompressionStream;------------------------------------------------------------------------------
function NextCode: word;------------------------------------------------------------------------------
procedure ParseMem;Member Functions
------------------------------------------------------------------------------
procedure ReadSubBlock;initializes info for decode
------------------------------------------------------------------------------
| Properties |
| Events |
| Variables |
BadCodeCount : word;bits left in byte - bytes left in block
BitsLeft : integer;number of entrys in the color table
BmHeader : TBitmapInfoHeader;interlace pass number } {Conversion Routine Vars
BmpStream : TMemoryStream;Image data
BytesLeft : integer;
ClearCode : integer;Current size of code in bits
CurrByte : byte;the index to the next byte in the datablock array
CurrCodeSize : integer;bad code counter
CurrentX : integer;array for buffer line output
CurrentY : integer;
DecodeStack : array[0..MAXCODES] of byte;the current byte
EndingCode : integer;Clear code value
GifStream : TMemoryStream;
GlobalColorTable : TColorTable;gif screen descriptor
Header : THeader;the file stream for the gif file
HighCode : word;highest slot position for the current code size
ImageData : TDataSubBlock;minimum size of the LZW codes in bits
ImageDescriptor : TImageDescriptor;local color table
ImageLines : TList;File Header for bitmap file
Interlaced : boolean;true if local colors in use
InterlacePass : byte;
LineBuffer : GraphicLine;array for code suffixes
LocalColorTable : TColorTable;global color table
LogicalScreen : TLogicalScreenDescriptor;gif file header
LZWCodeSize : byte;true if image is interlaced
NextByte : integer;highest code that does not require decoding
Prefix : array[0..MAXCODES] of integer;stack for the decoded codes
Slot : word;ending code value
Status : word;current screen locations
Suffix : array[0..MAXCODES] of integer;array for code prefixes
TableSize : word;variable to store incoming gif data
TopSlot : word;position that the next new code is to be added
UseLocalColors : boolean;image descriptor