Rendering animated GIFs
- From: Timo Kunze <TKunze71216@xxxxxx>
- Date: Fri, 12 May 2006 22:56:50 +0200
Hi,
I'm trying to display an animated GIF (GIF89a) using GDI. I got it
mostly working.
One of the things, that do not yet work correctly, is the 'disposal
method' field of the Graphic Control Extension block. At the moment, I'm
handling it like this:
0 or 1 - don't remove the current frame and simply draw the next one over it
2 - fill the current frame's rectangle with the GIF's back color; then
draw the next frame over the result
3 - replace the content of the current frame's rectangle with what was
there before the current frame was rendered; then draw the next frame
over the result
Now I have this GIF:
http://www.timosoft-software.de/phpBB2/images/smiles/icon_angry.gif
I would expect it to make use of disposal method 2 or 3, but it uses 0
and 1 only. Around frame 47, this leads to drawing failures, because the
smiley's hands are not removed.
The whole thing is displayed correctly, if I increment the 'disposal
method' fields by 1, thus making them one-based. According to the GIF89a
format specifications, this field is zero-based. So are the format specs
wrong (*lol*) or am I doing something wrong? Has anyone some code that
works for the linked GIF and uses a zero-based 'disposal method' field?
Thanks in advance
Timo
--
www.TimoSoft-Software.de - the home of ExplorerTreeView
Boycott DRM! Boycott HDCP!
.
- Follow-Ups:
- Re: Rendering animated GIFs
- From: Michael Phillips, Jr.
- Re: Rendering animated GIFs
- Prev by Date: Re: Can I show a picture like this with ATL?
- Next by Date: Re: Rendering animated GIFs
- Previous by thread: Using Layered Windows Efficiently
- Next by thread: Re: Rendering animated GIFs
- Index(es):
Relevant Pages
|