Sign in to follow this  
Followers 0
solarfusion

Problem with AutoIt3Wrapper and GDI_Plus JPG Quality

1 post in this topic

#1 ·  Posted (edited)

Hi, I've just installed the full version of Scite with AutoIt3Wrapper, etc (was using lite version before) and now when I run my script the JPG quality parameter doesn't appear to be getting passed into GDI_Plus (output file is lossy). I can resolve the issue by editing au3.properties and changing the command.go back to the default autoit3.exe. Same problem occurs if I compile with AutoIt3Wrapper, yet aut2exe works fine.

Code is:

; Set output image quality
$TParam = _GDIPlus_ParamInit(1)
$Datas = DllStructCreate("int Quality")
DllStructSetData($Datas, "Quality", $quality)
_GDIPlus_ParamAdd($TParam, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, DllStructGetPtr($Datas))
$Param = DllStructGetPtr($TParam)
  $clsid = _GDIPlus_EncodersGetCLSID("JPG")
; Save to destination folder
_GDIPlus_ImageSaveToFileEx($hImage, $DestFolder & "\" & $ImageFilename, $clsid, $Param)
Edited by solarfusion

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0