Bonjour,
An example with FreeImage.dll :
Code:
; Exemple : Type , largeur et hauteur d'une image
; AutoHotkey www.autohotkey.com
; FreeImage freeimage.sourceforge.net
;
; Functions : Voir FreeImage.pas et FreeImage3110.pdf
; Variables
FreeImage_dll = C:\gimp_2_6_5\lib\FreeImage\FreeImage.dll
image_a_analyser = C:\images_gimp\bebe.jpg
DLL_open := DllCall( "LoadLibrary" , "Str", FreeImage_dll )
; MsgBox, 0, DLL_open, %DLL_open%
; FreeImage_Initialise_Function = %FreeImage_dll%\_FreeImage_Initialise@4
; FreeImage_Initialise := DllCall(FreeImage_Initialise_Function , "Int", "0")
; MsgBox, 0, FreeImage_Initialise, %FreeImage_Initialise%
FreeImage_GetFileType_Function = %FreeImage_dll%\_FreeImage_GetFileType@8
FreeImage_GetFileType := DllCall(FreeImage_GetFileType_Function , "Str", image_a_analyser , "Int", 0)
; MsgBox, 0, FreeImage_GetFileType, %FreeImage_GetFileType%
FreeImage_Load_Function = %FreeImage_dll%\_FreeImage_Load@12
dib_image := DllCall(FreeImage_Load_Function , "Int", FreeImage_GetFileType, "Str", image_a_analyser, "int", 0)
FreeImage_GetWidth_Function = %FreeImage_dll%\_FreeImage_GetWidth@4
width := DllCall(FreeImage_GetWidth_Function , "Int", dib_image)
FreeImage_GetHeight_Function = %FreeImage_dll%\_FreeImage_GetHeight@4
height := DllCall(FreeImage_GetHeight_Function , "Int", dib_image)
DLL_close := DllCall("FreeLibrary", "UInt", DLL_open)
; MsgBox, 0, DLL_close, %DLL_close%
MsgBox, 0, %image_a_analyser% : type-width/height , %FreeImage_GetFileType% - %width% / %height% pixels