How to load a GIF image file

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
User avatar
Grincheux
Posts: 33
Joined: Thu Nov 30, 2006 8:01 am
Location: Arbois - 39
Contact:

How to load a GIF image file

Post by Grincheux » Sat Jan 13, 2007 4:08 pm

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 ?
Kenavo.

User avatar
xnview
Author of XnView
Posts: 32043
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to load a GIF image file

Post by xnview » Wed Jan 24, 2007 9:42 am

Grincheux wrote:This works welle for many format, but not for GIF. Why ?
What's happened?
Pierre.

User avatar
MaierMan
Posts: 78
Joined: Wed Aug 04, 2004 8:32 pm
Contact:

Post by MaierMan » Thu Feb 01, 2007 6:57 pm

wasn't there something called gflEnableLZW (patent-issue-resolver :p)?

Post Reply