LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Image returns empty image data mask

Solved!
Go to solution

I am exploring creating a user interface that can be setup during runtime using an approach similar to https://forums.ni.com/t5/LabVIEW/How-can-I-dynamically-quot-create-quot-controls-or-indicators/td-p/... whereby images of indicators and controls are used in conjunction with mouse capture events.

 

An unpleasantry I've encountered is that when invoking Get Image, the caption background is not transparent, unlike the indicator/control being used to generate the image. Investigating, I found that the mask array in the returned image data is empty, and so every pixel is drawn without transparency. Moreover, I have found the caption background in the image always seems to match the VI background colour, regardless of what shows through the indicator/control transparent sections when Get Image is invoked.

 

Is there any way to obtain the proper mask information, which is my preferred solution, or get it to return the image data with whatever is showing through in its transparency?

 

As an addition, the above forum post I referenced for dynamically creating controls and indicators is 22 years old: Is it still the best way to dynamically create controls and indicators? (for reference, I used LabVIEW 2019).

0 Kudos
Message 1 of 2
(5,772 Views)
Solution
Accepted by topic author banksey255

I found a solution, which was to use the create mask vi and wire the VI colour as the colour to make transparent. It's a little indirect but seems to work.

0 Kudos
Message 2 of 2
(5,743 Views)