32-bit BMP problems.

Karl Ramberg karl.ramberg at chello.se
Wed Mar 20 18:34:27 UTC 2002


Martin McClure wrote:
> 
> At 5:40 PM +0100 3/20/02, Karl Ramberg wrote:
> >
> >No, but I think BMP dump it's alpha channel, and when read back into Squeak
> >the alpha channel will be all zero and thus transparent.
> 
> Yep, BMPs don't support an alpha channel. Squeak does indeed zero the
> alpha channel, but I believe that this is a bug. This is the one I
> submitted a fix for last summer.
> 
> >A better way to handle this would be for Squeak to set the image depth
> >to
> >16 bits and not fake a alpha channel that will confuse most people.
> 
> Reducing a 24-bit BMP to 16 bits throws away a lot of information
> that might be wanted, so this seems like a bad thing to do by default
> (one can always copy the 32-bit Form to a 16-bit one if what you want
> is 16 bits).
You are of course right.
> 
> When reading into a 32-bit Form, you do need to fill in the alpha
> channel. The current default alpha channel, "all transparent" is not
> reasonable The reasonable default value would seem to be "all opaque"
> since this has the same meaning as an image without an alpha channel.
> 
> My changeset sets the alpha channel to opaque when reading a 24-bit
> BMP into a 32-bit Form.

Seems like a obvious candidate for inclusion into the image !
Karl



More information about the Squeak-dev mailing list