Bonjour, je viens de cherchez 2 jours entier une fonction ou une potentiel UDF qui permettrai de modifier la résolution d’une image. Je ne parle pas de la taille d’une image mais de la résolution ppp quand on scanne quelque chose avec un scanneur par exemple.
Voici en image la résolution que je veux modifier. Le screen est fait sur GIMP. J'ai fait ce screen pour être bien sur d'êtres compris.
; #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($ghGDIPDll, "uint", "GdipBitmapSetResolution", "hwnd", $hBitmap, "float", $nDpiX, "float", $nDpiY)
If @error Then Return SetError(@error, @extended, False)
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_BitmapSetResolution