LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Gif aninimation

I want to make simple animation and be able to stop it and run it by demand

I try to add gif into simple vi using Activex container (like i seen arlier at the forum)
i dwonload from http://www.jcomsoft.com/anigif.htm (ocx gif controller)
install it into Activex container(rigth click ->selecting "from fille" and pressing on ocx file)

According to instruction-> press right click onto Activex Container ->properties->selecting the gif fille
- but there is no mention about selecting any files?!?!

Mybe i was wrong mybe i forgetting something i don't know

Thank's any help
eyal



 
0 Kudos
Message 1 of 41
(12,034 Views)
If you want to show/hide a gif image, you can change the image of a control (by customizing the control) and make it visible of invisible. See attached VI.

See link to know how to customize a Boolean control.
BR
0 Kudos
Message 2 of 41
(12,001 Views)

I never found a method to CONTROL gif's.

In post #94 of this thread I posted some code that was a community project to allow easy inclusion of emoticons into forum postings. It has a an Import function that lets you grab images from gif's and adds them to a palette from which you can choose your emoticon. You may wat to review that thread for the code and the associated instructions since I beleive some of the techniques I used in that code code be of use to you.

Take a look at the code that does the Import.

Take care,

Ben



Message Edited by Ben on 08-07-2008 07:51 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 41
(11,994 Views)

Hi eyal,

you can read the gif file as binary data and create the different images which are in this file to show them in labview, maybe in a picture ring. You can then use a loop to show it. You can also read the time between the single pictures to connect it to a wait function. If you are able to show all pictures in a picture ring then you can use events to start or stop the animation.

 

Hope it helps.

Mike 

Message Edited by MikeS81 on 08-19-2008 07:56 PM
Message 4 of 41
(11,934 Views)

Mike wrote

 

"you can read the gif file as binary data and create the different images which are in this file to show them in labview, ..."

 

I have never cracked that nut. Do you have code that will read (or even better write) a gif?

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 41
(11,911 Views)

Hi Ben,

i´m currently writing a code to read gif files. I need some more tests and if i´m ready i will post it here. I know your icon consists of 4 states. Smiley Wink I think a can post it at weekend.

Mike

Message Edited by MikeS81 on 08-20-2008 02:54 PM
Message 6 of 41
(11,909 Views)

Mega-stars for you Mike!

 

That would make a nice Nugget. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 41
(11,899 Views)

Image Toolbox support read/write gif file.

    http://www.geocities.com/gzou999

 

Animated gif has a different file format though.

George Zou
Message 8 of 41
(11,882 Views)

I have personally used a pict ring for controlled animation.  It works very well (my first effort was the electric discharge on the load screen of the NI-SCOPE Soft Front Panel, version 1.0).  The major problem to using this is that there does not appear to be a programmatic way to load the images.  This limits its usefulness to about ten frames (depending on your patience), but I have never really needed more than that.

 

As mentioned earlier, you control this by changing the value of the pict ring in a time fashion.  Event timeouts or a timed loop would probably work best.  I did this so long ago I used a while loop and delay.

 

Note that if you use an animation while loading code from disk (i.e. a load screen), you should load your code bottom up and one VI at a time to allow the UI time to animate your image.  Otherwise, the UI thread will be essentially locked out by the load, leading to no real animation.

Message 9 of 41
(11,847 Views)

Hi eyal,

attached you will find the vi´s which shows what i meant. Open the Gif.Example.vi.

 

Hi Ben,

it´s not a nugget, but here is the code. Smiley Happy

 

 

I write also a LV71 version, i will upload it soon. 

Hope it helps.

Mike

Message 10 of 41
(11,814 Views)