KHTML developers: Animated GIF playing
Mosfet
dan.duley at verizon.net
Tue May 13 13:57:26 BST 2003
Well, dithering shouldn't be a problem... GIF color tables can only have 256
colors ;-) You can have a global color table and local ones, but each image
frame will use only one colormap with 256 colors. Here's what the spec says:
7 6 5 4 3 2 1 0 Field Name Type
+===============+
0 | | Red 0 Byte
+- -+
1 | | Green 0 Byte
+- -+
2 | | Blue 0 Byte
+- -+
3 | | Red 1 Byte
+- -+
| | Green 1 Byte
+- -+
up | |
+- . . . . -+ ...
to | |
+- -+
| | Green 255 Byte
+- -+
767 | | Blue 255 Byte
On Tuesday 13 May 2003 01:45 am, Stephan Kulow wrote:
> On Monday 12 May 2003 16:36, Mosfet wrote:
> > I've been kindof annoyed at animated GIF playing using QMovie for some
> > time. It used to take a lot of resources, now it sometimes takes all the
> > CPU and makes the GUI crawl. Because of this I wrote my own animated GIF
> > player based on libungif. Qt's version manually parses each byte of the
> > GIF ;-)
> >
> > My libungif version seems to work much smoother to me, esp. with large
> > GIF animations. I didn't code it using QImageConsumer but I can do so if
> > you all are interested in using it. Drop me a line and I can convert it
> > and provide the code to you.
>
> It can't get much worse I'd say. Just make sure your code handles color
> maps and dithering correctly. I don't know what libungif gives you, but
> with the Qt GIF reader this was the biggest problem. I'd be happy to test
> your code. Unfortunatly my own collection of test GIF images is lost, but I
> find some :)
>
> Greetings, Stephan
More information about the kde-core-devel
mailing list