Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: import png to pixmap with transparency

75 views
Skip to first unread message

zou

unread,
Feb 25, 2008, 6:10:06 PM2/25/08
to
tst wrote:The picture control does not support alpha transparency, only a mask.

You can convert alpha channel to mask using Create Mask By Alpha.vi
in vi.lib/picture/picture.llb
 
 
George Zou
<a href="http://www.geocities.com/gzou999/index.html" target="_blank">http://www.geocities.com/gzou999/index.html</a>
&nbsp;

tst

unread,
Feb 26, 2008, 3:10:05 AM2/26/08
to
russelldav wrote:
If I could find a way to return the content of my base image in the pixels where my alpha mask is - then I could use that to generate an image that gave the illusion of transparency?

To create a semi-transparent image, you can break each pixel into its RGB values, average these values with the RGB values of what's supposed to be under it and then build the result back into the 32 bit numbers. I assume that for alpha transparency, you will need to do averaging which will take the alpha value into account. To get the RGB value, you can go over the image&nbsp;a loop&nbsp;and use the color to RGB VI, but I'm pretty sure using the Split number function on the 2D U32 array twice will also get you the correct values.

unclebump

unread,
Feb 26, 2008, 5:10:07 AM2/26/08
to

zou

unread,
Feb 26, 2008, 10:40:06 AM2/26/08
to
TonP wrote:The Image cluster, from read PNG.vi contains these info.In the 24 bit image info the first byte is the alpha channel.Ton

Only the 32 bit image has alpha channel.&nbsp; The other 3 bytes are Red, Green, and Blue.

0 new messages