From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read png: transparancy doesnt work out very well

Solved!
Go to solution

Im programatically loading PNG pictures and putting them in a picture box; however I see large differences when I programatically load a picture or just drag it to the front panel from windwos explorer; see attached picture.

 

I can change the transparancy for the loaded PNG, but making this very high makes the image alias badly; doesnt look smooth. When its low it has white edges.

Are their any other options?

screenie.png

 

The left is programatically loaded, the right is dragged from windows explorer; identical image.

I have attached the original png too

 

 

Felix

 

0 Kudos
Message 1 of 4
(2,592 Views)

There's a VI hidden in vi.lib that is used in some examples for handling transparency, you may want to give it a try and see if it helps. The VI is located @:

 

C:\Program Files\National Instruments\LabVIEW 2010\vi.lib\picture\picture.llb\Create Mask By Alpha.vi

 

I found when I was looking at the Traverse Tree and Set Custom Symbols.vi example, its in the Load Symbols.vi subVI of this example if you want to find it that way.

Message 2 of 4
(2,565 Views)
Solution
Accepted by topic author _Faust

You can try the code I posted here:

 

http://forums.ni.com/t5/LabVIEW/how-to-get-alpha-images-on-picture-box/m-p/1138513#M501588

 

TestPNGAlpha2.png

 

The boxes are drawn to test the blending.

Message 3 of 4
(2,550 Views)

Brilliant!!

0 Kudos
Message 4 of 4
(2,528 Views)