Jump to content

UDF Ani.au3 - FINALLY ! Animated Gifs and Icons for AutoIt ! with GDIplus


jennico
 Share

Recommended Posts

i made a really rough and dirty workaround for the above gif: (well, it's really fun to play around with it) :)

deleted

somehow it is on the right way to get working....

anyone out there or am i on my own ?

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

sorry, i had to edit the above code. i forgot the gif splitting. :) does it work now ?

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

For it t o work for me I had to change to @ScriptDir & "\PictureEx.gif" but it does work good. I noticed it was a bit jumpy then I seen in the results that it splits each frame out of the gif and runs each one. This would cause the jump I think. Still another great code from jennico! Thanks :)

Link to comment
Share on other sites

I DID IT FINALLY !!!!!

gdiplus does it all, and nearly automatically !!!!

look:

deleted

all the gathered data is not necessary, the only data it needs is the frame rate (duration) !!!!!!!!!!

how nice !!!! going to make the udf now.

j. :):party::idea::P

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

i can't believe my eyes, how beautiful after all that work !!! :):party:

i wonder if i can use the image data directly, without writing temp files.

i guess so

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

yes, of course, and i will use timers in the udf instead of sleep.

but i think i do not need to write temp files at all, i can just use the image data. just have to try it out.

and the best thing: this method will work with all kind of files and as well with .ani.

thank you gseller, for your always very kind support.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

v 1.5 updated.

integration of gdiplus was a little bit harder than i expected. i had to rewrite most of the script. be careful, some functions now afford the control handle instead of the id, because the id is not unique and causes problems.

some additions will follow time after time.

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

well, friends, v 1.6 is born. nothing really new, but one or the other thing improved.

this is another very interesting gif, load it into the example script (3rd example ~ GDIplus):

Posted Image

and ... sure you know this one :)

Posted Image

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

  • 2 weeks later...

Well i know this tread has aged some but i must comment.I have been using another method to show gifs,and today it wouldn't show what i wanted correctly.I searched and found this one,PERFECT!!

jennico great job it solved my gif problem

:D:D

Quick question for anyone who may read this.What would be causing the gif to leave trail of images?

Edited by froufrou
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

I'm trying to use this library for a script, but the compiled exe doesn't work and a message appear: Badly formatted "Func" statement.

It doesn't appear running the not compiled script, and not appear also using a compiled exe with a static image (added with GUICtrlCreatePic) instead of a animated gif (in the script I used only _Ani_GetGifSize and GUICtrlCreateGif).

Do you know what is the problem? How can I find what is the function that cause the error? Thanks!

SFTPEx, AutoCompleteInput_DateTimeStandard(), _ImageWriteResize()_GUIGraduallyHide(): some AutoIt functions.

Lupo PenSuite: all-in-one and completely free selection of portable programs and games.

DropIt: a personal assistant to automatically manage your files.

ArcThemALL!: application to multi-archive your files and folders.

Link to comment
Share on other sites

I'm trying to use this library for a script, but the compiled exe doesn't work and a message appear: Badly formatted "Func" statement.

It doesn't appear running the not compiled script, and not appear also using a compiled exe with a static image (added with GUICtrlCreatePic) instead of a animated gif (in the script I used only _Ani_GetGifSize and GUICtrlCreateGif).

Do you know what is the problem? How can I find what is the function that cause the error? Thanks!

I have just tried this UDF too and no animations work for me using the example except for the running horse. I am using XP SP3. I don't get any error messages.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 2 months later...

hi, i use this udf for creating gifs.But how do i delete this gif? _ani_deleteanimation? or others?

i assume, you use GUICtrlCreateGif(). delete the control with GuiCtrlDelete(). it's a native pic control, so u can use any GuiCtrlSet... with GUICtrlCreateGif(). please refer to description:

#cs
    ;#=#Function#================================================#
    ;#  Name ..........: GUICtrlCreateGif( $hWnd, $hfile, $x, $y [, $w [, $h [, $istyle [, $iexstyle [, $hspeed [, $hslow ]]]]]] )
    ;#  Description ...: Creates an animated .gif based GUI Control.
    ;#  Parameters ....: $hWnd = The GUI handle as returned by GuiCreate().
    ;#           $hfile = The .gif file to be set.
    ;#           $x = The left side of the control. If -1 is used then left will be computed according to GUICoordMode.
    ;#           $y = The top of the control. If -1 is used then top will be computed according to GUICoordMode.
    ;#           $w = [optional] The width of the control (default is the previously used width).
    ;#           $h = [optional] The height of the control (default is the previously used height).
    ;#           $istyle = [optional] Defines the style of the control. See GUI Control Styles Appendix. Default (-1) : $SS_NOTIFY. Forced style : $SS_BITMAP.
    ;#           $iexstyle = [optional] Defines the extended style of the control. See Extended Style Table. Default = -1
    ;#           $hspeed = [optional] The animation speed (Default = 1).
    ;#           $hslow = [optional] If flag is set to 1, a slower but more secure gif decoding will be processed. See remarks. Default = 0
    ;#  Return Value ..: Success: Returns the identifier (controlID) of the new control.
    ;#           Failure: Returns 0.
    ;#  Author ........: jennico
    ;#  Date ..........: 20.05.09
    ;#  Remarks .......: [u]The Gifcontrol is a native Pic control. Please refer to GUICtrlCreatePic() in helpfile[/u]
    ;#           Alternatively you may use GUICtrlCreatePic() with GUICtrlSetAni()
    ;#           Due to the countless options and variations of a gif file, not every file can be displayed correctly (even IE is not able).
    ;#           The following specifications are supported: both, GIF87a and GIF89a format, frames, frame rates (duration), interlacing, transparency, tiling, overlaying, individual frame sizes. No stopping, no user input.
    ;#           The fastest decoding works for "GIF89a" formatted gifs with Graphic Context Extension (GCE) block. This is true for 98% of the animated gif files.
    ;#           "Slow Mode" does NOT mean that the animation is slower, it means that the initialization (splitting) of the gif file is more precise and therefore slower. The animation speed is the same !
    ;#           If the display of the animation fails, try to use the 'hslow' flag set to 1. This may work with some exotic animated gifs.
    ;#           If the display of the animation still fails, use GUICtrlCreateGifEx. This should work with all kinds of gifs.
    ;#           If a file is not supported, it will be displayed without animation and @error set to 1.
    ;#  Related .......: GUICtrlCreateGifEx(), GUICtrlSetAni()
    ;#  Example .......: yes
    ;#===========================================================#

cheers j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

  • 3 weeks later...

well, it's a native pic control, so you can use GuiCtrlSetOnEvent or whatever you always use in your scripts.

cheers j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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