32-bit BMP problems.
Martin McClure
martin at hand2mouse.com
Wed Mar 20 17:24:49 UTC 2002
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).
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.
-Martin
More information about the Squeak-dev
mailing list
|