LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use a JPEG file as a background image for my vi in 8.5

Solved!
Go to solution

Im working on a vi that I plan on using as part of an alarm system.  I would like to use a JPEG file of my house as a background image for the vi, or possibly to just be displayed in a window on the control panel.  I have seen people use their own images before, but never looked at what this involved.

 

Im trying to use the "read JPEG file" vi and the "draw flattened pixmap" vi to accomplish this.  The vi does run, but nothing shows on the front panel.  If I try to create an indicator from the "new picture" output of the "draw flattened pixmap" vi, I get an empty white window on the front panel.

 

Any advice?

 

Thanks

0 Kudos
Message 1 of 7
(3,216 Views)
Solution
Accepted by Hkuty

The picture could be there just not showing up in the right place in the picture control. How big is the control compared to the picture? Does it have to be a JPEG or can you just copy it as a bitmap to the clipboard and paste it on the front panel? Can you post a picture and the unworking VI?

0 Kudos
Message 2 of 7
(3,207 Views)

Ok.  I'm sending a pic and a copy of the vi as it is right now.  Hopefully it helps.  Am I understanding you correctly that you are suggesting that I copy the pic as a bitmap, then simply paste it to the front panel?  I was not aware you could do that.

 

Thanks

 

Download All
0 Kudos
Message 3 of 7
(3,200 Views)

Great!  I just tried saving a version of the pic as a .bmp and replacing the JPG vi with the bmp vi.  The pic now shows up on the front panel.  Im still curious about the JPG version though.

0 Kudos
Message 4 of 7
(3,192 Views)

the earlier vi (using the JPEG) works fine. just increase the size of the picture control

Regards
Guru (CLA)
0 Kudos
Message 5 of 7
(3,182 Views)

@Guruthilak wrote:

the earlier vi (using the JPEG) works fine. just increase the size of the picture control


I figured this was the problem. And to the OP, I'm glad a bitmap worked, but no I didn't mean use any sort of LabVIEW programming at all. I meant open your image in Microsoft Paint, Press ctrl+A to select the whole thing. Then copy the image to the clipboard. Now select your front panel and press ctrl + v to paste it. No programming needed and the image is there. However, if you want to programmatically change it, you will need a picture control.

0 Kudos
Message 6 of 7
(3,167 Views)

I meant open your image in Microsoft Paint, Press ctrl+A to select the whole thing. Then copy the image to the clipboard. Now select your front panel and press ctrl + v to paste itI meant open your image in Microsoft Paint, Press ctrl+A to select the whole thing. Then copy the image to the clipboard. Now select your front panel and press ctrl + v to paste it


 

 

ok ..now i understood.

 

As an info, if you would like to change the entire FP background, then right click on the FP border (where the scroll bar is visible) and the select "properties". Now select an image of your choice by browsing through your PC or select the required background already listed and hit the "OK" button. This will change the entire FP background

 

Guru

Regards
Guru (CLA)
Message 7 of 7
(3,160 Views)