This example was first published in the LabVIEW Forum, but i want to publish also a LabVIEW 7.1 version.
The additional input "image index" is used to select the image, which should be available at the image data output.
Currently it supports only gif files with version 89a.
Interlaced images are not taken into account.
The vi inside of the "Read GIF File" function can also be used to read all images of a Gif file. More about how to use it can be seen in the GIF._Example.vi which is also part of the attached zip file.
Version 01.01
- first image is now index 0
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Thanks for posting this!
Nice work, but I get an error if I try to read a file a second time. Analysing your code I found out, that you don't close the .gif-file in the Gif.Main.vi.
Nevertheless I'm glad to use the code.
Thanks for sharing, nice piece of Code!
I was trying the Gif.Main.vi but it always give me an Array of 1 Image and not all images in the Gif,
I will try to figure out how to extract the other images so they can be played in a vi.
Amazing wireworking gem, thanks for sharing with us!
Great work, as has been noted above loading a file for the second time will return an error due to the file reference being locked from a previous read. The solution is to open the Gif.Main.vi and select the "readfile" case. Add a 'Close File.vi' from the 'File I/O' function palette.
Hey I've forked this on github, just letting you know.
Gave the credits in LICENSE and in Readme.
https://github.com/nlhnt/lv_gif_tricks