[FIX] 24-bit BMP files are read as 32-bit Forms with all but black pixels transparent.

Martin McClure martin at hand2mouse.com
Sun Mar 24 03:13:22 UTC 2002


At 3:02 PM -0500 3/20/02, Doug Way wrote:
>Hello Martin.  Based on your description, your fix sounds like a 
>good idea.  It might be good if you re-posted it to the list as a 
>[fix] so that we can harvest it.
>

Here's the fix again. It makes all pixels read from a 24-bit BMP file 
fully opaque.

The existing code made all pixels fully transparent except for black 
pixels, which were made an opaque dark blue. This is no longer 
necessary since with an alpha channel value of 255 a pixel word's 
value cannot be zero.

Let me know if you have any questions.

-Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BmpTransparencyFix.cs
Type: application/octet-stream
Size: 903 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020323/4880791a/BmpTransparencyFix.obj


More information about the Squeak-dev mailing list