kara2004 Posted February 9, 2018 Share Posted February 9, 2018 Hi there, after installing the latest version I had to recompile a script which uses GDIplus-function to copy and resize images (jpg to bmp). I noticed that the new executable works no longer and started searching for the problem, which I found in function "_GDIPlus_EncodersGetCLSID()": it does not longer return a CLSID, so saving the output file can't be done (using "_GDIPlus_ImageSaveToFile" instead of "_GDIPlus_ImageSaveToFileEx" doesn't help, because it's internal CLSID-call doesn't return a CLISD, too). I reinstalled all versions back to 3.3.14.0, but they all work correct. Here's the relevant part of my code - extended with a debug output (_mbinfo): If Not @Compiled Then _consoleWrite("drawImage " & $iW & "x" & $iH) If _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImageIn, 0, 0, $iW, $iH) = False Then _gdiImageCopyCleanup($hImageOut, $hImageIn, $hGraphic, $hBMP) Return SetError(-14, 0, False) EndIf $CLSID = _GDIPlus_EncodersGetCLSID($ext) _mbInfo("HWND=" & $hImageOut & @CRLF & "OUTFILE=" & $sOutImage & @CRLF & "FUNC-CLSID=" & $CLSID & @CRLF & _ "GDI_EXTRACTED_EXT= " & __GDIPlus_ExtractFileExt($sOutImage) & @CRLF & _ "GDI-CLSID=" & _GDIPlus_EncodersGetCLSID(__GDIPlus_ExtractFileExt($sOutImage))) If $CLSID = "" Then _gdiImageCopyCleanup($hImageOut, $hImageIn, $hGraphic, $hBMP) Return SetError(-15, 0, False) EndIf If _GDIPlus_ImageSaveToFileEx($hImageOut, $sOutImage, $CLSID) = False Then _gdiImageCopyCleanup($hImageOut, $hImageIn, $hGraphic, $hBMP) Return SetError(-16, 0, False) EndIf _gdiImageCopyCleanup($hImageOut, $hImageIn, $hGraphic, $hBMP) If Not @Compiled Then _consoleWrite("End _GDIimageCopy2.") The debug output (contains GDI handle, output file, returned CLSID from my code, native extracted extension and CLSID from GDI-include) returns from v 3.3.14.0 to 3.3.14.2 valid output, e.g. HWND=0x067F2F70 OUTFILE=D:\temp\test.bmpFUNC-CLSID={557CF400-1A04-11D3-9A73-0000F81EF32E} GDI_EXTRACTED_EXT= bmpGDI-CLSID={557CF400-1A04-11D3-9A73-0000F81EF32E} After installing current version 3.3.14.3 the message box only returns HWND=0x04A12F70 OUTFILE=D:\temp\test.bmpFUNC-CLSID= GDI_EXTRACTED_EXT= bmpGDI-CLSID= Is this a problem of the new version or can anybody give me a hint to keep my code running in the latest autoit-version. Thanks kara2004 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 9, 2018 Moderators Share Posted February 9, 2018 kara2004, You particularly need the WinAPIConv file. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
kara2004 Posted February 10, 2018 Author Share Posted February 10, 2018 Hi Melba23, checked out the new version with the fixed include files - image copy now works fine. New versions always bring bugs with them, so no apologies needed (mea culpa, too - didn't recognize the "3.3.14.3 Fixes"-post from you). Thanks to you for your quick solution and greetings to you and all who keep AutoIt running. kara2004 mLipok 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now