[BUG] publishing project locally from SqueakPlugin

Andreas Raab andreas.raab at gmx.de
Sun Mar 9 20:12:58 UTC 2003


Ned,

> Also, the picture should still be available as a separate JPG or GIF 
> file in the .pr file (which is a zip archive).

Unfortunately, this particular bug happens when you publish the project. The
images are being screwed up _while_ you publish so once this happened
there's just nothing you can do anymore. 

The bug is caused by assuming that a particular image can be classified as
to whether a lossy compression is possible or not. And the answer is that at
the point in the publishing process where we come across the form we have no
information whatsoever about it. Because of this, any attempt to compress
the form as JPEG can screw up the image - for example, if it contains
translucency (JPEG cannot handle this), or if it was hand-drawn (in which
case it will be washed out due to compression artifacts). 

The only thing you _can_ do is PNG compression. And that's what you get if
you get back to the original version of the method - it uses runlength
encoding (in hibernation) and lossless compression (for the project) so
attempting to be "any smarter" than this won't get you anywhere.

BTW, this also applies to fix posted here 

	http://groups.yahoo.com/group/squeak/message/54616

This fix is broken too as it still will use JPEG compression in some
circumstances and will lead to the same effects we're seeing today (just in
fewer cases).

Cheers,
  - Andreas



More information about the Squeak-dev mailing list