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: 

How to Set Image or Picture Opacity

How can you set the opacity of an image or picture on the front panel?

 

Example and Need

For my Use Case I have a (NxM) grid of circles and I need to overlay a picture over circle <X,Y>. In this example the overlaid picture would need to be opaque of ~50% so that the borders & text of the circle beneath it shows through

 

 

 

 

justinmreina@gmail.com
0 Kudos
Message 1 of 4
(4,219 Views)

Post your code, but in general this isn't possible.  I mean it can be possible, and depending on what you have I can suggest multiple solutions.  But in general LabVIEW doesn't have transparent picture controls or opacity.  It can have a mask which ignores pixels so you can see through them, but not an opacity level.

 

Here is an example using a .NET picture box to get an opacity effect on PNG files.

 

http://forums.ni.com/t5/LabVIEW/NET-picturebox-convert-to-LabView-image/m-p/3125944#M897890

Message 2 of 4
(4,212 Views)

Mind reading is difficult but---

 

I'm imagining a seperate Floating.vi frontmost and over the main vi with its FP Bounds Property linked to the underlying indicator and its tranparancy property adjusted to the desired level.

 

I would still need to see some details though----


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(4,174 Views)

It's also possible to code it yourself by taking the two images and for each pixel with an alpha value get the RGB values of that pixel in both images and average those two values using the alpha value to get the new RGB value (so if you have R60 and R200 and your opacity is 80%, the new R value will be 60+0.8*(200-60), which is 172).


___________________
Try to take over the world!
Message 4 of 4
(4,144 Views)