Please ignore... I was using GDip in another part of the script which then got shut by my last line. Duh. Silly me.
-----------------------------------------
I have a captured bitmap on the clipboard and am trying to use the following to save it to a file:
Code:
FileSelectFile selectedFiles, , %Config_general_getFileFrom%, Save to, *.jpg; *.bmp, *.png
if (selectedFiles = "")
Return
if ( FileExist(selectedFiles) )
{
Msgbox, 1,, File exists. Overwrite it?
IfMsgBox Cancel
Return
}
Gosub, saveSettings
pToken := Gdip_Startup()
Gdip_SaveBitmapToFile(pBitmap := Gdip_CreateBitmapFromClipboard(), selectedFiles)
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
Return
The file is created properly and can be opened with any image editing software but the first time the resulting .jpg is accessed it crashes my AHK script which is persistent. Am I not using the library properly?
Relayer