At 2:04 AM +0200 10/17/02, you wrote:
>Hi list,
>
>can you reproduce this (Dir 8.5.1 Win2K):
>
>Create some text in a text member (text color and bgcolor color don't
>matter):
>member("test")
>
>In the message window type:
>
>x = new(#bitmap)
>x.image = member("test").image
>
>The result is a bitmap member, the thumbnail of which is the correct
>reproduction of the text, but when I double click it, it opens in the paint
>window showing just a solid bar (instead of the text). The bar has the color
>of the text).
>
>If I choose red as the text color and blue as the bgcolor, I end up with two
>bars in one line, the first bar is red, the second is blue.
>
>(If I analyse the bar with getpixel(), I get the same result)
>
>What is wrong?

Nothing is incorrect - it's just a limitation of the Paint Window..

The .image you extracted from the #text member has an alpha channel.
The alpha channel is what contains the anti-alias'd 'cookie-cutter' 
outline that we call text.

It's proper incorporation is what causes the stage display & cast 
thumbnail to show the expected result.

The Paint Window, however, can only display & edit the merged RGB 
info, & not RGB+Alpha.  So it can't show the alpha of a bitmap if it 
contains one.
It displays as a rect = member().rect in the #text member's foreColor.

Similarily, if you go to the PI's member tab & turn OFF the 'Use 
Embedded Alpha', then the stage display will match the paint window's 
display.

You might like to try:

alpha = new(#bitmap)
alpha.image = member("Text").image.extractAlpha()

This will pull out that alpha channel & put it into another new member.
You'll note that it's an 8 bit gray scale member.

hth

-Buzz
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to