LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you create an animated gif in LabVIEW?

Hello,

 

I was wondering if there was a function within LabVIEW which can create an animated .gif file. Most of my online searches result in "how tos" for putting pre-existing gifs on the front panel.  I don't need to be able to display the gif anywhere in LabVIEW (FP nor BD), I'd just like to be able to create the file.  The "write gif file" vi which is buried deep in the LabVIEW program files did not seem to be what I'm looking for (why is that little guy so buried anyway?).

 

I have an array of all the image data I want to put in the image (which were all created in LabVIEW.  They are all FP control images).  It's looking like LabVIEW can't do this, so right now I just have been saving them all to a folder as png's so that I can export them to another program to make the animated image elsewhere.  I'd prefer if LabVIEW could just do it though, so is there a way?

 

I'm using Labview 2012 SP1, but I do have access to a few newer versions if that's what it takes.

 

Thanks

0 Kudos
Message 1 of 7
(7,356 Views)

Hi guy,

 

the easiest solution is to use a 3rd party tool to convert your folder of PNGs into an animated GIF. It's just one SystemExec call…

 

why is that little guy so buried anyway?

There was a time when GIF was protected by patents. At that time support for GIF was removed (or minimized) in a lot of software packages. When the patents were removed everybody used PNG instead of GIFs. So why do you need animated GIFs at all?

For still images you could use PNG, for animated videos you can use MNG - or any other video container you like to…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(7,333 Views)

Yes and no.

 

Easily, with a few inbuilt VIs- no. I see no GIF support on the palette.

 

You could go find the file format for GIF and implement a routine to write it from LabVIEW. It just depends on your skill level and the effort you're prepared to put in.

Message 3 of 7
(7,328 Views)

GerdW

>> the easiest solution is to use a 3rd party tool to convert your folder of PNGs into an animated GIF. It's just one SystemExec call…

 

That's what it was looking like the answer would be.  Thanks.

 

I'm basically creating a series of images on an intensity graph.  As they are generated, I'm grabbing the image data and throwing them in an array.  I hadn't thought of looking into making a video.  I guess I figured a GIF would be simplest (I recently made some gifs in matlab and it was pretty simple, I was in that mindset).

 

ToeCutter

>> You could go find the file format for GIF and implement a routine to write it from LabVIEW

 

That seems a bit beyond me and probably not worth the time it would take me to figure it out.  This GIF isn't really that important for what I'm doing. Thank you though.

0 Kudos
Message 4 of 7
(7,313 Views)

I haven't looked at the code there in years, but I believe this should do what you want - http://forums.ni.com/t5/LabVIEW/Pixelmap-or-image-from-3D-control/m-p/486128?query.id=256833#M233272


___________________
Try to take over the world!
Message 5 of 7
(7,269 Views)

Hello Verywiseguy,

 

this could also help

GIF Animations in LabVIEW

best regards
Alexander
0 Kudos
Message 6 of 7
(6,564 Views)

There is this:

vi.lib\picture\gif.llb\Write GIF File.vi

but it doesn't support animation.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 7
(6,560 Views)