Page 1 of 1

How to load a GIF image file

Posted: Sat Jan 13, 2007 4:08 pm
by Grincheux
For loading all images, I use the following function to setup the param structure :

GFL_LoadParams PROC USES EBX EDI ESI,__lpGflParams:LPGFL_LOAD_PARAMS

mov eax,__lpGflParams

test eax,eax
jz @Exit

mov edi,eax

INVOKE gflGetDefaultLoadParams,eax

and eax,0000ffffh
jnz @Error

or (GFL_LOAD_PARAMS Ptr [edi]).Flags,GFL_LOAD_SKIP_ALPHA ;GFL_LOAD_ORIGINAL_DEPTH
mov (GFL_LOAD_PARAMS Ptr [edi]).Origin,GFL_TOP_LEFT
mov (GFL_LOAD_PARAMS Ptr [edi]).ColorModel,GFL_ARGB
mov (GFL_LOAD_PARAMS Ptr [edi]).DefaultAlpha,255
mov (GFL_LOAD_PARAMS Ptr [edi]).LinePadding,4

mov eax,edi
jmp @Exit

@Error :

xor eax,eax

@Exit :

ret
GFL_LoadParams ENDP

; ================================================================================

This works welle for many format, but not for GIF. Why ?

Re: How to load a GIF image file

Posted: Wed Jan 24, 2007 9:42 am
by xnview
Grincheux wrote:This works welle for many format, but not for GIF. Why ?
What's happened?

Posted: Thu Feb 01, 2007 6:57 pm
by MaierMan
wasn't there something called gflEnableLZW (patent-issue-resolver :p)?