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,594 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,567 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,552 Views)

Brilliant!!

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