LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buliding Array of Images from JPEGs

Hello All,

I have a vi (photo and vi enclosed) that reads some JPEG files and converts them to an array of images. The input is an array of jpeg image filenames to load. Since some of the jpeg image filenames repeat, I set up the loop to only load each file once in hopes of speeding the process and conserving memory. This generally works, however, the loop occasionally runs very slow (more than 30 seconds). Other times, it executes right away. I'm thinking this is some sort of memory allocation or swapping issue. Does anyone have suggestions on how to get a handle on the slow execution issue? It SEEMS like the holdup is in the "Draw Flattened Pixmap" vi.

I do see better results on a newer machine (more memory/cpu power). I am hoping not to have to replace the machine that normally runs this though.

Thanks,
-Ted


Download All
0 Kudos
Message 1 of 2
(2,717 Views)
Preallocate your image array outside the loop and use the replace array element function to put the images into the array.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(2,682 Views)