LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two image questions

Hello,

My first question is how would I clear a jpg image programatically from the front panel? Can I do this?

My second question is I want to display a series of images, more or less like a slow movie. The idea I have is to create something to read the images from a folder, like data, but only these would be image files. Is that possible? Is there another way to set it up not having to list every image file?

Thank you.
0 Kudos
Message 1 of 4
(3,082 Views)
Ellie;

To clear the picture indicator, you can use the "Empty Picture" vi, which is located in the function palette:

Graphics & Sound -> Picture Functions

The attached vi shows all the .jpg images in "directory path" in a picture indicator, like an image show. Just make sure you input the path before executing the vi. Note that the images will be displayed in alphabetical order. Finally, if you have non ,jpg images in the directory, you will see "white gaps" (i.e. for those images, you will see nothing) This mean the program should be modified to avoid this undesired output.

Regards;
Enrique
www.vartortech.com
Message 2 of 4
(3,082 Views)
Good example however I just want to comment that when you wire an array through a for loop like you do in your example, you don't need to wire the array size into the count terminal (N). The for loop iterates for every element in the array automatically.


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 3 of 4
(3,082 Views)
> My first question is how would I clear a jpg image programatically
> from the front panel? Can I do this?


If you want to clear a picture control, you can wire either an empty
picture control or draw a rectangle with the color you want to erase
with. If you want to save a JPG file, create an array with the erasing
color and wire it to the Write JPEG File.vi in the picture control palette.


> My second question is I want to display a series of images, more or
> less like a slow movie. The idea I have is to create something to
> read the images from a folder, like data, but only these would be
> image files. Is that possible? Is there another way to set it up not
> having to list every image file?


You can either make a ring control where each of t
he images is loaded
or copied and pasted, or you can use the Read JPEG VI to load each of
the images and wire it to a picture control. Build a simple loop that
accesses each file, reads, and displays, and you have what you want.

Greg McKaskle
0 Kudos
Message 4 of 4
(3,082 Views)