animated GIF89a

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

animated GIF89a

Post by AUGE_OHR »

hi,

have found in MiniGUI in c:\minigui\SOURCE\h_Gif89.prg

Code: Select all

FUNCTION LoadGif() 
which also work under HMG and Xbase++ :D

Sample c:\minigui\Samples\AniGIF\demo.prg can show "simple" animated GIF
now i want "more" but have Probkem with GIF89a Structure

Code: Select all

      7 6 5 4 3 2 1 0        Field Name                    Type
     +---------------+
  0  |               |       Logical Screen Width          Unsigned
     +-             -+
  1  |               |
     +---------------+
  2  |               |       Logical Screen Height         Unsigned
     +-             -+
  3  |               |
     +---------------+
  4  | |     | |     |       <Packed Fields>               See below
     +---------------+
  5  |               |       Background Color Index        Byte
     +---------------+
  6  |               |       Pixel Aspect Ratio            Byte
     +---------------+
<Packed Fields> = Global Color Table Flag 1 Bit
Color Resolution 3 Bits
Sort Flag 1 Bit
Size of Global Color Table 3 Bits

Code: Select all

FUNCTION LoadGif()
   ...
   cGifHeader = LEFT( cStream, j )

   // add this Code
   aGifInfo[ 1 ] := SUBSTR( cGifHeader, 4, 3 )          // GifVersion
   aGifInfo[ 2 ] := BIN2W( SUBSTR( cGifHeader, 7, 2 ) ) // LogicalScreenWidth
   aGifInfo[ 3 ] := BIN2W( SUBSTR( cGifHeader, 9, 2 ) ) // LogicalScreenHeight

   aGifInfo[ 4 ] := BIN2W( SUBSTR( cGifHeader, 11,1 ) ) // PackedFields 
   aGifInfo[ 5 ] := BIN2W( SUBSTR( cGifHeader, 12,1 ) ) // Background Color Index
   aGifInfo[ 6 ] := BIN2W( SUBSTR( cGifHeader, 13,1 ) ) // PixelAspectRatio
my "Problem" are "PackedFields". how do i get those Bit / Bits under harbour :?:
have fun
Jimmy
Post Reply