LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically display jpeg files on the front panel

Hi,

I would like to be able to programmatically display various jpeg images on the front panel of a VI. I would mostly like to be able to display one image at a time and have the ability to programmatically change the image to different ones under program control. I found a picture indicator but not sure how to use if or if this is the best way. Thanks for any help.

Dave Adams
0 Kudos
Message 1 of 10
(12,959 Views)
Yes, you can use a picture indicator.

The attached simple codelet shows how to display a jpeg image on it (Make sure the image indicator is big enough).

Let us know if you need help with the rest of the coding. 🙂
Message 2 of 10
(12,950 Views)
HI ,

picture indicator can be used .In the file attached
by Altenbach at the output of the "read JPEG" create an indicator,it will contain the image data, when u run the VI
the numeric data related to the image will be displayed in that , save that.
Then change this image data indicator to image data control and then u can directly attach it to the "draw
flattened image " block , so we can remove path problems that may arise.

Regards
tanisha
Message 3 of 10
(12,925 Views)
Open this VI,
. Select your jpg file using the browse button
. run the VI

I have been using this since long ago, hope you like it!

Cheers!
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 4 of 10
(12,923 Views)
Thanks for the help. I coded a small VI and it works nicely. I tried creating a property node (zoom) and put in values to shrink my picture to fit the image indicator. It did fit but the colors were skewed quite a bit from the original picture making the smaller version that appeared in the image indicator very "washed out" looking. Is there a way to get a larger picture zoomed down to a small indicator while maintaining decent image quality?
Do I have to shrink or crop the picture first in a photo processing software tool?
0 Kudos
Message 5 of 10
(12,876 Views)
Thanks for the vi, it works nicely. Can the VI you posted allow resizing of the picture indicator while keeping the jpeg image fit to the indicator? As a follow on question, I would like to be able to present controls that have pictures on the buttons. If I want to read jpeg files programmatically for placement on button controls, would the techniques be similar to the ones used in your VI?
0 Kudos
Message 6 of 10
(12,876 Views)
Hope you like this... 🙂

Cheers!
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 7 of 10
(12,861 Views)
Thanks for the VI. It works very well and is some nice coding. Is there a way to keep the rectangle of the picture and button a constant size and resize the jpeg to fit the rectangle? I was able to use the zoom property node and shrink down a jpeg after reading it but the colors were washed out pretty bad. Do the pictures I use have to be resized in something like a photo processing software outside of LabVIEW prior to reading them if I want to make them fit a fixed size button and picture rectangle? Thanks again.

Dave Adams
0 Kudos
Message 8 of 10
(12,812 Views)
Try looking at Image Toolbox from George Zou at

http://www.geocities.com/gzou999/index.html

George has some LV6.1 demo for you to download. Hope his VI will help.

Cheers!
ian.f.k
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 9 of 10
(12,803 Views)
Try looking at Image Toolbox from George Zou at

http://www.geocities.com/gzou999/index.html

George has some LV6.1 demo for you to download. Hope his VI will help.

Cheers!
ian.f.k
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 10 of 10
(12,803 Views)