Mantis - Squeak
Viewing Issue Advanced Details
1388 Graphics minor always 06-28-05 21:06 02-25-06 23:51
tb  
andreas  
normal  
closed 3.8  
fixed  
none    
none 3.9  
0001388: [BUG] GIFReadWriter - degradation on writing
I don't know a whole lot about image file formats but I've noticed that
gifs written with GIFReadWriter end up looking worse than when they
were read. The (hopefully still) attached image illustrates the
problem.

The leftmost image is the original gif. The rightmost is what the
imported gif looks like when displayed in a SketchMorph. They both
look pretty good. The middle one is what you get if you write the form
back out as a gif. It looks a whole lot worse.

Notes
(0001688)
KenCausey   
06-28-05 21:08   
I moved this report from BFAV2. The original report has a PDF attached which as mentioned in followups to that report was not really a useful way to examine the problem so I didn't bother to post the attachment here.
(0001689)
KenCausey   
06-28-05 21:08   
Duane Maxwell <dmaxwell@san.rr.com>:

"Looks to me like it wrote the GIF out with a fixed 8-bit palette, not
one optimized for that graphic, unlike the original GIF. It looks OK
in Squeak probably because it was being displayed in a truecolor Form."
(0001690)
KenCausey   
06-28-05 21:09   
"Andreas Raab" <andreas.raab@gmx.de>:

"Interesting. That's a bug. GIFReadWriter tries to reduce the color count of
the image being written (e.g., when you write form > 8bpp) and apparently
that's broken for ColorForm. It's not quite clear how to fix this though. We
either need to find out what breaks in colorReduced and/or simply disable
the call in GIFReadWriter for forms <= 8bpp."
(0001691)
KenCausey   
06-28-05 21:09   
tblanchard@mac.com:

"Is this still likely to be true if the ColorForm reports its depth as 8
anyhow? Because that's what happens - the gif imports to an 8 bit ColorForm."
(0001692)
KenCausey   
06-28-05 21:09   
"Andreas Raab" <andreas.raab@gmx.de>:

"If the gif imports it to an 8 bit ColorForm and given that we see the
degradation, I would claim that it is _certain_ that it is still true if the
ColorForm reports its depth as 8 anyhow ;-)

What was your question again? ;-)"