32-bit BMP problems

Jim Benson jb at speed.net
Mon Mar 18 23:57:29 UTC 2002


Yisrael,

I noticed that when I explore the bitmap 'a' in your project, values 13-18
are 0. I dump the bitmap:

((Bitmap new: 36) at: 1 put: 4285953934;
        at: 2 put: 4285954702;
        at: 3 put: 4285955470;
        at: 4 put: 4285956238;
        at: 5 put: 4285957006;
        at: 6 put: 4285957774;
        at: 7 put: 4286749373;
        at: 8 put: 4286749885;
        at: 9 put: 4286750141;
        at: 10 put: 4286750653;
        at: 11 put: 4286750909;
        at: 12 put: 4286751421;
        at: 19 put: 4283433129;
        at: 20 put: 4283433129;
        at: 21 put: 4283433129;
        at: 22 put: 4283433129;
        at: 23 put: 4283433129;
        at: 24 put: 4283433129;
        at: 25 put: 4283433129;
        at: 26 put: 4283433129;
        at: 27 put: 4283433129;
        at: 28 put: 4283433129;
        at: 29 put: 4283433129;
        at: 30 put: 4283433129;
        at: 31 put: 4283433129;
        at: 32 put: 4283433129;
        at: 33 put: 4283433129;
        at: 34 put: 4283433129;
        at: 35 put: 4283433129;
        at: 36 put: 4283433129; yourself)

Are these the values you are seeing in the explorer? Notice that slots 13
to: 18 are conspicuously absent, not filled, and therefore set to 0. Squeak
intereprets the 0 as color transparent.

One way you can change the transparent color to black is by saying:

a replaceColor: Color transparent withColor: Color Black.

where 'a' is the name of the form that you want to change.
(if you change it to Color Red and look with the magnifying glass tool, you
can *really* see it. )

Hope this helps,

Jim



----- Original Message -----
From: "Yisrael Lowenstein" <gte356h at prism.gatech.edu>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Monday, March 18, 2002 2:41 PM
Subject: Re:32-bit BMP problems


> Karl wrote:
> > I guess the bmp is really 16 bits deep.
> > Test with
> > Color colorFromPixelValue: (self pixelValueAt: 1 at 1) depth: 16
>
> I thought of that too and tested it...but it was giving me back incorrect
> colors when I tried that...
>
> I made a small project to demonstrate the problems I am having...I don't
> think it is the black pixel problem that people were discussing since
> these pixels are clearly not black.  take a look and see what you can make
> of it:
>
> http://coweb.cc.gatech.edu:8888/uploads/squeakers/14/32bitBMPproblems.pr
>
> Thanks!
> Lushi
>
>  o      |Yisrael Lowenstein: Computer Science Master's Student & Squeaker
>    ()  o|lushi at bigfoot.com; gte356h at prism.gatech.edu; lushi at cc.gatech.edu
> o_/||\/ |"Before you criticize a man, walk a mile in his shoes. That way
>    ||   | when you do criticize him, you'll be a mile away and have his
>   _/\_  | shoes." - Unknown                    AIM: YisraelL  ICQ: 1037061
>   Class Schedule: http://www.prism.gatech.edu/~gte356h/schedule/
>
>
>




More information about the Squeak-dev mailing list