Jump to content

Animated_Gif_Library


wolf9228
 Share

Recommended Posts

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

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

 

Link to comment
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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

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

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...