Jump to content

Recommended Posts

Posted (edited)

provides .gif and .ani animation to AutoIt, now supports all gif formats (GIF87a and GIF89a).

v1.6 now even displays dynamic gifs with GDIplus.

Cute and nice additions to your scripts. i hope you like it. Please leave comments.

This is another final and maybe last version, as far as i can see.

The UDF: _Ani.au3

[autoit]#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#cs

;#=#INDEX#============================================================================================================================#

;# Title .........: _Ani.au3

;# Description ...: Animated Controls (.ani/.gif) for AutoIt.

;# Date ..........: 31.05.09

;# Version .......: 1.6 (some minor bugs fixed, added _Ani_SetGifExFrame)

;# History .......: 26.05.09 v 1.5 (added GDIplus based functions - now all GIFs should be working ! :) , using controlhandles instead of control IDs, bug fixing)

;# 23.05.05 v 1.4 (added _Ani_GetGifInfo(), some errors fixed, accelerated decoding, code cleaning)

;# 22.05.09 v 1.3 (GIF87a support, slow mode for problematic gifs, minor improvements)

;# 21.05.09 v 1.2 (improved timer handling, negative speed, immediate speed reaction, functions added, reduced number of callbacks, minor corrections, code designed)

;# 20.05.09 v 1.1 (added gif support, included timer functions, minor corrections)

;# 19.05.09 v 1.0

;# Author ........: jennico (jennicoattminusonlinedotde)

Edited by jennico
  Reveal hidden contents

 

Posted

thank you gseller, you are always the first. how are you doing that ?

j. :)

  Reveal hidden contents

 

Posted

i think i am going to add gif animation. doesn't seem more complicated than ani. i think people would enjoy that.

j.

  Reveal hidden contents

 

Posted

I think gif animation would be better just because it is an more available media for someone wanting animation. Good idea jennico...

Posted (edited)

no flickers here.

Edit: there is some flickering on the button and the slider. this is caused by the changing GUI Icon. the controls themselves do not flicker. it should be possible to prevent the client area from repainting on changing GUI Icon.

Edited by jennico
  Reveal hidden contents

 

Posted (edited)

updated script now supports gif animations. quite satisfying, no flickering. No ?

there is a vast variety of gif formats out there, so it will not display every gif file. please send me your not working files so i can improve the code !

moreover i will have to work on the timer functions and add more options. so keep on commenting here until i'm done with this !

j.

Edited by jennico
  Reveal hidden contents

 

Posted

Very good jennico!

But the flickering is really there...

P.S

About the OnAutoItExit function - It is better to use some unique function name and call other function that might be set by some other UDF, here is an example of how you can do it:

#Region;--------------------------Global declarations
Global $sOnAutoItExit_Opt = Opt("OnExitFunc", "_Ani_OnAutoItExit_Proc")

.....

.....

Func _Ani_OnAutoItExit_Proc()
    Call($sOnAutoItExit_Opt)
    
    FileDelete($ani_TempDir & "*")
EndFunc ;==>_Ani_OnAutoItExit_Proc

BTW: this is how it should be done by every UDF that uses OnAutoItExit function (to avoid conflicts with other UDFs).

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted
  Quote

See the new AutoIt beta

I've seen it, thanks, but it's still beta, we need to make stuff compatible with current versions :) - And besides that, this method should work correctly even with the new version.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

thx.

well, the onexit thing does not work if you use another Opt("OnExitFunc", "__") in the parent script, because the include is executed before the parent script. to make it securely work, the parent script must as well process the same procedure you suggest.

but it's sure a good idea to rename the function.

j.

  Reveal hidden contents

 

Posted

updated v 1.2. now several extensions and improvements, backward movement, timer handling now perfect. the coding is completed, the only thing left for me is to adapt the gif splitting for different file formats like GIF87a. please send or link me to gifs that do not work with my UDF.

thx :)

j.

  Reveal hidden contents

 

Posted

you really take the words out of my mind !

just before i was thinking to myself: what a small amount of lines for so much work ! the code looks so easy in the end.

thx. :)

j.

  Reveal hidden contents

 

Posted

That is the way good code looks, like it was there all the time and just a few lines to do so much. Mine is still in the 500 lines to start a GUI(joking). I always learn something from your code, that is why I jump when I see you have a new script to share...

Posted (edited)

i posted v 1.3.

this now supports GIF87a type gifs, too. the splitting is slower, but more precise. so i added the option to use the slow decoder for all types of gifs (flag $hslow=1).

there are still some few kinds of gifs left that cannot be displayed with proper animation. the gif standard allows random frames within the picture, overlaying each other and at any global position. in this way, for example, it is possible to make a figure move in front of a background frame without displaying the background in every single frame (overlaying). or you can tile an image. or interlace it. .... or make the animation wait for user input ...

of course, it is not possible to display all these kinds of gifs properly with the means of AutoIt. but for about 98% of the gif files, my UDF will do it.

i think this project is done now. i have a little thing left in my mind to be done, but it's minor.

so have fun everyone. i am proud for having been able to implement a real new thing to AutoIt !

j.

Edited by jennico
  Reveal hidden contents

 

Posted (edited)

updated to v 1.4. i had several bugs to fix and added a gif analyzing function. this will help interested users to understand this complicated file format.

here is a gif file that cannot be displayed by my UDF. (yes it can ! by now)

Posted Image

if you load it to the example file and click yes to more info, you will see the problem.

maybe i will give it a try, but that's really hard work to do.

cheers j.

Edited by jennico
  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...