ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transparent background

Solved!
Go to solution

is there an option to have transparent background of new picture? i prefer to avoid ring option, as i dont know how to import graphics onto that. 

The situation is - i want to make an aquarium of sorts, and to avoid the constant flicking of the screen (because of a while loop) i want the background to be a property of the front panel (which i did). i simply want the picture, where the fish moves, to be transparent

sulzwi_0-1687543852830.png

 

0 Kudos
Message 1 of 6
(3,044 Views)

Use a picture control from the Classic palette.  Every element of that control can be made transparent. 

Use a value of 255 for the Transparency Threshold.

aputman_0-1687546000455.png

And there you have a largemouth bass swimming in the warm ocean biome amongst the sea anemones.  😁

aputman_1-1687546042942.png

 

 

aputman
Message 2 of 6
(3,038 Views)

I dont think I understand - it looks to me like you just god rid of the background color of the image of the fish, which has white background. What I want to achieve is to have the 2D Picture control have transparent background, while it's automatically white. Do you want me to show you my block diagram?

0 Kudos
Message 3 of 6
(2,999 Views)
Solution
Accepted by topic author sulzwi

I did remove the background of the fish image.  But I also set the background color and the border color of the Classic 2D picture control to be transparent. In the color picker tool, there is a T in the upper right corner (T for Transparent).  You can set foreground and/or background of an object to be transparent. For controls, I think transparency only works with the Classic control suite. 

aputman
Message 4 of 6
(2,979 Views)

Thank you so much! Also, do you know a way to be able to change the size of the fish, while the programme is running? The only thing I've achieved is a very distorted and creepy multiplication of the fish

0 Kudos
Message 5 of 6
(2,955 Views)

The image control has to be completely redrawn every time you make changes. 

aputman
0 Kudos
Message 6 of 6
(2,820 Views)