Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

Animated GIF on Front Panel

In my Architectures presentation I gave at the last NOCLUG meeting the first slide had animated GIFs that moved across the front panel.  Someone came up and asked how I did that after the meeting so I thought I would post a quick example.  This is a trick I learned by watching a presentation that Jonathan Cohn of Bloomy Controls gave at NI week on how to improve GUI's.  See the attached example.  All that I did was find an animated GUI that I liked, you can find these by the dozen online and one place I recommend looking is here http://www.heathersanimations.com/animalsone.html .  Download your GIF and then use it to create a custom control.  I chose to use the "Classic Flat Round Button" because it doesn't have any of the fanciness of the buttons on the Modern palette.  Once you have dropped the button on your front panel, right click and go to Advanced > Customize.  This will open a new window where you can modify the control.  In the top left of this Control window, where the run arrow usually is, you will see a wrench, click the wrench and it will turn into a pair of tweezers.  Now we can dissect the control and alter its different layers (this part is easiest with the Classic control as it has fewer layers to worry about).  Right click the control and select "Import From File", and import the GIF.  Now you have imported your animated GIF.  Click the tweezers, click the button and you will see the other state still shows the original button image.  Now click the wrench and import the GIF again.  Now if someone clicks on the new control they will always see the GIF and never the default image.  Save your control and drop it on the Front Panel of a VI.  From here you can take a look at the example to see how to make it move.  Pretty simple, maybe useless, but cool nonetheless.   This example is done in LabVIEW 2009.  I can roll it back to 8.6.1 if needed.
CLA, CLED, CTD,CPI, LabVIEW Champion
President at Composed Systems
Using LV 2016, 2015, 2014


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 1 of 10
(13,244 Views)
9 REPLIES

Re: Animated GIF on Front Panel

Cool!

I'm now going to have to think of an application!

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
0 Kudos
Message 2 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

can you send me 8.6 version..?

Regards,
Balaji DP
0 Kudos
Message 3 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

Hi all!

I'm trying to customize a boolean with aa animated gif, but when I import tha animated gif to the control, LabView displays the following error message: Corrupt file or invalid picture type - File used by another application - Not enough memory.

But the same file opens normally in IE ou FileFox.

Can anyone give me a suggestion?

Is there a recommend site to generate animated gif?

Thanks for the help in advance.

0 Kudos
Message 4 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

Hi robertocsp, I havent seen this error message before when importing animated GIFs.  If you are able to share your GIF with me I can take a shot at customizing a boolean for you.

CLA, CLED, CTD,CPI, LabVIEW Champion
President at Composed Systems
Using LV 2016, 2015, 2014


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 5 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

I have seen this many times.  Apparently to LabVIEW not all animated GIFs are created equal!  I don’t know enough about animated GIFs and LabVIEW’s rendering of them to tell you what the issues are, but I have seen about 1/3 of animated GIFs cause that error.  I have not been able to get around it.  I know of no way to re-render the GIFs for LabVIEW to understand.  I do know that this site (http://tools.dynamicdrive.com/animatedgif) works well to create animated GIFs for LabVIEW.  It also maintains the fidelity of the images quite well, is free, and is very easy to use.

0 Kudos
Message 6 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

Hi mdkraft!

Unfortunately this site generates an output gif file with black background and I'd like a transparent one.

Do you suggest any other site to create a gif file?

0 Kudos
Message 7 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

Hmmmm...I am not convinced any of the online generators will support transparency, but you could try.  Unfortunately I have no suggestions for you.  I have used a couple of freeware products (Beneton Movie GIF and Easy GIF Animator).  Neither imports to LabVIEW without the error.  I would search for online animated GIF creators and test several of them out for transparency and import into LabVIEW.

0 Kudos
Message 8 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

I usually create my own  using GIMP.  It's not as hard as it sounds and they seem to import fine into LabVIEW.

CLA, CLED, CTD,CPI, LabVIEW Champion
President at Composed Systems
Using LV 2016, 2015, 2014


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 9 of 10
(7,039 Views)

Re: Animated GIF on Front Panel

That's right! You all are correct mdkraft.

The problem is the transparent background.

When I changed background color to white, I was able to import gif animated image without problem.

0 Kudos
Message 10 of 10
(7,039 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.