mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-14 19:49:33 +00:00
Fix decoder to work correctly with rotating-earth.gif
This commit is contained in:
parent
e02474e09f
commit
9e7b10b283
4 changed files with 8 additions and 6 deletions
|
@ -234,7 +234,7 @@ $IF GIFPLAY_BAS = UNDEFINED THEN
|
|||
CLS
|
||||
|
||||
' Blit the rendered frame
|
||||
_PUTIMAGE , renderedFrame
|
||||
_PUTIMAGE , renderedFrame, , , _SMOOTH
|
||||
|
||||
DIM idx AS LONG: idx = HashTable_LookupLong(__GIFPlayHashTable(), Id)
|
||||
|
||||
|
@ -419,6 +419,7 @@ $IF GIFPLAY_BAS = UNDEFINED THEN
|
|||
END SUB
|
||||
|
||||
|
||||
' https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art011
|
||||
FUNCTION __GIF_ReadLZWCode& (sf AS StringFileType, buffer AS STRING, bitPos AS LONG, bitSize AS LONG)
|
||||
DIM AS LONG code, p: p = 1
|
||||
|
||||
|
@ -449,6 +450,7 @@ $IF GIFPLAY_BAS = UNDEFINED THEN
|
|||
END FUNCTION
|
||||
|
||||
|
||||
' https://stackoverflow.com/questions/26894809/gif-lzw-decompression
|
||||
FUNCTION __GIF_DecodeLZW%% (sf AS StringFileType, bmpMem AS _MEM)
|
||||
TYPE __LZWCodeType
|
||||
c AS LONG
|
||||
|
@ -520,7 +522,7 @@ $IF GIFPLAY_BAS = UNDEFINED THEN
|
|||
END IF
|
||||
|
||||
' Except after clear marker, build new code
|
||||
IF prev <> clearMarker THEN
|
||||
IF prev <> clearMarker AND n < 4096 THEN
|
||||
codes(n).prefix = prev
|
||||
codes(n).length = codes(prev).length + 1
|
||||
codes(n).c = codes(c).c
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
108
|
||||
39
|
||||
101
|
||||
2
|
||||
1
|
||||
|
|
|
@ -15,8 +15,8 @@ DIM SHARED PlayBT AS LONG
|
|||
|
||||
': External modules: ---------------------------------------------------------------
|
||||
'$INCLUDE:'../../InForm/extensions/GIFPlay.bi'
|
||||
'$INCLUDE:'../../InForm/InForm.bi'
|
||||
'$INCLUDE:'../../InForm/extensions/MessageBox.bi'
|
||||
'$INCLUDE:'../../InForm/InForm.bi'
|
||||
'$INCLUDE:'GIFPlaySample.frm'
|
||||
|
||||
': Event procedures: ---------------------------------------------------------------
|
||||
|
@ -103,5 +103,5 @@ END SUB
|
|||
|
||||
'$INCLUDE:'../../InForm/InForm.ui'
|
||||
'$INCLUDE:'../../InForm/xp.uitheme'
|
||||
'$INCLUDE:'../../InForm/extensions/GIFPlay.bas'
|
||||
'$INCLUDE:'../../InForm/extensions/MessageBox.bas'
|
||||
'$INCLUDE:'../../InForm/extensions/GIFPlay.bas'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
0
|
||||
12
|
||||
0
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue