LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transparent Behavior of Image(Icons) annotation on XY Graph is not working

Solved!
Go to solution

Hello Everyone,
I hope you all are doing well!

I'm trying to plot the Audiogram using XY Graph.

 

The icon annotations which I'm trying to plot on the XY Graph are actually Transparent(PNG format) in nature. 

When I'm trying to plot the same icons on the XY Graph, the icons are not plotting as PNG/Transparent background image. The icons are plotting with the weird white background.  
I want to plot the icons with the actual behavior of the image.

 

Please find the attached code. "Main Code.vi" is the Test Code. 

Screenshot 2025-03-15 170924.PNG

0 Kudos
Message 1 of 10
(461 Views)

You are using very ancient outdated code from around LabVIEW 6

 

Once you use the modern version, things will be transparent:

 

altenbach_0-1742055019258.png

 

 

 

 

 

 

 

Message 2 of 10
(439 Views)

On a side note, while labVIEW only support drawing up to 24bit colors, The "read png" function does some magic here and creates a mask gleaned from the alpha channel.

Message 3 of 10
(414 Views)

@altenbach
Thanks for the help.
I tried the approach you shared but now the icons are not plotting on the XY Graph. It will be great help if you will share the modified code. 

0 Kudos
Message 4 of 10
(411 Views)

@atul_ghumade wrote:

I tried the approach you shared but now the icons are not plotting on the XY Graph. It will be great help if you will share the modified code. 


See if this works for you ...

 

(deleted broken attachment, see below)

0 Kudos
Message 5 of 10
(405 Views)

I'm using @ the code you shared. 
Icons are plotting on the upper left corner of XY graph. 

 

Screenshot 2025-03-15 231020.png

0 Kudos
Message 6 of 10
(400 Views)

Looks like I broke something... It definitely worked initially.... I'll check....

0 Kudos
Message 7 of 10
(392 Views)

See if this works for you...

 

altenbach_0-1742063203595.png

 

 

altenbach_0-1742062957879.png

 

(Yes, it can be cleaned up. I currently left you coordinate manipulations as is)

 

See cleaned up code below...

 

0 Kudos
Message 8 of 10
(381 Views)
Solution
Accepted by topic author atul_ghumade

@altenbach wrote:

(Yes, it can be cleaned up. I currently left you coordinate manipulations as is)

 

 


Here's how that could look like for code clarity.

 

altenbach_0-1742065833838.png

 

 

Message 9 of 10
(368 Views)

Thank you so much for @altenbach. It worked. 

0 Kudos
Message 10 of 10
(325 Views)