Cr�e un objet Effet qui agit sur la nettet�
#include <GDIPlus.au3>
_GDIPlus_EffectCreateSharpen ( [$fRadius = 10.0 [, $fAmount = 50.0]] )
$fRadius | [optionnel] Nombre r�el qui indique le rayon de nettet� (le rayon du noyau de convolution) en pixels. Le rayon doit �tre compris entre 0,0 et 255,0 |
$fAmount | [optionnel] Nombre r�el compris entre 0,0 et 100,0 qui indique le degr� de nettet� � appliquer |
Succ�s: | Retourne le handle de l'objet Effect. |
�chec: | Retourne 0 et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
@error: | -1 - GDIPlus.dll ne supporte pas cette fonction. 10 - Param�tres invalides. |
Lorsque vous en avez termin� avec l'objet Effect, appelez _GDIPlus_EffectDispose() pour lib�rer les ressources.
_GDIPlus_EffectCreate, _GDIPlus_EffectDispose
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> _Example() Func _Example() If Not _GDIPlus_Startup() Then MsgBox($MB_SYSTEMMODAL, "ERROR", "GDIPlus.dll v1.1 not available") Return EndIf Local $sFile = FileOpenDialog("S�lectionnez une image", "", "Images (*.bmp;*.png;*.jpg;*.gif;*.tif)") If @error Or Not FileExists($sFile) Then Return Local $hImage = _GDIPlus_ImageLoadFromFile($sFile) Local $iWidth = 600 Local $iHeight = _GDIPlus_ImageGetHeight($hImage) * 600 / _GDIPlus_ImageGetWidth($hImage) Local $hGui = GUICreate("GDI+ v1.1", $iWidth, $iHeight) Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui) GUISetState(@SW_SHOW) Local $hEffect = _GDIPlus_EffectCreateSharpen() _GDIPlus_BitmapApplyEffect($hImage, $hEffect) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hImage, 0, 0, $iWidth, $iHeight) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_EffectDispose($hEffect) _GDIPlus_ImageDispose($hImage) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() EndFunc ;==>_Example