Sign in to follow this  
Followers 0
wolf9228

Animated_Gif_Library

16 posts in this topic

#1 ·  Posted (edited)

Posted Image

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("OnExitFunc", "_Exit")
Global $DllOpen =  DllOpen("Animated_Gif_Library.dll")
$hGUI = GUICreate("GDI+", 600, 100)
GUISetState()

$hBitmap1 = GdipLoadImageFromFile( "world2.gif")
AnimatedGif( $hBitmap1 ,$hGUI, 0, 0)
$hBitmap2 = GdipLoadImageFromFile( "alladdin.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 100, 0)
$hBitmap2 = GdipLoadImageFromFile( "clogo.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 200, 0)
$hBitmap2 = GdipLoadImageFromFile( "elephnt2.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 300, 0)
$hBitmap2 = GdipLoadImageFromFile( "Elephnt1.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 400, 0)
 
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func GdipLoadImageFromFile( _
$filename = 0 , $image = 0  )

$DllCall = DllCall($DllOpen , "int:cdecl" , "GdipLoadImageFromFile" , _
"wstr" , $filename , "int*" , $image  )
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func AnimatedGif( _
$hBitmap = 0 , $Whwnd = 0  , $X = 0 , $Y = 0 )

$DllCall = DllCall($DllOpen , "int:cdecl" , "AnimatedGif" , _
"hwnd" , $hBitmap, "hwnd" ,$Whwnd, "int" , $X , "int" , $Y )
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc


Func PauseAnimatedGif($hBitmap , $Bool)
$DllCall = DllCall($DllOpen , "int:cdecl" , "PauseAnimatedGif" , _
"hwnd" , $hBitmap, "int" ,$Bool)
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func GplusShutdown()
$DllCall = DllCall($DllOpen , "int:cdecl" , "GplusShutdown")
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func _Exit()
GplusShutdown()
DllClose($DllOpen)
EndFunc
Edited by wolf9228

صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites



Posted Image

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("OnExitFunc", "_Exit")
Global $DllOpen =  DllOpen("Animated_Gif_Library.dll")
$hGUI = GUICreate("GDI+", 600, 100)
GUISetState()

$hBitmap1 = GdipLoadImageFromFile( "world2.gif")
AnimatedGif( $hBitmap1 ,$hGUI, 0, 0)
$hBitmap2 = GdipLoadImageFromFile( "alladdin.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 100, 0)
$hBitmap2 = GdipLoadImageFromFile( "clogo.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 200, 0)
$hBitmap2 = GdipLoadImageFromFile( "elephnt2.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 300, 0)
$hBitmap2 = GdipLoadImageFromFile( "Elephnt1.gif")
AnimatedGif( $hBitmap2 ,$hGUI, 400, 0)
 
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func GdipLoadImageFromFile( _
$filename = 0 , $image = 0  )

$DllCall = DllCall($DllOpen , "int:cdecl" , "GdipLoadImageFromFile" , _
"wstr" , $filename , "int*" , $image  )
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func AnimatedGif( _
$hBitmap = 0 , $Whwnd = 0  , $X = 0 , $Y = 0 )

$DllCall = DllCall($DllOpen , "int:cdecl" , "AnimatedGif" , _
"hwnd" , $hBitmap, "hwnd" ,$Whwnd, "int" , $X , "int" , $Y )
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc


Func PauseAnimatedGif($hBitmap , $Bool)
$DllCall = DllCall($DllOpen , "int:cdecl" , "PauseAnimatedGif" , _
"hwnd" , $hBitmap, "int" ,$Bool)
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func GplusShutdown()
$DllCall = DllCall($DllOpen , "int:cdecl" , "GplusShutdown")
Return SetError ( $DllCall[0], 0 , $DllCall[UBound($DllCall)- 1])
EndFunc

Func _Exit()
GplusShutdown()
DllClose($DllOpen)
EndFunc
When I try to run the script, AutoIT is crashing: !>13:11:02 AutoIT3.exe ended.rc:-1073741819

Btw, your are quite silent with the description of your work!

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

I didn't get any errors... No animated gifs, just stationary pics


Giggity

Share this post


Link to post
Share on other sites

When I try to run the script, AutoIT is crashing: !>13:11:02 AutoIT3.exe ended.rc:-1073741819

Btw, your are quite silent with the description of your work!

UEZ

http://translate.google.com/

I can not write in English

But I can understand the words written

Try this version of the library

Thank you


صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites

I didn't get any errors... No animated gifs, just stationary pics

Thank you


صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites

http://translate.google.com/

I can not write in English

But I can understand the words written

Try this version of the library

Thank you

Same crash again:

>Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "D:\Coding\AU3\GFX\GDI\Animated GIF\Animated_Gif.au3"

!>21:00:28 AutoIT3.exe ended.rc:-1073741819

+>21:00:29 AutoIt3Wrapper Finished

>Exit code: -1073741819 Time: 4.098

:D UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Works Great for me. Nice work! I know I will use it in many scripts. Thank You for sharing.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Mmmmhhh, I'm using Vista x32 and AutoIt v3.3.0.0 and it is crashing when I'm starting it.

Strange, that I'm the only one with the crash ... :D

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Thank you

Is that the intended function? Just stationary pictures of the gifs?


Giggity

Share this post


Link to post
Share on other sites

Works fine for me on XP SP2..

Share this post


Link to post
Share on other sites

It works for me, nice!

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

doesn't work for me (XP SP3+VistMizer): just static images and invisible after i minimized the window.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
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
Sign in to follow this  
Followers 0