#include-Once ; https://www.autoitscript.com/forum/topic/120163-set-pixels-per-inch-using-gdi/?do=findComment&comment=834906 ; https://www.autoitscript.com/forum/topic/106021-gdipau3/ ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_BitmapSetResolution ; Description ...: Sets the resolution of this Bitmap object ; Syntax.........: _GDIPlus_BitmapSetResolution($hBitmap, $nDpiX, $nDpiY) ; Parameters ....: $hBitmap - Pointer to the Bitmap object ; $nDpiX - Value that specifies the horizontal resolution in dots per inch. ; $nDpiX - Value that specifies the vertical resolution in dots per inch. ; Return values .: Success - True ; Failure - False and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; Remarks .......: None ; Related .......: ; Link ..........; @@MsdnLink@@ GdipBitmapSetResolution ; Example .......; Yes ; =============================================================================================================================== Func _GDIPlus_BitmapSetResolution($hBitmap, $nDpiX, $nDpiY) Local $aResult = DllCall( $__g_hGDIPDll, "uint", "GdipBitmapSetResolution", "handle", $hBitmap, "float", $nDpiX, "float", $nDpiY) If @error Then Return SetError(@error, @extended, False) $GDIP_STATUS = $aResult[0] Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_BitmapSetResolution