Jump to content
Bas de Jong

OpenG Read GIF File slow to execute?

Recommended Posts

Hello, I'm trying to display an animated GIF on the front panel. This gif should be loaded programmatically based on some user event. My google search led me to use the OpenG Read GIF File (Animated)__ogtk.vi file. However, loading a GIF is extremely slow. It takes almost 20 seconds to execute the vi when I load the attached GIF (I found randomly on the internet). Is this normal? And if so, is there a way to load a gif faster? Because I need to load several and I cannot afford to load maybe 2 minutes only for the gifs.

GIFexample.gif

Edited by Bas de Jong

Share this post


Link to post
Share on other sites

The LWZ Unpack algorithm is very slow in the OpenG implementation.
I found this post over in the NI forums and tested it with your image... much faster.

https://forums.ni.com/t5/Example-Program-Drafts/Read-GIF-File/ta-p/3514726

Edit: Set image to "-1" to load them all:

 

Edited by Francois Normandin
  • Like 1

Share this post


Link to post
Share on other sites

It might also be possible to load a GIF into a .Net PictureBox.  I have some demo code for this but for some reason I get a .Net exception but others online have said it is possible.

Share this post


Link to post
Share on other sites
15 hours ago, Francois Normandin said:

The LWZ Unpack algorithm is very slow in the OpenG implementation.
I found this post over in the NI forums and tested it with your image... much faster.

https://forums.ni.com/t5/Example-Program-Drafts/Read-GIF-File/ta-p/3514726

Edit: Set image to "-1" to load them all:

Nice.

It's screaming out to be made into an xControl, IMO. 

Share this post


Link to post
Share on other sites
43 minutes ago, ShaunR said:

It's screaming out to be made into an xControl

I said xControl first... 😏

 The solution of the Program Drafts above is for sure a lot more developed - all the decoding of gif in G, honouring the time lags between frames, etc. etc.

Share this post


Link to post
Share on other sites
27 minutes ago, ensegre said:

I said xControl first... 😏

 The solution of the Program Drafts above is for sure a lot more developed - all the decoding of gif in G, honouring the time lags between frames, etc. etc.

Well done for volunteering I look forward do testing it :D

Edited by ShaunR

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.