Strydr Posted August 24, 2018 Share Posted August 24, 2018 (edited) First, I keep coming across references saying that it's already been asked and answered: and I go to posts that discuss everything except what I'm looking for and they all seem to be from 2007, or earlier, and seem to be pre-GDI+! Basically, after a couple of hours of digging around, I can't find anything that actually works and I'm getting really confused. I just want to convert a 32x32 jpg file to a 32x32 bmp file. That's it. No re-sizing, no complications, original file is local and the destination is local. And no external programs: from what I gather, GDI+ should be more than capable of what I need? Help, please? Thank you! ps: to be clear, this is JPG to bmp, NOT bmp to jpg. Edit: it looks like I should be able to use "_GDIPlus_ImageSaveToFileEx" with "$sCLSID = _GDIPlus_EncodersGetCLSID("JPG")" for: $sCLSID = _GDIPlus_EncodersGetCLSID("JPG") _GDIPlus_ImageSaveToFileEx($Image.jpg, $Image2.bmp", $sCLSID,) Edit2: Nope. Edited August 24, 2018 by Strydr Link to comment Share on other sites More sharing options...
Deye Posted August 24, 2018 Share Posted August 24, 2018 Hi Strydr, maybe there are much simpler or a cleaner way of doing it but this is what i have tried that seems to work you can try testing it on from here to suite your needs $sFilename = "" _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromFile($sFilename) $iWidth = _GDIPlus_ImageGetWidth($hBitmap) $iHeight = _GDIPlus_ImageGetHeight($hBitmap) $hBitmap_Resized = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) $hBMP_Ctxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Resized) _GDIPlus_GraphicsSetInterpolationMode($hBMP_Ctxt, $GDIP_INTERPOLATIONMODE_HIGHQUALITYBICUBIC) _GDIPlus_GraphicsDrawImageRect($hBMP_Ctxt, $hBitmap, 0, 0, $iWidth, $iHeight) $hHBitmap = _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap_Resized) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) $hClone = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iWidth, $iHeight, $GDIP_PXF24RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile($hClone, @ScriptDir & "\GDIPlus_Image.bmp") _GDIPlus_ImageDispose($hClone) _GDIPlus_ImageDispose($hImage) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_BitmapDispose($hBitmap_Resized) _GDIPlus_GraphicsDispose($hBMP_Ctxt) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_Shutdown() Deye Xandy and reida 2 Link to comment Share on other sites More sharing options...
UEZ Posted August 24, 2018 Share Posted August 24, 2018 3 hours ago, Strydr said: I just want to convert a 32x32 jpg file to a 32x32 bmp file. That's it. No re-sizing, no complications, original file is local and the destination is local. And no external programs: from what I gather, GDI+ should be more than capable of what I need? #include <GDIPlus.au3> _GDIPlus_Startup() Global Const $hImage_JPG = _GDIPlus_ImageLoadFromFile("MyJPG.jpg") _GDIPlus_ImageSaveToFile($hImage_JPG, "MyBitmap.bmp") _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() @Deye you can use the built-in function to resize the image -> _GDIPlus_ImageResize(), _GDIPlus_ImageScale() Deye 1 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 More sharing options...
Strydr Posted August 28, 2018 Author Share Posted August 28, 2018 @UEZ Thanks but this is to provide an icon for a "listview" so renaming a jpg to a bmp doesn't work, apparently it needs to be converted. @Deye I'm not having any luck getting this to work, but thanks. I'm doing a simple copy and paste, substituting my file names but I get no output file. Sorry this took me so long to get back to these answers but I was busy tracking down another bug that I introduced while trying to see if these would work. So, at this point, I'm still looking for an answer: thank you for the help! Link to comment Share on other sites More sharing options...
rudi Posted August 28, 2018 Share Posted August 28, 2018 Another approach might be to use IrfanView, portable edition, using its powerfull command line option set. Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
UEZ Posted August 28, 2018 Share Posted August 28, 2018 2 hours ago, Strydr said: @UEZ Thanks but this is to provide an icon for a "listview" so renaming a jpg to a bmp doesn't work, apparently it needs to be converted. When I want to rename a JPG file to BMP file why should I use GDI+? The example above will load the JPG and convert it automatically to a GDI+ internal bitmap format. _GDIPlus_ImageSaveToFile() will save / convert the loaded JPG file as BMP. 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 More sharing options...
Strydr Posted August 28, 2018 Author Share Posted August 28, 2018 (edited) @UEZ Sorry, I'm new and I know even less about GDI+. There's a good chance that my testing on this was flawed by my self-introduced bug and then I forgot and assumed that "savetofile" was just a fancy rename function. Serves me right for assuming. I will retest properly, thank you! Nope, still not working. No output. Same as the excerpt from Deye. This indicates that I've got something else wrong. This is what I pasted: Quote _GDIPlus_Startup() $hImage_JPG = _GDIPlus_ImageLoadFromFile($32bit_Icons) _GDIPlus_ImageSaveToFile($hImage_JPG, $32bit_Bmps) _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() On the assumption that the variables can't be used, I changed it to this: Quote _GDIPlus_Startup() $hImage_JPG = _GDIPlus_ImageLoadFromFile("C:\Users\Phantom\Desktop\SSLoader Project\Icons\32x32\test.jpg") _GDIPlus_ImageSaveToFile($hImage_JPG, "C:\Users\Phantom\Desktop\SSLoader Project\Icons\32x32\test.bmp") _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() The file I'm attempting to convert DOES exist however I get NO file output. What am I missing?!! Edited August 28, 2018 by Strydr Testing results Link to comment Share on other sites More sharing options...
ajag Posted August 29, 2018 Share Posted August 29, 2018 This works for me: #include <GDIPlus.au3> _GDIPlus_Startup() $hImage_JPG = _GDIPlus_ImageLoadFromFile("D:\Test\test.jpg") _GDIPlus_ImageSaveToFile($hImage_JPG, "D:\Test\test.bmp") _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() Sure you have write permissions at user Phantom's desktop? Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
UEZ Posted August 29, 2018 Share Posted August 29, 2018 (edited) @Strydr: What is the output in the console window when you run the script? #include <GDIPlus.au3> _GDIPlus_Startup() $hImage_JPG = _GDIPlus_ImageLoadFromFile("C:\Users\Phantom\Desktop\SSLoader Project\Icons\32x32\test.jpg") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hImage_JPG = ' & $hImage_JPG & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ConsoleWrite(_GDIPlus_ImageSaveToFile($hImage_JPG, "C:\Users\Phantom\Desktop\SSLoader Project\Icons\32x32\test.bmp") & ", error: " & @error & @CRLF) _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() Edited August 29, 2018 by UEZ forgot #include <GDIPlus.au3> 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 More sharing options...
Strydr Posted August 29, 2018 Author Share Posted August 29, 2018 (edited) @ajag Unfortunately, that didn't help. However, I've been hoist by that petard before so I've moved my project folder. No joy. Even made a "D:\test\test.jpg" to test with. Thank you, tho. @UEZ As per Ajag's idea, I've moved my project so I made one modification to your script to point to the new location of the test.jpg. The program is actually scanning 8 files so the error is repeated 8 times using the test.jpg file: Quote @@ Debug(2489) : $hImage_JPG = 0x08E612A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08E212A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08DE12A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08EB12A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08E212A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08D612A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08DA12A0 >Error code: 0 False, error: -1 @@ Debug(2489) : $hImage_JPG = 0x08D712A0 >Error code: 0 False, error: -1 This seems to indicate that my test file is the problem but I have no idea what this means. I'll try another test file... Edit: nope, another jpg renamed to "test" has the same result. My frustration is indicating that I'm missing something simple but danged if I know what! Edit2: I'm running a ShellExecute on the jpg to ensure that the path and file are there and accurate: I get my test jpg popping up all 8 times. Edit3: I'm now running these scripts separately. No change. No results. Console output is: Quote @@ Debug(4) : $hImage_JPG = 0x041712A0 >Error code: 0 False, error: -1 +>09:51:33 AutoIt3.exe ended.rc:0 +>09:51:33 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.667 Edited August 29, 2018 by Strydr Link to comment Share on other sites More sharing options...
UEZ Posted August 29, 2018 Share Posted August 29, 2018 (edited) Error -1 means something went wrong with _GDIPlus_EncodersGetCLSID() function. Does this example from help file work for you? expandcollapse popup#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIConv.au3> #include <WinAPIHObj.au3> #include <WindowsConstants.au3> Global $g_idMemo, $g_aCodex, $g_hImage Example() Func Example() Local $hBitmap ; Create GUI GUICreate("GDI+", 600, 400) $g_idMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUISetState(@SW_SHOW) ; Initialize GDI+ library _GDIPlus_Startup() ; Create an image to use for paramater lists $hBitmap = _ScreenCapture_Capture("", 0, 0, 1, 1) $g_hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) ; Show encoder parameters $g_aCodex = _GDIPlus_Encoders() ShowCodex("Encoder") ; Show decoder parameters $g_aCodex = _GDIPlus_Decoders() ShowCodex("Decoder") ; Clean up resources _GDIPlus_ImageDispose($g_hImage) _WinAPI_DeleteObject($hBitmap) ; Shut down GDI+ library _GDIPlus_Shutdown() ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example ; Write a line to the memo control Func MemoWrite($sMessage = '') GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite ; Show codex information Func ShowCodex($sTitle) Local $iI, $iJ, $iK, $sCLSID, $tData, $tParam, $tParams, $iParamSize = _GDIPlus_ParamSize() For $iI = 1 To $g_aCodex[0][0] $sCLSID = _GDIPlus_EncodersGetCLSID($g_aCodex[$iI][5]) MemoWrite("Image " & $sTitle & " " & $iI) MemoWrite(" Codec GUID ............: " & $g_aCodex[$iI][1]) MemoWrite(" File format GUID ......: " & $g_aCodex[$iI][2]) MemoWrite(" Codec name ............: " & $g_aCodex[$iI][3]) MemoWrite(" Codec Dll file name ...: " & $g_aCodex[$iI][4]) MemoWrite(" Codec file format .....: " & $g_aCodex[$iI][5]) MemoWrite(" File name extensions ..: " & $g_aCodex[$iI][6]) MemoWrite(" Mime type .............: " & $g_aCodex[$iI][7]) MemoWrite(" Flags .................: 0x" & Hex($g_aCodex[$iI][8])) MemoWrite(" Version ...............: " & $g_aCodex[$iI][9]) MemoWrite(" Signature count .......: " & $g_aCodex[$iI][10]) MemoWrite(" Signature size ........: " & $g_aCodex[$iI][11]) MemoWrite(" Signature pattern ptr .: 0x" & Hex($g_aCodex[$iI][12])) MemoWrite(" Signature mask ptr ....: 0x" & Hex($g_aCodex[$iI][13])) ;~ If $sTitle = "Decoder" Then ContinueLoop MemoWrite(" Parameter list size ...: " & _GDIPlus_EncodersGetParamListSize($g_hImage, $sCLSID)) $tParams = _GDIPlus_EncodersGetParamList($g_hImage, $sCLSID) If @error Then MemoWrite() ContinueLoop EndIf MemoWrite(" Parameters Count ......: " & DllStructGetData($tParams, "Count")) MemoWrite() For $iJ = 0 To DllStructGetData($tParams, "Count") - 1 MemoWrite(" Image " & $sTitle & " " & $iI & " Parameter " & $iJ) $tParam = DllStructCreate($tagGDIPENCODERPARAM, DllStructGetPtr($tParams, "GUID") + ($iJ * $iParamSize)) MemoWrite(" Parameter GUID ......: " & _WinAPI_StringFromGUID(DllStructGetPtr($tParam, "GUID"))) MemoWrite(" Number of values ....: " & DllStructGetData($tParam, "NumberOfValues")) MemoWrite(" Parameter type.......: " & DllStructGetData($tParam, "Type")) MemoWrite(" Parameter pointer ...: 0x" & Hex(DllStructGetData($tParam, "Values"))) Switch DllStructGetData($tParam, "Type") Case 4 $tData = DllStructCreate("int Data[" & DllStructGetData($tParam, "NumberOfValues") & "]", DllStructGetData($tParam, "Values")) For $iK = 1 To DllStructGetData($tParam, "NumberOfValues") MemoWrite(" Value .............: " & DllStructGetData($tData, 1, $iK)) Next Case 6 $tData = DllStructCreate("int Low;int High", DllStructGetData($tParam, "Values")) MemoWrite(" Low range .........: " & DllStructGetData($tData, "Low")) MemoWrite(" High range ........: " & DllStructGetData($tData, "High")) EndSwitch MemoWrite() Next Next EndFunc ;==>ShowCodex The output should be something like this here: expandcollapse popupImage Encoder 1 Codec GUID ............: {557CF400-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in BMP Codec Codec Dll file name ...: Codec file format .....: BMP File name extensions ..: *.BMP;*.DIB;*.RLE Mime type .............: image/bmp Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x043495A2 Signature mask ptr ....: 0x043495A4 Parameter list size ...: 0 Image Encoder 2 Codec GUID ............: {557CF401-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in JPEG Codec Codec Dll file name ...: Codec file format .....: JPEG File name extensions ..: *.JPG;*.JPEG;*.JPE;*.JFIF Mime type .............: image/jpeg Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x04349622 Signature mask ptr ....: 0x04349624 Parameter list size ...: 172 Parameters Count ......: 5 Image Encoder 2 Parameter 0 Parameter GUID ......: {8D0EB2D1-A58E-4EA8-AA14-108074B7B6F9} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x01474140 Value .............: 13 Value .............: 14 Value .............: 15 Value .............: 16 Value .............: 17 Image Encoder 2 Parameter 1 Parameter GUID ......: {1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB} Number of values ....: 1 Parameter type.......: 6 Parameter pointer ...: 0x01474154 Low range .........: 0 High range ........: 100 Image Encoder 2 Parameter 2 Parameter GUID ......: {EDB33BCE-0266-4A77-B904-27216099E717} Number of values ....: 0 Parameter type.......: 3 Parameter pointer ...: 0x00000000 Image Encoder 2 Parameter 3 Parameter GUID ......: {F2E455DC-09B3-4316-8260-676ADA32481C} Number of values ....: 0 Parameter type.......: 3 Parameter pointer ...: 0x00000000 Image Encoder 2 Parameter 4 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Encoder 3 Codec GUID ............: {557CF402-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in GIF Codec Codec Dll file name ...: Codec file format .....: GIF File name extensions ..: *.GIF Mime type .............: image/gif Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 6 Signature pattern ptr .: 0x04349674 Signature mask ptr ....: 0x04349680 Parameter list size ...: 64 Parameters Count ......: 2 Image Encoder 3 Parameter 0 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Encoder 3 Parameter 1 Parameter GUID ......: {292266FC-AC40-47BF-8CFC-A85B89A655DE} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x04341C94 Value .............: 18 Image Encoder 4 Codec GUID ............: {557CF405-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in TIFF Codec Codec Dll file name ...: Codec file format .....: TIFF File name extensions ..: *.TIF;*.TIFF Mime type .............: image/tiff Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 2 Signature pattern ptr .: 0x043496EE Signature mask ptr ....: 0x043496F2 Parameter list size ...: 164 Parameters Count ......: 4 Image Encoder 4 Parameter 0 Parameter GUID ......: {E09D739D-CCD4-44EE-8EBA-3FBF8BE4FC58} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x014BC9E4 Value .............: 2 Value .............: 3 Value .............: 5 Value .............: 4 Value .............: 6 Image Encoder 4 Parameter 1 Parameter GUID ......: {66087055-AD66-4C7C-9A18-38A2310B8337} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x014BC9F8 Value .............: 1 Value .............: 4 Value .............: 8 Value .............: 24 Value .............: 32 Image Encoder 4 Parameter 2 Parameter GUID ......: {292266FC-AC40-47BF-8CFC-A85B89A655DE} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x014BCA0C Value .............: 18 Image Encoder 4 Parameter 3 Parameter GUID ......: {A219BBC9-0A9D-4005-A3EE-3A421B8BB06C} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x014BCA10 Value .............: 1 Image Encoder 5 Codec GUID ............: {557CF406-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in PNG Codec Codec Dll file name ...: Codec file format .....: PNG File name extensions ..: *.PNG Mime type .............: image/png Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 8 Signature pattern ptr .: 0x04349744 Signature mask ptr ....: 0x0434974C Parameter list size ...: 32 Parameters Count ......: 1 Image Encoder 5 Parameter 0 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Decoder 1 Codec GUID ............: {557CF400-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in BMP Codec Codec Dll file name ...: Codec file format .....: BMP File name extensions ..: *.BMP;*.DIB;*.RLE Mime type .............: image/bmp Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x0435224E Signature mask ptr ....: 0x04352250 Parameter list size ...: 0 Image Decoder 2 Codec GUID ............: {557CF401-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in JPEG Codec Codec Dll file name ...: Codec file format .....: JPEG File name extensions ..: *.JPG;*.JPEG;*.JPE;*.JFIF Mime type .............: image/jpeg Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x043522CE Signature mask ptr ....: 0x043522D0 Parameter list size ...: 172 Parameters Count ......: 5 Image Decoder 2 Parameter 0 Parameter GUID ......: {8D0EB2D1-A58E-4EA8-AA14-108074B7B6F9} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x01474140 Value .............: 13 Value .............: 14 Value .............: 15 Value .............: 16 Value .............: 17 Image Decoder 2 Parameter 1 Parameter GUID ......: {1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB} Number of values ....: 1 Parameter type.......: 6 Parameter pointer ...: 0x01474154 Low range .........: 0 High range ........: 100 Image Decoder 2 Parameter 2 Parameter GUID ......: {EDB33BCE-0266-4A77-B904-27216099E717} Number of values ....: 0 Parameter type.......: 3 Parameter pointer ...: 0x00000000 Image Decoder 2 Parameter 3 Parameter GUID ......: {F2E455DC-09B3-4316-8260-676ADA32481C} Number of values ....: 0 Parameter type.......: 3 Parameter pointer ...: 0x00000000 Image Decoder 2 Parameter 4 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Decoder 3 Codec GUID ............: {557CF402-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in GIF Codec Codec Dll file name ...: Codec file format .....: GIF File name extensions ..: *.GIF Mime type .............: image/gif Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 6 Signature pattern ptr .: 0x04352320 Signature mask ptr ....: 0x0435232C Parameter list size ...: 64 Parameters Count ......: 2 Image Decoder 3 Parameter 0 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Decoder 3 Parameter 1 Parameter GUID ......: {292266FC-AC40-47BF-8CFC-A85B89A655DE} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x04341F64 Value .............: 18 Image Decoder 4 Codec GUID ............: {557CF403-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAC-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in EMF Codec Codec Dll file name ...: Codec file format .....: EMF File name extensions ..: *.EMF Mime type .............: image/x-emf Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 44 Signature pattern ptr .: 0x0435238A Signature mask ptr ....: 0x043523B6 Parameter list size ...: 0 Image Decoder 5 Codec GUID ............: {557CF404-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAD-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in WMF Codec Codec Dll file name ...: Codec file format .....: WMF File name extensions ..: *.WMF Mime type .............: image/x-wmf Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 4 Signature pattern ptr .: 0x04352434 Signature mask ptr ....: 0x04352438 Parameter list size ...: 0 Image Decoder 6 Codec GUID ............: {557CF405-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in TIFF Codec Codec Dll file name ...: Codec file format .....: TIFF File name extensions ..: *.TIF;*.TIFF Mime type .............: image/tiff Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 2 Signature pattern ptr .: 0x0435249E Signature mask ptr ....: 0x043524A2 Parameter list size ...: 164 Parameters Count ......: 4 Image Decoder 6 Parameter 0 Parameter GUID ......: {E09D739D-CCD4-44EE-8EBA-3FBF8BE4FC58} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x014BC3B4 Value .............: 2 Value .............: 3 Value .............: 5 Value .............: 4 Value .............: 6 Image Decoder 6 Parameter 1 Parameter GUID ......: {66087055-AD66-4C7C-9A18-38A2310B8337} Number of values ....: 5 Parameter type.......: 4 Parameter pointer ...: 0x014BC3C8 Value .............: 1 Value .............: 4 Value .............: 8 Value .............: 24 Value .............: 32 Image Decoder 6 Parameter 2 Parameter GUID ......: {292266FC-AC40-47BF-8CFC-A85B89A655DE} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x014BC3DC Value .............: 18 Image Decoder 6 Parameter 3 Parameter GUID ......: {A219BBC9-0A9D-4005-A3EE-3A421B8BB06C} Number of values ....: 1 Parameter type.......: 4 Parameter pointer ...: 0x014BC3E0 Value .............: 1 Image Decoder 7 Codec GUID ............: {557CF406-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in PNG Codec Codec Dll file name ...: Codec file format .....: PNG File name extensions ..: *.PNG Mime type .............: image/png Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 8 Signature pattern ptr .: 0x043524F4 Signature mask ptr ....: 0x043524FC Parameter list size ...: 32 Parameters Count ......: 1 Image Decoder 7 Parameter 0 Parameter GUID ......: {63875E13-1F1D-45AB-9195-A29B6066A650} Number of values ....: 0 Parameter type.......: 9 Parameter pointer ...: 0x00000000 Image Decoder 8 Codec GUID ............: {557CF407-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB5-0728-11D3-9D7B-0000F81EF32E} Codec name ............: Built-in ICO Codec Codec Dll file name ...: Codec file format .....: ICO File name extensions ..: *.ICO Mime type .............: image/x-icon Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 4 Signature pattern ptr .: 0x04352558 Signature mask ptr ....: 0x0435255C Parameter list size ...: 0 Edited August 29, 2018 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 More sharing options...
Uten Posted August 30, 2018 Share Posted August 30, 2018 (edited) Could this be related to 32 vs 64 bit versions of the os and or autoit? After I got a computer able to run windows 10 I get all kinds of trouble. I thought it was because I'm rusty, but .... Edit: Tried the code. Only modified the paths to be relative. #include <GDIPlus.au3> _GDIPlus_Startup() $hImage_JPG = _GDIPlus_ImageLoadFromFile(".\images\test.jpg") _GDIPlus_ImageSaveToFile($hImage_JPG, ".\images\test.bmp") _GDIPlus_ImageDispose($hImage_JPG) _GDIPlus_Shutdown() Worked for me. Windows 10. Autoit 3.3.14.5 64 bit version. Edited August 30, 2018 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Strydr Posted August 30, 2018 Author Share Posted August 30, 2018 @Uten at this point, I'm not ruling anything out, but it doesn't seem to be the issue. Thank you for the idea, tho! @UEZ the script runs but I don't like my results, no actual file name or extensions, just hash tags. And I have no idea what that means! Quote Image Encoder 1 Codec GUID ............: {557CF400-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20424D5020436F64656300 Codec Dll file name ...: Codec file format .....: 0x424D5000 File name extensions ..: 0x2A2E424D503B2A2E4449423B2A2E524C4500 Mime type .............: 0x696D6167652F626D7000 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x038DFE0A Signature mask ptr ....: 0x038DFE0C Parameter list size ...: 0 Image Encoder 2 Codec GUID ............: {557CF401-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E204A50454720436F64656300 Codec Dll file name ...: Codec file format .....: 0x4A50454700 File name extensions ..: 0x2A2E4A50473B2A2E4A5045473B2A2E4A50453B2A2E4A46494600 Mime type .............: 0x696D6167652F6A70656700 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x038DFE8A Signature mask ptr ....: 0x038DFE8C Parameter list size ...: 0 Image Encoder 3 Codec GUID ............: {557CF402-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E2047494620436F64656300 Codec Dll file name ...: Codec file format .....: 0x47494600 File name extensions ..: 0x2A2E47494600 Mime type .............: 0x696D6167652F67696600 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 6 Signature pattern ptr .: 0x038DFEDC Signature mask ptr ....: 0x038DFEE8 Parameter list size ...: 0 Image Encoder 4 Codec GUID ............: {557CF405-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E205449464620436F64656300 Codec Dll file name ...: Codec file format .....: 0x5449464600 File name extensions ..: 0x2A2E5449463B2A2E5449464600 Mime type .............: 0x696D6167652F7469666600 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 2 Signature pattern ptr .: 0x038DFF56 Signature mask ptr ....: 0x038DFF5A Parameter list size ...: 0 Image Encoder 5 Codec GUID ............: {557CF406-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20504E4720436F64656300 Codec Dll file name ...: Codec file format .....: 0x504E4700 File name extensions ..: 0x2A2E504E4700 Mime type .............: 0x696D6167652F706E6700 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 8 Signature pattern ptr .: 0x038DFFAC Signature mask ptr ....: 0x038DFFB4 Parameter list size ...: 0 Image Decoder 1 Codec GUID ............: {557CF400-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20424D5020436F64656300 Codec Dll file name ...: Codec file format .....: 0x424D5000 File name extensions ..: 0x2A2E424D503B2A2E4449423B2A2E524C4500 Mime type .............: 0x696D6167652F626D7000 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x038D5E56 Signature mask ptr ....: 0x038D5E58 Parameter list size ...: 0 Image Decoder 2 Codec GUID ............: {557CF401-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E204A50454720436F64656300 Codec Dll file name ...: Codec file format .....: 0x4A50454700 File name extensions ..: 0x2A2E4A50473B2A2E4A5045473B2A2E4A50453B2A2E4A46494600 Mime type .............: 0x696D6167652F6A70656700 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 2 Signature pattern ptr .: 0x038D5ED6 Signature mask ptr ....: 0x038D5ED8 Parameter list size ...: 0 Image Decoder 3 Codec GUID ............: {557CF402-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E2047494620436F64656300 Codec Dll file name ...: Codec file format .....: 0x47494600 File name extensions ..: 0x2A2E47494600 Mime type .............: 0x696D6167652F67696600 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 6 Signature pattern ptr .: 0x038D5F28 Signature mask ptr ....: 0x038D5F34 Parameter list size ...: 0 Image Decoder 4 Codec GUID ............: {557CF403-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAC-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20454D4620436F64656300 Codec Dll file name ...: Codec file format .....: 0x454D4600 File name extensions ..: 0x2A2E454D4600 Mime type .............: 0x696D6167652F782D656D6600 Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 44 Signature pattern ptr .: 0x038D5F92 Signature mask ptr ....: 0x038D5FBE Parameter list size ...: 0 Image Decoder 5 Codec GUID ............: {557CF404-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAD-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20574D4620436F64656300 Codec Dll file name ...: Codec file format .....: 0x574D4600 File name extensions ..: 0x2A2E574D4600 Mime type .............: 0x696D6167652F782D776D6600 Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 4 Signature pattern ptr .: 0x038D603C Signature mask ptr ....: 0x038D6040 Parameter list size ...: 0 Image Decoder 6 Codec GUID ............: {557CF405-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E205449464620436F64656300 Codec Dll file name ...: Codec file format .....: 0x5449464600 File name extensions ..: 0x2A2E5449463B2A2E5449464600 Mime type .............: 0x696D6167652F7469666600 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 2 Signature size ........: 2 Signature pattern ptr .: 0x038D60A6 Signature mask ptr ....: 0x038D60AA Parameter list size ...: 0 Image Decoder 7 Codec GUID ............: {557CF406-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E20504E4720436F64656300 Codec Dll file name ...: Codec file format .....: 0x504E4700 File name extensions ..: 0x2A2E504E4700 Mime type .............: 0x696D6167652F706E6700 Flags .................: 0x0000000000010007 Version ...............: 1 Signature count .......: 1 Signature size ........: 8 Signature pattern ptr .: 0x038D60FC Signature mask ptr ....: 0x038D6104 Parameter list size ...: 0 Image Decoder 8 Codec GUID ............: {557CF407-1A04-11D3-9A73-0000F81EF32E} File format GUID ......: {B96B3CB5-0728-11D3-9D7B-0000F81EF32E} Codec name ............: 0x4275696C742D696E2049434F20436F64656300 Codec Dll file name ...: Codec file format .....: 0x49434F00 File name extensions ..: 0x2A2E49434F00 Mime type .............: 0x696D6167652F782D69636F6E00 Flags .................: 0x0000000000010006 Version ...............: 1 Signature count .......: 1 Signature size ........: 4 Signature pattern ptr .: 0x038D6160 Signature mask ptr ....: 0x038D6164 Parameter list size ...: 0 Link to comment Share on other sites More sharing options...
UEZ Posted August 30, 2018 Share Posted August 30, 2018 It is a bug in an UDF (_WinAPI_WideCharToMultiByte()): Which AutoIt version are you using? Strydr 1 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 More sharing options...
Strydr Posted August 30, 2018 Author Share Posted August 30, 2018 (edited) @UEZ Version 3.3.14.3 of course! Updating: I'll let you know! <fingers, toes and eyes crossed> Eureka!!! I have an output file! Now to test it in the program! (at this point, I've kind of forgotten where i was! LOL) I join the ranks of people who you have saved! (I've come across your posts before!) Thank you more than I can say!!!! It's even working in my program! Thank you just doesn't seem enough, but Thank You for your patience and your wisdom!!! Edited August 30, 2018 by Strydr Link to comment Share on other sites More sharing options...
Tedwhite Posted June 26, 2019 Share Posted June 26, 2019 (edited) <snip> Links to 3rd party products are not permitted. Edited June 26, 2019 by JLogan3o13 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