script - https://www.autoitscript.com/forum/topi ... using-gdi/
Here is what I've done so far but even the first dllcall doesn't seem to return correctly
commented code is the autoit stuff
Code: Select all
;$hImage = _GDIPlus_ImageLoadFromFile($Gif) ;seems to be loading bitmap
hImage := Gdip_CreateBitmapFromFile("imagetest.gif")
;$tDL = DllStructCreate($tagGUID) ;not sure the exact setup but I believe its varsetcapacity
;$pDimensionIDs = DllStructGetPtr($tDL) ;not sure
;$GFDC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "ptr", $hImage, "int*", 0)
GFDC := DllCall("gdiplus\GdipImageGetFrameDimensionsCount", "ptr", hImage, "int*", 0) ;returns 0
/* untested past this point since GdipImageGetFrameDimensionsCount returns 0
; Get the FrameDimensionsList , which fills the GUID struct by passing the GUID pointer and the FrameDimensionsCount.
; DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsList", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $GFDC[2])
DllCall("gdiplus\GdipImageGetFrameDimensionsList", "ptr", hImage, "ptr", pDimensionIDs, "int", GFDC[2])
; Get the FrameCount of the loaded gif by passing the GUID pointer
; $GFC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameCount", "int", $hImage, "ptr", $pDimensionIDs, "int*", 0)
DllCall("gdiplus\GdipImageGetFrameDimensionsList", "ptr", hImage, "ptr", pDimensionIDs, "int", GFDC)
GFC := DllCall("gdiplus\GdipImageGetFrameCount", "ptr", hImage, "ptr", pDimensionIDs, "int*", 0) ;returns 7
*/
;Selecting frame
;DllCall($ghGDIPDll, "int", "GdipImageSelectActiveFrame", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $i)
INDEX := 5 ;example
DllCall("gdiplus\GdipImageSelectActiveFrame", "ptr", hImage, "ptr", pDimensionIDs, "int*", INDEX)