Домой Классы Статические функции Перечисления (ENUM) Структуры (STRUCTURE)

{Lzw|_decompression_for_GIF}


(включая защищенные члены)

CLASS {Lzw|_decompression_for_GIF} , UNTESTED, BYTES, BITWISE:



IMPORT : {Stream} , {Memory_stream} , {System_functions} , {Long_int} .

 

CONSTANT INT :

          NO_LZW_CODE = 4096

          GIF_BUFFER_SIZE = 4096 .



--------------------------------------------------------- 'from KOLGif.pas'


FUNCTION Decode_gif_data|_based_on_KOLGif (
     
{Memory_stream} In|put_data ,
     
INT Width|_pixels ,
     
INT Height|_pixels ,
     
INT Bpp|_bits_per_pixel ,
     
BOOL Interlace ,
     
INT Initial_code_size ) ==> {Memory_stream} , NEW


This code is based on KOLGif.pas (DecodeGifData) which is based on RxGif.pas which originally was based on source of freeware GBM program by Andy Key.

{Memory_stream} In|put_data


INDEXING BYTE

INT in_pos|ition


INT in_size|_bytes


{Memory_stream} Out|_codes


 

METHOD decode_gif_data ==> {Memory_stream} , NEW


INT Min_code_size



------------------------------------------------------------ 'read context'

INT Inx|_1111111


INT Size|2222222


BYTE Buf|er_read[260]


INT Code_size


INT Read_mask



---------------------------------------------------------- 'output context'

INT W|idth_picture


INT H|eight_picture


INT X|_position


INT Y|_position


INT Bpp|_Bits_per_pixel


BOOL Interlace



--------------------------------------------------------------- 'pass info'

INT Pass|_pass


INT Line_ident


INT Curr_line_data||Current_line_data



---------------------------------------------------------- 'corrupted flag'

BOOL Corrupted


 

METHOD read_byte ==> BYTE


INT read_count , DEBUG


   

METHOD read_code ==> INT



METHOD output|_value_bits ( INT Value|_to_out )



METHOD interlace_step ( INT Y_prev|ious ) ==> INT


END