Creates a RedEyeCorrection class effect object
#include <GDIPlus.au3>
_GDIPlus_EffectCreateRedEyeCorrection ( $aAreas )
$aAreas | An array of areas of the bitmap to which red eye correction should be applied: [0][0] - Number of Area rectangles [1][0] - X coordinate of the upper-left corner of the first rectangle [1][1] - Y coordinate of the upper-left corner of the first rectangle [1][2] - Width of the first rectangle [1][3] - Height of the first rectangle ... [n][0] - X coordinate of the upper-left corner of the nth rectangle [n][1] - Y coordinate of the upper-left corner of the nth rectangle [n][2] - Width of the nth rectangle [n][3] - Height of the nth rectangle |
Success: | a handle to an Effect object. |
Failure: | 0 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPIP_ERR* see GPIPlusConstants.au3). |
@error: | -1 - GDIPlus.dll does not support this function. 10 - Invalid parameters. |
When you are done with the Effect object, call _GDIPlus_EffectDispose() to release the resources.
_GDIPlus_EffectCreate, _GDIPlus_EffectDispose
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
_Example()
Func _Example()
If Not _GDIPlus_Startup() Or @extended < 6 Then
MsgBox($MB_SYSTEMMODAL, "ERROR", "GDIPlus.dll v1.1 not available")
Return
EndIf
Local $hBitmap = _GDIPlus_BitmapCreateFromMemory(_RedEye())
Local $iWidth = 600
Local $iHeight = _GDIPlus_ImageGetHeight($hBitmap) * 600 / _GDIPlus_ImageGetWidth($hBitmap)
Local $hGui = GUICreate("GDI+ v1.1 (" & @ScriptName & ")", $iWidth, $iHeight)
Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
GUISetState(@SW_SHOW)
Local $aAreas[3][4] = [[2]]
$aAreas[1][0] = 50
$aAreas[1][1] = 64
$aAreas[1][2] = 22
$aAreas[1][3] = 18
$aAreas[2][0] = 155
$aAreas[2][1] = 64
$aAreas[2][2] = 21
$aAreas[2][3] = 18
Local $hEffect = _GDIPlus_EffectCreateRedEyeCorrection($aAreas)
Local $hBitmap_FX = _GDIPlus_BitmapCreateApplyEffect($hBitmap, $hEffect)
Local $iTimer = TimerInit(), $iStep = 0
Do
If TimerDiff($iTimer) > 400 Then
Switch Mod($iStep, 2)
Case 0
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, $iWidth, $iHeight)
Case Else
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap_FX, 0, 0, $iWidth, $iHeight)
EndSwitch
$iStep += 1
$iTimer = TimerInit()
EndIf
Until GUIGetMsg() = $GUI_EVENT_CLOSE
_GDIPlus_EffectDispose($hEffect)
_GDIPlus_ImageDispose($hBitmap_FX)
_GDIPlus_ImageDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
EndFunc ;==>_Example
; Code below was generated by: 'File to Base64 String' Code Generator v1.11 Build 2012-10-13
Func _RedEye($bSaveBinary = False)
Local $sRedEye
$sRedEye &= '/9j/4AAQSkZJRgABAQEBLAEsAAD//gBERmlsZSBzb3VyY2U6IGh0dHA6Ly9jb21tb25zLndpa2ltZWRpYS5vcmcvd2lraS9GaWxlOkJvbGRSZWRFeWUuSlBH/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgApgDcAwERAAIRAQMRAf/EABwAAAIDAQEBAQAAAAAAAAAAAAQFAgMGAQcACP/EADoQAAEDAwMCBAQFAwMDBQAAAAECAxEABCESMUEFURMiYXEGMoGhFCORweFCsfAHFdFSYvEkMzRygv/EABsBAAMBAQEBAQAAAAAAAAAAAAABAgMEBQYH/8QALREBAQACAgICAQIFAwUAAAAAAAECEQMhEjEEQVEiYQUGExRxQoGhJDJSkfD/2gAMAwEAAhEDEQA/APz48gpdSFxsNhGKxl3F+jDp6PNrAGpPyzx61GS4eWQyCdRjJ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la4M+X/vIrQwpBnVM7/tRVYHlooxEzUV0Y2G1uoTvioaymVuoxuZ2E0mko5gmRJwaDM2VTjahmKQ4AN5o2VVOrzMZqbVYqyed6AiZJM8cUz2taQCRjNJGVGttpKIj9KuMrX3hxxinobWBseHPP8Aeke+wbqYXMDNRemsvSl19LbjaVTKsAxTt0vDC5S2LgrO0UqlJK4pbC8Lx6VUqUVq82aez+gziSTj2oPYR48Zg9jTOBFqkiSByZoOhn9iRsMY7U2VoF0AvQSkgEA/Srxc2d6DXylpWYASdMgRtxV2ucht2g+lThVEqxisNb7dmONs6ZD4P6i89069bfWta0veIVkzMiumyS9OG2+W6e4UsGIkgCOPKDtUVthTK0mTxmKixvKaW6sEZxUVriZMrIUJpVriPaOUig9mFucJ9aSbRBUYEUk7cnaeaBKiFSfQUj2mkSByfWmW1rf2EU5E0e2sBkECrnplfbhdEHFGzkSS7qSMR2o9wa0oeTmDzU2HMgq0hwDUNjik2xysfJKisgxAxUn9Jp3PtS2m1NKiFAb0wm4cA0ylDPKg01TsC6rWJ43FNfoK5kCQNJmnCtDkkygGABNNjnfsvcUUztG3rNaRz53ZX1G40NPOpEeQx6YoyvTKTt5v1jrvULbqLrNq8W2kQNMcwKMMJZtr/Uyx6j//2Q=='
Local $dBinary = Binary(_Base64Decode($sRedEye))
If $bSaveBinary Then
Local $hFile = FileOpen(@ScriptDir & "\220px-BoldRedEye.JPG", 18)
FileWrite($hFile, $dBinary)
FileClose($hFile)
EndIf
Return $dBinary
EndFunc ;==>_RedEye
Func _Base64Decode($sB64String)
Local $tStruct = DllStructCreate("int")
Local $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $sB64String, "int", 0, "int", 1, "ptr", 0, "struct*", $tStruct, "ptr", 0, "ptr", 0)
If @error Or Not $a_Call[0] Then Return SetError(1, 0, "")
Local $tA = DllStructCreate("byte[" & DllStructGetData($tStruct, 1) & "]")
$a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $sB64String, "int", 0, "int", 1, "struct*", $tA, "struct*", $tStruct, "ptr", 0, "ptr", 0)
If @error Or Not $a_Call[0] Then Return SetError(2, 0, "")
Return DllStructGetData($tA, 1)
EndFunc ;==>_Base64Decode