Closed GoogleCodeExporter closed 9 years ago
It seems the files were converted to png format when you attached them.
Original comment by yrizoud
on 22 Jun 2010 at 7:50
Ok, here is a zipfile -- hopefully it won't try to autoconvert the images
inside that!
Original comment by 00a...@gmail.com
on 22 Jun 2010 at 8:37
Attachments:
Indeed this image shows the problem.
A look at the source code shows two bugs in the old GIF loading code:
1) It seems Grafx2 believes an image has sorted palette when the image is
interlaced (IDB.Indicator & 0x40 -- it seems it should be 0x20)
2) The code for sorted palette seems to think the palette will be all R
components, then all G, then all B. Actually the spec says this indicator only
informs the viewing program that the colors are in order of decreasing usage:
color #0 is more used than #1, which is more used than #2 etc. This is coded at
two places: for "IDB.Indicator & 0x40" and "LSDB.Aspect & 0x80"
So, this image must be one of two cases:
- It has no local palette but its global palette is sorted
- It has a local palette and is an interlaced GIF.
Original comment by yrizoud
on 22 Jun 2010 at 9:30
Fixed in r1520.
For the record, both images are transparent 16-color GIFs. In the second, the
palette is global, declared in the Logical Screen Descriptor Block.
In the first, there is no global palette, it's a local palette declared in the
Image Descriptor Block. According to the standards, both methods are equally
valid, and since it's not a animation it should make no difference. The bugs
were in Grafx2 since the beginning of times, so it seems 99% of GIFs in the
wild have no local palette.
Original comment by yrizoud
on 22 Jun 2010 at 9:45
Original issue reported on code.google.com by
00a...@gmail.com
on 22 Jun 2010 at 4:16Attachments: