LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom control with image mask

Solved!
Go to solution

Hi,

 

I am trying to create a custom control that looks like a light bulb. What i would like to do is have an image of a light bulb with a boolean indicator behind it so when you press a button the light bulb gets dimmer or brighter. I know how to customise controls and can change the colour of the boolean indicator but have no idea how to do this one. Any help would be most grateful.

 

Cheers

 

James

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

Hi James,

you can add images to the control. Create your light bulb image, copy it to the clipboard and insert it into your control.

 

Mike

0 Kudos
Message 2 of 6
(3,461 Views)

Hi Mike,

 

Cheers for the reply. I know how to do this but what i have it a white light bulb on a black background and need the boolean control behind to shine through the light bulb to make it appear like it is turning on or off. If this makes sense.

 

Cheers

0 Kudos
Message 3 of 6
(3,459 Views)

If you insist on putting a boolean behind a 'lightbulb' control, then you need to change your white bulb image to a transparent bulb image. To change the white to transparent, you need to use a picture editor, such as Corel Photo-Paint, to put the white region into an alpha mask.

 

It would be easier to follow Mike's idea, and create a custom boolean control that simple has two images in it, one of the builb on, another of the bulb off.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 6
(3,452 Views)
Solution
Accepted by topic author Treble20

GIF will allow for transparency.  This will show the image through.

 

Also a few throughts.  Modify the color box instead of a boolean, this whill allow you to just change the color instead of using the boolean color via a property node.

 

One other easy method is to use a picture ring- down load the image of your bulb, fill the bulb with several (maybe 16) shades of brightness, then import the sequence into a picture control, then you will have multiple shades you can display no customization required.

Message Edited by falkpl on 06-08-2009 09:17 AM
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 6
(3,447 Views)

Hi everyone,

 

Thanks for all your help and a great suggestion on using the color box. I have now managed to do what i was after and it will be very useful for other controls that i need to make up.

 

Cheers

 

James

0 Kudos
Message 6 of 6
(3,441 Views)