12-02-2012 08:37 AM
Dear Forum members,
I am completely new to LabVIEW and in particular using it for graphics animations. I want to build a multi-image graphic where some parts are dynamic (i.e. they change from red to green to indicate stopped to running status respectively). Some graphics I have found i.e. Tank with level controls and I intend to use these however I need to draw my own graphics and make them animated. Most will be simple two-state binary changes (i.e. red to green).
I found the "Draw Flattened Pixmap.vi" and have used this to do a simple two-state graphic change (see attached vi). The problem that I have is that I do not want the border to be shown around the graphic image and I want the background to be transparent. I have already saved the .jpg files with transparent backgrounds however they come out with white background.
Can anyone provide some simple explanation and guidance please.
Regards
Solved! Go to Solution.
12-02-2012 11:13 AM
bunnykins,
Use the Tools Palette. Switch to the Set Color tool. Click on the color boxes in the palette and set both the Foregraound and Background colors to transparent (white box with T in upper left corner when the color window is visible). Click the tool both on the background and on the border. Sometimes you may need to try more than once on the border ge the exact position for the click.
Note that this makes it difficult to find the control, so make sure it is in the position you want and sized the way you want before making it transparent.
Lynn
12-02-2012 12:44 PM
For transparency in the picture itself, you'll need to use a mask to hide the relevant color. PNG is a format which is more suited for line images than JPEG (it's not lossy) and it allows transparency, so I suggest you use that instead of JPEG. Unfortunately, the LV VIs don't keep the full alpha information you need for the transparency, but you can use them to set a mask above a certain threshold. There should probably be an example in the example finder (Help>>Find Examples)
12-03-2012 09:05 AM
Many thanks Lyn your solution worked out fine for me. tst reply was also valid since my .jpg file still showed a white (non-transparent background). I had to go back and re-save the graphics as .png format (with transparent background) before the graphic was how I wanted it to be. So many thanks to both Lyn and tst for your responses, both were equally valid and helped me to get what I want.
12-03-2012 05:57 PM
You should give tst's reply kudos as a tangible thank you since you marked my reply as the solution.
Lynn