32-bit BMP problems.

Jim Benson jb at speed.net
Mon Mar 18 18:35:07 UTC 2002


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


> I'm posting this for one of the GaTech users working with MPEGs and
> the Display.
>
> Mark
>
> >Date: Sun, 17 Mar 2002 02:19:25 -0500 (EST)
> >From: Yisrael Lowenstein <gte356h at prism.gatech.edu>
> >To: <squeakers at cc.gatech.edu>
> >Cc: <squeak at cs.uiuc.edu>
> >Subject: [squeakers] 32-bit BMP problems.
> >Sender: owner-squeakers at cc.gatech.edu
> >Reply-To: squeakers at cc.gatech.edu
> >
> >I have been working with loading bitmaps in squeak to do Digital Video
> >Special Effects for SqueakEnd and have come across a problem:
> >
> >here's my test code:
> >
> >aform := Form fromBMPFileNamed: 32bitbitmap.BMP.
> >Transcript show: (aform colorAt: 1 at 1).
> >
> >this will return "Color transparent" even though it is clearly not!
> >
> >I have narrowed the problem down to the fact that these are represented
> >differently internally than other 32 bit forms.  if you explore the
bitmap
> >of aform, you will se a bunch of SmallIntegers.  If you grap a 32 bit
> >bitmap from the screen (using "anotherForm := Form fromUser." while you
> >are in a 32-bit display depth) and explore that form's bitmap, you will
> >see that it is made up of LargePositiveIntegers.  Consequently, colorAt:
> >works just great on anotherForm...
> >
> >So, event though both of these (the fromUser form and the bmp-file form)
> >claim to be 32-bit forms, they are represented differently internally.
Is
> >this a bug?  or some sort of limitation?  how can I get around it?
> >
> >Any help would be GREATLY appreciated.
> >
> > Lushi





More information about the Squeak-dev mailing list