32-bit BMP problems.

John.Maloney at disney.com John.Maloney at disney.com
Mon Mar 18 21:30:23 UTC 2002


I think Jim is probably right, the pixels with 0 values are being interpreted
as transparent. Since BMP files do not support transparency (do they?)
a quick fix is probably to map 0 valued pixels to 1 in the 32-bit BMP file
reading code. (This is an RGB of (0,0,1), which is virtually black.) You could also
display the Form using Form over instead of Form paint, but it's preferrable
to fix the pixel values.

Squeak has the convention that a 0 pixel value at any depth means
"transparent". BitBlt respects this when using paint mode, but we
tried to be consistent so that methods like "colorAt:" reports
"Color transparent" for 0-valued pixels. We fixed the JPEG
decoder to map 0 to 1, for example.

I believe there is a method in Form that can do this mapping, although
I don't have time to look for it right now.

Hope this helps.

	-- John


At 10:35 AM -0800 3/18/02, Jim Benson wrote:
>Mark,
>
>If we could take a look at the bitmap file itself, we'd have a better chance
>at an answer. I know that I have to be careful at times in this arena, as
>under certain circumstances true black (RGB: 0 0 0) is interpreted in Squeak
>to be transparent. However, I don't recall if .BMP files have this problem
>or not.
>
>Jim





More information about the Squeak-dev mailing list