LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Filled Images Possible?

Hi all,
 
Before we used LabVIEW at my company we used some other software that gave us the ability to dynamically fill an image. What i mean by that is we could draw for example a fuel tank. Save the image as a bitmap and then in the software select the colour white to be transparent and then enable the fill colour property. We could then assign a value of 0 to 100 and it would fill the image (the transparent colour we specified - in this case white) bottom up using this value. We used this for displaying fuel tanks etc showing how much they were filled, but rather than using a standard "tank" object we could draw the fuel tank itself.
 
Is there any way of doing this within LabVIEW?
 
Many thanks in advance for any help
 
Best Regards
 
Mike
 
LabVIEW 8.5
 
0 Kudos
Message 1 of 9
(4,250 Views)
You can load and display bitmaps with the picture control and the picture
control functions.

You can mask values out, but only 100% or 0% (so pixels are visible or not)
are easy. Alpha blending is more difficult (but not impossible).

Regards,

Wiebe.


0 Kudos
Message 2 of 9
(4,235 Views)

are you saying its possible to haver a normal tank hidden behind the picture which shows through where the white is? so i can simply change the value of a tank and it will raise and lower and will show through my bitmap? How do you turn on of off colours in a bitmap?

Any help along this line or other appreciated as im stuck!

Regards

Mike

 

0 Kudos
Message 3 of 9
(4,234 Views)

Do you have to use a bitmap image?  Or can you use some of the indicators and crerate a custom control with them (have a custom image being filled with an existing control)?

tst posted some interesting changes to existing controls about 1 year ago.  You could chnage the look of existing controls from the LV library and have your own custom background, filler, etc.  One I remember was the moving sky which looked like Win-95 start screen (progress bar).

Please describe what you want to achieve as an end result.. Maybe there are other easier solutions.

RayR

Message 4 of 9
(4,230 Views)

Here is a link to tst's Nugget on customizing controls.

Here is a quick example of using those techniques.

Ben

Message Edited by Ben on 10-11-2007 07:44 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 5 of 9
(4,221 Views)
Thanks, i saw Wiebe's reply before the rest and when seeing him mention the mask, used that. I simply masked the colour white, made the picture box the image was loaded in transparent and then put the Tank behind the picture to get the effect i wanted, so as the tank rises it only shows through the white portions of the image in front of it. And the tank itself is hidden by the rest of the bitmap
 
Many thanks for all your help
 
Mike
 
0 Kudos
Message 6 of 9
(4,209 Views)

LOL!!

Nice logo -  Ben.

Didn't see that one, yet..  Now you'll have to explain the fill..  Maybe point to the appropriate thread not to hijack this one..

😄

Message 7 of 9
(4,195 Views)

Ray,

I justed used the info in tst's Nugget.

1) Edit an image in Paint and create a region that you want to be tansparent and fill it with a color that doesn't occur elsewhere in the image. In this case I used black.

2) Save as bmp.

3) Open a PowerPoint and insert an image from file.

4) use the picture tools in PP to define "black" as transparent.

5) Right-click and save as ".wmf" file. close PP.

6) In LV customize a boolean and go to blow-tourch "tweezer" mode.

7) Right-click and import image from the wmf file.

😎 Close the customize screen and replace the control with the new one. This should give you your image with a transparenet region.

9) Drag that over top of a tank control and you will be able to "tell at a glance" just how much beer is in that Champions cup.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(4,189 Views)

cool..

now I'm thirsty,.

🙂

0 Kudos
Message 9 of 9
(4,172 Views)