| Class TGif (unit Gif) |
TGraphic
| Constructors |
constructor Create;| Functions |
procedure Assign(Source: TPersistent);
procedure BmpToGif(var ABitmap: TBitmap);
destructor Destroy;
procedure GifToBmp(var ABitmap: TBitmap);
procedure LoadFromFile(const Filename: string);
procedure LoadFromStream(Stream: TStream);
procedure SaveToFile(const Filename: string);
procedure SaveToStream(Stream: TStream);
procedure ChangeStatus(LoadStatus: LongInt);
procedure Draw(ACanvas: TCanvas; const Rect: TRect);
function GetEmpty: Boolean;
function GetHeight: Integer;
function GetWidth: Integer;
procedure ReadData(Stream: TStream);
procedure SetHeight(Value: Integer);
procedure SetWidth(Value: Integer);
procedure TriggerChangeEvent;
procedure WriteData(Stream: TStream);
procedure ConvertGifToBmp(var ABitmap: TBitmap);
procedure DecompressGif;
function GetGifVersion: TGifVersion;
function GetInterlaced: Boolean;
procedure GifError(ErrorStr: String);TriggerStatusChangeEvent
procedure SetBitmap(newValue: TBitmap);
procedure SetGifVersion(newValue: TGifVersion);
procedure SetInterlaced(newValue: Boolean);| Properties |
property Bitmap : TBitmap
property FileName : TFileName
property GifVersion : TGifVersion
property Interlaced : Boolean
property Status : TGifStatus| Events |
event OnChange : TNotifyEvent
event OnStatusChange : TStatusChangeEvent| Variables |
FBitmap : TBitmap;
BadCodeCount : Word;
BitsLeft : Integer;
BmHeader : TBitmapInfoHeader;
BmpStream : TMemoryStream;
BytesLeft : Integer;
ClearCode : Integer;
CurrByte : Byte;
CurrCodeSize : Integer;
CurrentX : Integer;
CurrentY : Integer;
CurStatus : Integer;
DecodeStack : array[0..MAXCODES] of Byte;
EndingCode : Integer;
FFileName : TFileName;
FGifVersion : TGifVersion;
FOnChange : TNotifyEvent;
FOnStatusChange : TStatusChangeEvent;
FStatus : TGifStatus;
GifInfo : TGifInfo;
GifStream : TMemoryStream;
GlobalColorTable : TColorTable;
HighCode : Word;
ImageData : TGifDataSubBlock;
ImageLines : TList;
InterlacePass : Byte;
LineBuffer : TGraphicLine;
LocalColorTable : TColorTable;
LZWCodeSize : Byte;
MaxStatus : Integer;
NextByte : Integer;
Prefix : array[0..MAXCODES] of Integer;
Slot : Word;
Suffix : array[0..MAXCODES] of Integer;
TableSize : Word;
TopSlot : Word;| Constructors |
constructor Create;Destroy
| Functions |
procedure Assign(Source: TPersistent);WriteData
procedure BmpToGif(var ABitmap: TBitmap);Create
destructor Destroy;SaveToStream
procedure GifToBmp(var ABitmap: TBitmap);BmpToGif
procedure LoadFromFile(const Filename: string);Assign
procedure LoadFromStream(Stream: TStream);SaveToFile
procedure SaveToFile(const Filename: string);LoadFromFile
procedure SaveToStream(Stream: TStream);LoadFromStream
procedure ChangeStatus(LoadStatus: LongInt);WriteBmpStream
procedure Draw(ACanvas: TCanvas; const Rect: TRect);SetBitmap
function GetEmpty: Boolean;Draw
function GetHeight: Integer;GetEmpty
function GetWidth: Integer;GetHeight
procedure ReadData(Stream: TStream);GetWidth
procedure SetHeight(Value: Integer);ReadData
procedure SetWidth(Value: Integer);SetHeight
procedure TriggerChangeEvent;SetInterlaced
procedure WriteData(Stream: TStream);SetWidth
procedure ConvertGifToBmp(var ABitmap: TBitmap);GifDecode
procedure DecompressGif;Decode the GIF
function GetGifVersion: TGifVersion;Could not make BMP file } { Bit masks for use with NextCode
function GetInterlaced: Boolean;SetGifVersion
procedure GifError(ErrorStr: String);Member Functions
TriggerStatusChangeEvent
procedure SetBitmap(newValue: TBitmap);TriggerChangeEvent
procedure SetGifVersion(newValue: TGifVersion);GetGifVersion
procedure SetInterlaced(newValue: Boolean);GetInterlaced
| Properties |
property Bitmap : TBitmap
property FileName : TFileName
property GifVersion : TGifVersion
property Interlaced : Boolean
property Status : TGifStatus| Events |
event OnChange : TNotifyEvent
event OnStatusChange : TStatusChangeEvent| Variables |
FBitmap : TBitmap;
BadCodeCount : Word;Bytes left in block
BitsLeft : Integer;number of entrys in the color table
BmHeader : TBitmapInfoHeader;interlace pass number } { Bitmap Data
BmpStream : TMemoryStream;File Header for bitmap file
BytesLeft : Integer;bits left in Byte
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;
CurStatus : Integer;
DecodeStack : array[0..MAXCODES] of Byte;the current Byte
EndingCode : Integer;Clear code value
FFileName : TFileName;
FGifVersion : TGifVersion;
FOnChange : TNotifyEvent;
FOnStatusChange : TStatusChangeEvent;
FStatus : TGifStatus;Image data } { Status Variables
GifInfo : TGifInfo;the file stream for the gif file
GifStream : TMemoryStream;GIF Data
GlobalColorTable : TColorTable;gif file header
HighCode : Word;highest slot position for the current code size
ImageData : TGifDataSubBlock;minimum size of the LZW codes in bits
ImageLines : TList;
InterlacePass : Byte;current screen locations
LineBuffer : TGraphicLine;array for code suffixes
LocalColorTable : TColorTable;global color table
LZWCodeSize : Byte;local color table
MaxStatus : Integer;
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
Suffix : array[0..MAXCODES] of Integer;array for code prefixes
TableSize : Word;variable to store incoming gif data
TopSlot : Word;where next new code will be added