animated GIF89a
Posted: Wed Jan 05, 2022 8:10 pm
hi,
have found in MiniGUI in c:\minigui\SOURCE\h_Gif89.prg
which also work under HMG and Xbase++
Sample c:\minigui\Samples\AniGIF\demo.prg can show "simple" animated GIF
now i want "more" but have Probkem with GIF89a Structure
my "Problem" are "PackedFields". how do i get those Bit / Bits under harbour 
have found in MiniGUI in c:\minigui\SOURCE\h_Gif89.prg
Code: Select all
FUNCTION LoadGif() 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