Hello Squeakers!
I am really puzzled about this: I have 2 PNGs, both with transparent pixels. Although both are rendered accordingly when I ask for the "stencil" (map of transparent vs. opaque pixels) one of them gives me the correct image, whereas for the other I just get a black box. Using the files attached, "triangle-sketch" gives me the correct mask and "home-gimp..." gives me the black box. I evaluate this in a workspace, first by d&d the files into Squeak (4.3, all-in-one, Mac), and then d&d into the workspace: (SketchMorph withForm: sketch305 form stencil) openInHand. (SketchMorph withForm: sketch1737 form stencil) openInHand. I show the situation in the attached screenshot. Any idea why this is so? Thanks in advance! Sebastian triangle-sketch.png (828 bytes) Download Attachment home-gimp-100x100.png (24K) Download Attachment SqueakScreen.1.jpg (36K) Download Attachment |
On 2012-11-14, at 17:27, Sebastian Nozzi <[hidden email]> wrote:
> Hello Squeakers! > > I am really puzzled about this: I have 2 PNGs, both with transparent > pixels. Although both are rendered accordingly when I ask for the > "stencil" (map of transparent vs. opaque pixels) one of them gives me > the correct image, whereas for the other I just get a black box. > > Using the files attached, "triangle-sketch" gives me the correct mask > and "home-gimp..." gives me the black box. > > I evaluate this in a workspace, first by d&d the files into Squeak > (4.3, all-in-one, Mac), and then d&d into the workspace: > > (SketchMorph withForm: sketch305 form stencil) openInHand. > (SketchMorph withForm: sketch1737 form stencil) openInHand. > > I show the situation in the attached screenshot. > > Any idea why this is so? Thanks in advance! > > Sebastian > <triangle-sketch.png><home-gimp-100x100.png><SqueakScreen.1.jpg> sketch305 form bits first hex ==> '16r0' sketch1737 form bits first hex ==> '16rFFFFFF' - Bert - |
I still don't get it... wouldn't it mean that it should be a full
white opaque pixel? (I'm no graphics expert) And still, isn't this contradictory? self isTransparentAt: 0@0. ==> false self colorAt: 0@0. ==> Color transparent Thanks again! Sebastian 2012/11/14 Bert Freudenberg <[hidden email]>: > > sketch305 form bits first hex > ==> '16r0' > > sketch1737 form bits first hex > ==> '16rFFFFFF' > > - Bert - > > |
Small clarification: this was from an Inspector window (inspecting the
"house" Form), hence the "self". 2012/11/14 Sebastian Nozzi <[hidden email]>: > I still don't get it... wouldn't it mean that it should be a full > white opaque pixel? (I'm no graphics expert) > > And still, isn't this contradictory? > > self isTransparentAt: 0@0. ==> false > self colorAt: 0@0. ==> Color transparent > > Thanks again! > > Sebastian > > > 2012/11/14 Bert Freudenberg <[hidden email]>: >> >> sketch305 form bits first hex >> ==> '16r0' >> >> sketch1737 form bits first hex >> ==> '16rFFFFFF' >> >> - Bert - >> >> |
In reply to this post by senTalker
On 14.11.2012, at 17:57, Sebastian Nozzi <[hidden email]> wrote:
> I still don't get it... wouldn't it mean that it should be a full > white opaque pixel? (I'm no graphics expert) No, it's a white pixel with alpha (opaqueness) of 0. Opaque white would be 16rFFFFFFFF, not 16r00FFFFFF. > And still, isn't this contradictory? > > self isTransparentAt: 0@0. ==> false > self colorAt: 0@0. ==> Color transparent For historical reasons, only a pixel value of 0 is treated as transparent by BitBlt. - Bert - > Thanks again! > > Sebastian > > > 2012/11/14 Bert Freudenberg <[hidden email]>: >> >> sketch305 form bits first hex >> ==> '16r0' >> >> sketch1737 form bits first hex >> ==> '16rFFFFFF' >> >> - Bert - |
Thanks! That clears it then.
El 14/11/2012, a las 18:23, Bert Freudenberg escribió: > On 14.11.2012, at 17:57, Sebastian Nozzi <[hidden email]> wrote: > >> I still don't get it... wouldn't it mean that it should be a full >> white opaque pixel? (I'm no graphics expert) > > No, it's a white pixel with alpha (opaqueness) of 0. Opaque white would be 16rFFFFFFFF, not 16r00FFFFFF. > >> And still, isn't this contradictory? >> >> self isTransparentAt: 0@0. ==> false >> self colorAt: 0@0. ==> Color transparent > > For historical reasons, only a pixel value of 0 is treated as transparent by BitBlt. > > - Bert - > >> Thanks again! >> >> Sebastian >> >> >> 2012/11/14 Bert Freudenberg <[hidden email]>: >>> >>> sketch305 form bits first hex >>> ==> '16r0' >>> >>> sketch1737 form bits first hex >>> ==> '16rFFFFFF' >>> >>> - Bert - > |
Free forum by Nabble | Edit this page |