02-01-2017 08:26 AM - edited 02-01-2017 08:27 AM
@john1626 wrote:
Thanks. What does the image index do? Your code can read the number of images, I'll try to understand that part maybe I can do something about it so that I can view the other images.
It does read the number of images in a file. But yes the image index selects one image from the file and displays it. The tif you posted had two images both that looks like static but one was darker than the other. Run my demo VI, select the tif file in for the image control, then change the image index from 0 to 1 to display one or the other. Ico files have the same functionality. If you want to have an array of images, I suggest making a for loop that runs for the number of images in the file getting them one at a time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-01-2017 08:45 AM
02-01-2017 10:35 AM - edited 02-01-2017 10:35 AM
Back saved in 2013
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-02-2017 07:36 PM
Thank you so much. Can you also save it in LV2016?
02-02-2017 09:38 PM
Is your VI limited only for 2 images (0 and 1 image index)?
02-03-2017 03:20 AM
No it's not. It reads the number of pages contained in an image file so if you TIFF file has 5 images, it will adapt. But you should not pay attention to that, it is a minor detail.
One feedback to Hoovah though: most TIFF files I've seen have a .tiff (and not .tif) extension, that should be modified in the Load Image VI, otherwise the default case is executed (with just 1 image to be read).
Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.
02-03-2017 03:32 AM
When I load a tif file with 820 image is says out of memory, what should I do?
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.OutOfMemoryException: Out of memory.
02-03-2017 07:36 AM - edited 02-03-2017 07:37 AM
2016 can open 2013 or 2015 code as you probably already noticed.
@Eric Thanks for the suggestion but I actually thought of a better improvement. In the Load Image.vi instead of having a case that loads the file one way if it is ICO, one way if it is TIF and one for all others, you can actually delete the current Default case, and make the TIF case the Default. It will load all other images (like PNG, JPG, BMP) get the number of images in that file (which for those file types is always 1) and then load that one image. For file types that have multiple images the selection works as it should. Then there is only one special case and that is for ICO files which for some reason the .Net code doesn't like the selection of images.
@John post your image so we can test it. I suspect it is a corrupt image, or incomplete somehow.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-07-2017 07:29 AM
@Hooovahh Thank you so much for helping me. I can't attach the image here because it is too big. But I still get the same error.
02-07-2017 08:38 AM
Post it somewhere else and link to it. That being said I'm not sure I could do much other than confirm your issue. Have you tried resaving it as a new TIF maybe by using an image editor like Gimp?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord