;IMPORTANT: You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name!
;Distributing copies of the program in compiled pe format (exe) must be free of any fee!
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Icon=Color.ico
;#AutoIt3Wrapper_Res_Field=CompanyName|UEZ Software Development
;#AutoIt3Wrapper_Res_Field=ProductName|GDI+ Color Transformer
;#AutoIt3Wrapper_Res_Field=ProductVersion|%AutoItVer%
#AutoIt3Wrapper_Res_Fileversion=0.9.5.0
;#AutoIt3Wrapper_Res_Field=Build|2013-05-23
#AutoIt3Wrapper_Res_LegalCopyright=UEZ Software Development
#AutoIt3Wrapper_Res_Language=1033
;#AutoIt3Wrapper_Res_Field=URL|http://www.autoitscript.com/forum/index.php?showtopic=151155
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_UPX_Parameters=--best --lzma
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <GUIMenu.au3>
#include <Memory.au3>
#include <Misc.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
If Not _GDIPlus11_Startup() Then
Global $sUrl = "http://www.winsxs.org/?OtherTech/thread-13-1-1"
Global $iChoice = MsgBox(4 + 16 + 262144, "Error", _
"GDIPlus.dll v1.1 is needed to run this script properly!" & @CRLF & _
"How to use GDI+ v1.1 e.g. on WinXP: " & $sUrl & @CRLF & @CRLF & "Open site with default browser?")
If $iChoice = 6 Then ShellExecute($sUrl)
Exit
EndIf
Global Const $GDIP_BLUREFFECT = "{633C80A4-1843-482b-9EF2-BE2834C5FDD4}"
Global Const $GDIP_BRIGHTNESSCONTRASTEFFECT = "{D3A1DBE1-8EC4-4c17-9F4C-EA97AD1C343D}"
Global Const $GDIP_COLORBALANCEEFFECT = "{537E597D-251E-48da-9664-29CA496B70F8}"
Global Const $GDIP_COLORCURVEEFFECT = "{DD6A0022-58E4-4a67-9D9B-D48EB881A53D}"
Global Const $GDIP_COLORLUTEFFECT = "{A7CE72A9-0F7F-40d7-B3CC-D0C02D5C3212}"
Global Const $GDIP_COLORMATRIXEFFECT = "{718F2615-7933-40e3-A511-5F68FE14DD74}"
Global Const $GDIP_HUESATURATIONLIGHTNESSEFFECT = "{8B2DD6C3-EB07-4d87-A5F0-7108E26A9C5F}"
Global Const $GDIP_LEVELSEFFECT = "{99C354EC-2A31-4f3a-8C34-17A803B33A25}"
Global Const $GDIP_REDEYECORRECTIONEFFECT = "{74D29D05-69A4-4266-9549-3CC52836B632}"
Global Const $GDIP_SHARPENEFFECT = "{63CBF3EE-C526-402c-8F71-62C540BF5142}"
Global Const $GDIP_TINTEFFECT = "{1077AF00-2848-4441-9489-44AD4C2D7A2C}"
Global Const $tagCOLORLUTPARAMS = "byte ColorChannelLUTB[256];byte ColorChannelLUTG[256];byte ColorChannelLUTR[256];byte ColorChannelLUTA[256]"
Global Const $tagBLURPARAMS = "float radius;bool expandEdge" ;0-255; False/True
Global Const $tagBRIGHTNESSCONTRASTPARAMS = "int brightnessLevel;int contrastLevel" ;-255-255; -100-100
Global Const $tagCOLORBALANCEPARAMS = "int cyanRed;int magentaGreen;int yellowBlue" ;-100-100; -100-100; -100-100
Global Const $tagCOLORCURVEEFFECTPARAMS = "int type;int channel;int value"
Global Const $tagGDIPCOLORMATRIXPARAMS = "float m[25];"
Global Const $tagHUESATURATIONLIGHTNESSPARAMS = "int hueLevel;int saturationLevel;int lightnessLevel" ;-180-180; -100-100; -100-100
Global Const $tagLEVELSPARAMS = "int highlight;int midtone;int shadow" ;0-100; -100-100; 0-100
Global Const $tagSHARPENPARAMS = "float radius;float amount" ;0-255; 0-100
Global Const $tagTINTPARAMS = "int hue;int amount" ;-180-180; -100-100
Global Const $tagGDIPCOLORMATRIX = "float m[25];" ; [5][5] matrix; [0][0] - red, [1][1] - green, [2][2] - blue; [3][3] - alpha, [4][4] - ~should~ be 1
Global $tColorLUT = DllStructCreate($tagCOLORLUTPARAMS), $tColorColorChannelLUT
Global $tRECTF = DllStructCreate($tagGDIPRECTF)
DllStructSetData($tRECTF, "X", 0)
DllStructSetData($tRECTF, "Y", 0)
Global $tBlur = DllStructCreate($tagBLURPARAMS)
Global $tBrightnessContrast = DllStructCreate($tagBRIGHTNESSCONTRASTPARAMS)
Global $tColorBalance = DllStructCreate($tagCOLORBALANCEPARAMS)
Global Enum $iAdjustExposure = 0, $iAdjustDensity, $iAdjustContrast, $iAdjustHighlight, $iAdjustShadow, _ ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms534098(v=vs.85).aspx
$iAdjustMidtone, $iAdjustWhiteSaturation, $iAdjustBlackSaturation
Global Enum $iCurveChannelAll = 0, $iCurveChannelRed, $iCurveChannelGreen, $iCurveChannelBlue ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms534100(v=vs.85).aspx
Global $tColorCurve = DllStructCreate($tagCOLORCURVEEFFECTPARAMS), $iType = $iAdjustExposure, $iChannel = $iCurveChannelAll
Global $tColorMatrix = DllStructCreate($tagGDIPCOLORMATRIXPARAMS)
Global $tHueSaturationLightness = DllStructCreate($tagHUESATURATIONLIGHTNESSPARAMS)
Global $tLevels = DllStructCreate($tagLEVELSPARAMS)
Global $tSharpen = DllStructCreate($tagSHARPENPARAMS)
Global $tTint = DllStructCreate($tagTINTPARAMS)
Global $bUpdatePreview = False
Global $hGUI = GUICreate("GDI+ Color Transformer by UEZ v0.9.5 build 2013-05-23", 1201, 691, -1, -1, Default, $WS_EX_TOPMOST + $WS_EX_ACCEPTFILES)
GUISetFont(12, 400, 0, "Times New Roman")
GUISetBkColor(0xFFFFFF, $hGUI)
Global $iTab = GUICtrlCreateTab(824, 232, 369, 393, $TCS_MULTILINE, $TCS_EX_FLATSEPARATORS)
Global $iSlider_BWThreshold_Default = 50, $iSlider_BlurRadius_Default = 0, $iSlider_BCBrightness_Default = 0, $iSlider_BCContrast_Default = 0, _
$iSlider_CBCyanRed_Default = 0, $iSlider_CBMagentaGreen_Default = 0, $iSlider_CBYellowBlue_Default = 0, _
$iSlider_CMRed_Default = 100, $iSlider_CMGreen_Default = 100, $iSlider_CMBlue_Default = 100, $iSlider_SharpenRadius_Default = 0, $iSlider_SharpenAmount_Default = 0, _
$iSlider_HSLLightnLevel_Default = 0, $iSlider_HSLHueLevel_Default = 0, $iSlider_HSLSatLevel_Default = 0, _
$iSlider_LevelsShadow_Default = 0, $iSlider_LevelsHighlight_Default = 100, $iSlider_LevelsMidtone_Default = 0, _
$iSlider_TintHue_Default = 0, $iSlider_TintAmount_Default = 0, _
$iSlider_GSLumRed_Default = 31, $iSlider_GSLumGreen_Default = 61, $iSlider_GSLumBlue_Default = 8
Global $GDIP_RLUM = $iSlider_GSLumRed_Default / 100, $GDIP_GLUM = $iSlider_GSLumGreen_Default / 100, $GDIP_BLUM = $iSlider_GSLumBlue_Default / 100; ; Colors luminace
Global $iTabSelection = 0, $iBGDefColor = 0xFFFFFF
#region Tabs
#region B/W
Global $iBW = GUICtrlCreateTabItem("Black / White")
Global $iLabel_BWThreshold = GUICtrlCreateLabel("Threshold", 837, 411, 93, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_BWThreshold = GUICtrlCreateSlider(837, 443, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_BWThreshold_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_BWThreshold = GUICtrlGetHandle($iSlider_BWThreshold)
Global $iInp_BWThreshold = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_BWThreshold_Default / 100), 1126, 455, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion B/W
#region Blur
Global $iBlur = GUICtrlCreateTabItem("Blur")
;~ GUICtrlSetState(-1, $GUI_SHOW)
Global $iCheckbox_BlurExpandEdge = GUICtrlCreateCheckbox("Expand Edge", 838, 381, 177, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetTip(-1, "If set, the bitmap expands by an amount equal to the radius so that it can have soft edges." & @CRLF & _
"the bitmap remains the same size and the soft edges are clipped.")
Global $iLabel_BlurRadius = GUICtrlCreateLabel("Radius", 838, 445, 64, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_BlurRadius = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 255, 0)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Range is from 0 to 255")
GUICtrlSetData(-1, $iSlider_BlurRadius_Default)
Global $hSlider_BlurRadius = GUICtrlGetHandle($iSlider_BlurRadius)
Global $iInp_BlurRadius = GUICtrlCreateInput($iSlider_BlurRadius_Default, 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion Blur
#region BC
Global $iBC = GUICtrlCreateTabItem("Brightness / Contrast")
Global $iLabel_BCBrightness = GUICtrlCreateLabel("Brightness", 838, 377, 99, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_BCBrightness = GUICtrlCreateSlider(838, 409, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 255, -255)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Range is from -255 to 255")
GUICtrlSetData(-1, $iSlider_BCBrightness_Default)
Global $hSlider_BCBrightness = GUICtrlGetHandle($iSlider_BCBrightness)
Global $iInp_BCBrightness = GUICtrlCreateInput($iSlider_BCBrightness_Default, 1126, 421, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_BCContrast = GUICtrlCreateLabel("Contrast", 838, 504, 80, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_BCContrast = GUICtrlCreateSlider(838, 541, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Range is from -100 to 100")
GUICtrlSetData(-1, $iSlider_BCContrast_Default)
Global $hSlider_BCContrast = GUICtrlGetHandle($iSlider_BCContrast)
Global $iInp_BCContrast = GUICtrlCreateInput($iSlider_BCContrast_Default, 1126, 553, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion BC
#region CB
Global $iCB = GUICtrlCreateTabItem("Color Balance")
Global $iLabel_CBCyanRed = GUICtrlCreateLabel("Cyan Red", 838, 355, 87, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CBCyanRed = GUICtrlCreateSlider(838, 387, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetData(-1, $iSlider_CBCyanRed_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_CBCyanRed = GUICtrlGetHandle($iSlider_CBCyanRed)
Global $iInp_CBCyanRed = GUICtrlCreateInput($iSlider_CBCyanRed_Default, 1126, 399, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_CBMagentaGreen = GUICtrlCreateLabel("Magenta Green", 838, 445, 139, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CBMagentaGreen = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetData(-1, $iSlider_CBMagentaGreen_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_CBMagentaGreen = GUICtrlGetHandle($iSlider_CBMagentaGreen)
Global $iInp_CBMagentaGreen = GUICtrlCreateInput($iSlider_CBMagentaGreen_Default, 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_CBYellowBlue = GUICtrlCreateLabel("Yellow Blue", 838, 535, 107, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CBYellowBlue = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetData(-1, $iSlider_CBYellowBlue_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_CBYellowBlue = GUICtrlGetHandle($iSlider_CBYellowBlue)
Global $iInp_CBYellowBlue = GUICtrlCreateInput($iSlider_CBYellowBlue_Default, 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion CB
#region CC
Global $iCC = GUICtrlCreateTabItem("Color Curve")
Global $iLabel_CCCurveAdjust = GUICtrlCreateLabel("Curve Adjustments", 838, 355, 171, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateGroup("", 0, 0, 0, 0)
Global $iRadio_CCExposure = GUICtrlCreateRadio("Exposure", 837, 387, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_CHECKED)
Global $iRadio_CCDensity = GUICtrlCreateRadio("Density", 927, 387, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCContrast = GUICtrlCreateRadio("Contrast", 1017, 387, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCHighlight = GUICtrlCreateRadio("Highlight", 1107, 387, 65, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCShadow = GUICtrlCreateRadio("Shadow", 837, 411, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCMidtone = GUICtrlCreateRadio("Midtone", 927, 411, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCWhiteSaturation = GUICtrlCreateRadio("White Satur.", 1017, 411, 81, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCBlackSaturation = GUICtrlCreateRadio("Black Satur.", 1107, 411, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iLabel_CCCurveChannel = GUICtrlCreateLabel("Curve Channel", 838, 445, 132, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", 0, 0, 0, 0)
Global $iRadio_CCCurveAllChannel = GUICtrlCreateRadio("All Channel", 837, 477, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_CHECKED)
Global $iRadio_CCCurveRed = GUICtrlCreateRadio("Red", 927, 477, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCCurveGreen = GUICtrlCreateRadio("Green", 1017, 477, 73, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $iRadio_CCCurveBlue = GUICtrlCreateRadio("Blue", 1107, 477, 65, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $iLabel_CCValue = GUICtrlCreateLabel("Value", 838, 535, 54, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CCValue = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 255, -255)
GUICtrlSetData(-1, 0)
GUICtrlSetTip(-1, "Range is from -255 to 255")
Global $hSlider_CCValue = GUICtrlGetHandle($iSlider_CCValue)
Global $iInp_CCValue = GUICtrlCreateInput(0, 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion CC
#region CLUT
Global $iCL = GUICtrlCreateTabItem("Color LUT")
Global $iLabel_CLUT = GUICtrlCreateLabel("Coming soon!", 838, 425, 340, 60)
GUICtrlSetFont(-1, 34, 400, 0, "Arial Black", 4)
GUICtrlSetBkColor(-1, 0xFFFFFF)
#endregion CLUT
#region CM
Global $iCM = GUICtrlCreateTabItem("Color Matrix")
Global $iLabel_CMRed = GUICtrlCreateLabel("Red", 838, 355, 38, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CMRed = GUICtrlCreateSlider(838, 387, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_CMRed_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_CMRed = GUICtrlGetHandle($iSlider_CMRed)
Global $iInp_CMRed = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_CMRed_Default / 100), 1126, 399, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_CMGreen = GUICtrlCreateLabel("Green", 838, 445, 57, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CMGreen = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_CMGreen_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_CMGreen = GUICtrlGetHandle($iSlider_CMGreen)
Global $iInp_CMGreen = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_CMGreen_Default / 100), 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_CMBlue = GUICtrlCreateLabel("Blue", 838, 535, 43, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_CMBlue = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_CMBlue_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_CMBlue = GUICtrlGetHandle($iSlider_CMBlue)
Global $iInp_CMBlue = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_CMBlue_Default / 100), 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion CM
#region Greyscale
Global $iGreyscale = GUICtrlCreateTabItem("Greyscale")
Global $iLabel_GSLumRed = GUICtrlCreateLabel("Luminance Red", 838, 355, 138, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_GSLumRed = GUICtrlCreateSlider(838, 387, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_GSLumRed_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_GSLumRed = GUICtrlGetHandle($iSlider_GSLumRed)
Global $iInp_GSLumRed = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_GSLumRed_Default / 100), 1126, 399, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_GSLumGreen = GUICtrlCreateLabel("Luminance Green", 838, 445, 157, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_GSLumGreen = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_GSLumGreen_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_GSLumGreen = GUICtrlGetHandle($iSlider_GSLumGreen)
Global $iInp_GSLumGreen = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_GSLumGreen_Default / 100), 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_GSLumBlue = GUICtrlCreateLabel("Luminance Blue", 838, 535, 143, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_GSLumBlue = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_GSLumBlue_Default)
GUICtrlSetTip(-1, "Range is from 0 to 1")
Global $hSlider_GSLumBlue = GUICtrlGetHandle($iSlider_GSLumBlue)
Global $iInp_GSLumBlue = GUICtrlCreateInput(StringFormat("%04.2f", $iSlider_GSLumBlue_Default / 100), 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion Greyscale
#region HSL
Global $iHSL = GUICtrlCreateTabItem("Hue / Sat. / Lightn.")
Global $iLabel_HSLHueLevel = GUICtrlCreateLabel("Hue Level", 838, 355, 92, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_HSLHueLevel = GUICtrlCreateSlider(838, 387, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 180, -180)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetData(-1, $iSlider_HSLHueLevel_Default)
GUICtrlSetTip(-1, "Range is from -180 to 180")
Global $hSlider_HSLHueLevel = GUICtrlGetHandle($iSlider_HSLHueLevel)
Global $iInp_HSLHueLevel = GUICtrlCreateInput($iSlider_HSLHueLevel_Default, 1126, 399, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_HSLSatLevel = GUICtrlCreateLabel("Saturation Level", 838, 445, 150, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_HSLSatLevel = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetData(-1, $iSlider_HSLSatLevel_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_HSLSatLevel = GUICtrlGetHandle($iSlider_HSLSatLevel)
Global $iInp_HSLSatLevel = GUICtrlCreateInput($iSlider_HSLSatLevel_Default, 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_HSLLightnLevel = GUICtrlCreateLabel("Lightness Level", 838, 535, 144, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_HSLLightnLevel = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetData(-1, $iSlider_HSLLightnLevel_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_HSLLightnLevel = GUICtrlGetHandle($iSlider_HSLLightnLevel)
Global $iInp_HSLLightnLevel = GUICtrlCreateInput($iSlider_HSLLightnLevel_Default, 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion HSL
#region Levels
Global $iLevels = GUICtrlCreateTabItem("Levels")
Global $iLabel_LevelsHighlight = GUICtrlCreateLabel("Highlight", 838, 355, 83, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_LevelsHighlight = GUICtrlCreateSlider(838, 387, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_LevelsHighlight_Default)
GUICtrlSetTip(-1, "Range is from 0 to 100")
Global $hSlider_LevelsHighlight = GUICtrlGetHandle($iSlider_LevelsHighlight)
Global $iInp_LevelsHighlight = GUICtrlCreateInput($iSlider_LevelsHighlight_Default, 1126, 399, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_LevelsMidtone = GUICtrlCreateLabel("Midtone", 838, 445, 75, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_LevelsMidtone = GUICtrlCreateSlider(838, 477, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetData(-1, $iSlider_LevelsMidtone_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_LevelsMidtone = GUICtrlGetHandle($iSlider_LevelsMidtone)
Global $iInp_LevelsMidtone = GUICtrlCreateInput($iSlider_LevelsMidtone_Default, 1126, 489, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_LevelsShadow = GUICtrlCreateLabel("Shadow", 838, 535, 75, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_LevelsShadow = GUICtrlCreateSlider(838, 567, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_LevelsShadow_Default)
GUICtrlSetTip(-1, "Range is from 0 to 100")
Global $hSlider_LevelsShadow = GUICtrlGetHandle($iSlider_LevelsShadow)
Global $iInp_LevelsShadow = GUICtrlCreateInput($iSlider_LevelsShadow_Default, 1126, 579, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion Levels
#region Negative
Global $iNegative = GUICtrlCreateTabItem("Negative")
Global $iLabel_Negative = GUICtrlCreateLabel("Nothing to configure", 838, 445, 340, 60)
GUICtrlSetFont(-1, 23, 400, 0, "Arial Black", 4)
GUICtrlSetBkColor(-1, 0xFFFFFF)
#endregion Negative
#region Sharpen
Global $iSharpen = GUICtrlCreateTabItem("Sharpen")
Global $iLabel_SharpenRadius = GUICtrlCreateLabel("Radius", 838, 377, 64, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_SharpenRadius = GUICtrlCreateSlider(838, 409, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 255, 0)
GUICtrlSetData(-1, $iSlider_SharpenRadius_Default)
GUICtrlSetTip(-1, "Range is from 0 to 255")
Global $hSlider_SharpenRadius = GUICtrlGetHandle($iSlider_SharpenRadius)
Global $iInp_SharpenRadius = GUICtrlCreateInput($iSlider_SharpenRadius_Default, 1126, 421, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabelSharpenAmount = GUICtrlCreateLabel("Amount", 838, 504, 72, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_SharpenAmount = GUICtrlCreateSlider(838, 541, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData(-1, $iSlider_SharpenAmount_Default)
GUICtrlSetTip(-1, "Range is from 0 to 100")
Global $hSlider_SharpenAmount = GUICtrlGetHandle($iSlider_SharpenAmount)
Global $iInp_SharpenAmount = GUICtrlCreateInput($iSlider_SharpenAmount_Default, 1126, 553, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion Sharpen
#region Tint
Global $iTint = GUICtrlCreateTabItem("Tint")
;~ GUICtrlSetState(-1, $GUI_SHOW)
Global $iLabel_TintHue = GUICtrlCreateLabel("Hue", 838, 377, 39, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_TintHue = GUICtrlCreateSlider(838, 409, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 180, -180)
GUICtrlSetData(-1, $iSlider_TintHue_Default)
GUICtrlSetTip(-1, "Range is from -180 to 180")
Global $hSlider_TintHue = GUICtrlGetHandle($iSlider_TintHue)
Global $iInp_TintHue = GUICtrlCreateInput($iSlider_TintHue_Default, 1126, 421, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
Global $iLabel_TintAmount = GUICtrlCreateLabel("Amount", 838, 504, 72, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Arial Black")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Global $iSlider_TintAmount = GUICtrlCreateSlider(838, 541, 278, 45, BitOR($GUI_SS_DEFAULT_SLIDER, $TBS_BOTH, $TBS_ENABLESELRANGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetLimit(-1, 100, -100)
GUICtrlSetData(-1, $iSlider_TintAmount_Default)
GUICtrlSetTip(-1, "Range is from -100 to 100")
Global $hSlider_TintAmount = GUICtrlGetHandle($iSlider_TintAmount)
Global $iInp_TintAmount = GUICtrlCreateInput($iSlider_TintAmount_Default, 1126, 553, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER, $ES_READONLY))
#endregion Tint
GUICtrlCreateTabItem("")
#endregion Tabs
Global Const $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0
Global $hTmp = _GDIPlus_BMPFromMemory(_Logo(), True)
Global $iPicLogo = GUICtrlCreatePic("", 8, 8, 1184, 196, BitOR($SS_CENTERIMAGE, $GUI_SS_DEFAULT_PIC, $WS_BORDER))
Global $hB = GUICtrlSendMsg($iPicLogo, $STM_SETIMAGE, $IMAGE_BITMAP, $hTmp)
If $hB Then _WinAPI_DeleteObject($hB)
_WinAPI_DeleteObject($hTmp)
Global $iW_Prev = 800, $iH_Prev = 450
Global $iPicPreview = GUICtrlCreatePic("", 8, 232, $iW_Prev, $iH_Prev, BitOR($GUI_SS_DEFAULT_PIC, $WS_BORDER, $SS_CENTERIMAGE))
Global $hPicPreview = GUICtrlGetHandle($iPicPreview)
Global $iBtnSave = GUICtrlCreateButton("&Save Image", 1117, 634, 75, 49, $BS_MULTILINE)
GUICtrlSetState(-1, $GUI_DISABLE)
Global $iBtnLoad = GUICtrlCreateButton("&Load Image", 1036, 634, 75, 49, $BS_MULTILINE)
Global $iBtnApply = GUICtrlCreateButton("&Apply Effect", 825, 634, 75, 49, $BS_MULTILINE)
GUICtrlSetState(-1, $GUI_DISABLE)
Global $iBtnUndo = GUICtrlCreateButton("&Undo Effect", 905, 634, 75, 49, $BS_MULTILINE)
GUICtrlSetState(-1, $GUI_DISABLE)
Global $iLabelImg = GUICtrlCreateLabel(" Image Info:", 8, 214, 68, 16)
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xE0E0E0)
Global $iLabelImgInfo = GUICtrlCreateLabel("", 76, 214, 731, 16)
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xE0E0E0)
Global $iLabel_BgColor = GUICtrlCreateLabel("Bg Color", 986, 634, 47, 19)
GUICtrlSetFont(-1, 9, 400, 0, "Times New Roman")
Global $iBtnBgColor = GUICtrlCreateButton("", 992, 654, 32, 28, $WS_BORDER)
GUICtrlSetBkColor(-1, $iBGDefColor)
GUICtrlSetTip(-1, "Change image background color (used also for save format)." & @CRLF & "PNG file format is excluded by background color")
Global Enum $iReset = 0x400
Global $hQMenu = _GUICtrlMenu_CreatePopup()
_GUICtrlMenu_InsertMenuItem($hQMenu, 0, "Reset to default", $iReset)
$hTmp = _GDIPlus_BMPFromMemory(Reset_Icon())
Global $hBmp_Reset = _GDIPlus_Convert2HBitmap($hTmp, $COLOR_MENU)
_GUICtrlMenu_SetItemBmp($hQMenu, 0, $hBmp_Reset)
_GDIPlus_BitmapDispose($hTmp)
GUISetState(@SW_SHOW)
Global $hDLL_GDI32 = DllOpen("gdi32.dll")
Global $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iW_Prev, "int", $iH_Prev, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0)
Global $hHBitmap_Preview = _GDIPlus_BitmapCreateHBITMAPFromBitmap($aResult[6])
_GDIPlus_BitmapDispose($aResult[6])
Global $hDC = _WinAPI_GetWindowDC($hPicPreview)
Global $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC)
Global $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap_Preview)
Global $hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer)
_GDIPlus_GraphicsClear($hGraphic, 0xFF000000 + $iBGDefColor)
Global $hIA = _GDIPlus_ImageAttributesCreate()
Global $tGUID = DllStructCreate($tagGUID)
Global $hImage = 0, $hBmp_Preview = 0, $hBmp_tmp = 0, $hBmp_Save = 0, $hBmp_Save_1bpp = 0, $hCtx_tmp, $hBmp_Undo, $hBmp_Empty, _
$iWidth, $iHeight, $aPixelFormat, $aImageRawFormat, $hEffect, $aAnim, $sPrefix, $sFile, $iBGColor = $iBGDefColor, _
$bDnD = False, $bStart = False, $bDrawFX = False, $t
GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL")
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES")
GUIRegisterMsg($WM_CONTEXTMENU, "WM_CONTEXTMENU")
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
GUIRegisterMsg($WM_HSCROLL, "")
GUIRegisterMsg($WM_NOTIFY, "")
GUIRegisterMsg($WM_ERASEBKGND, "")
GUIRegisterMsg($WM_DROPFILES, "")
GUIRegisterMsg($WM_CONTEXTMENU, "")
GUIRegisterMsg($WM_COMMAND, "")
If $hBmp_tmp Then
_GDIPlus_GraphicsDispose($hCtx_tmp)
_GDIPlus_BitmapDispose($hBmp_tmp)
EndIf
_GDIPlus_ImageAttributesDispose($hIA)
_WinAPI_DeleteObject($hBmp_Reset)
_GDIPlus_GraphicsDispose($hGraphic)
_WinAPI_SelectObject($hDC_backbuffer, $DC_obj)
_WinAPI_DeleteObject($hHBitmap_Preview)
_WinAPI_ReleaseDC($hPicPreview, $hDC)
_WinAPI_DeleteDC($hDC)
If $hImage Then _GDIPlus_ImageDispose($hImage)
GUIDelete()
_GDIPlus_Shutdown()
DllClose($hDLL_GDI32)
Exit
Case $iBtnApply
If $hBmp_Undo Then _GDIPlus_BitmapDispose($hBmp_Undo)
$hBmp_Undo = _GDIPlus_ImageClone($hImage)
Switch $iTabSelection
Case 0
_GDIPlus_BlackAndWhite($hImage, $hCtx_tmp, $hIA, GUICtrlRead($iInp_BWThreshold), False)
Case 7
_GDIPlus_Greyscale($hImage, $hCtx_tmp, $hIA, False)
EndSwitch
_GDIPlus_BitmapDispose($hImage)
$hImage = _GDIPlus_ImageClone($hBmp_tmp)
$bUpdatePreview = True
GUICtrlSetState($iBtnUndo, $GUI_ENABLE)
ResetSettings()
Case $iBtnUndo
_GDIPlus_BitmapDispose($hImage)
$hImage = _GDIPlus_ImageClone($hBmp_Undo)
If $hBmp_tmp Then
_GDIPlus_GraphicsDispose($hCtx_tmp)
_GDIPlus_BitmapDispose($hBmp_tmp)
EndIf
$hBmp_tmp = _GDIPlus_ImageClone($hImage)
$hCtx_tmp = _GDIPlus_ImageGetGraphicsContext($hBmp_tmp)
$bUpdatePreview = True
Case $iBtnBgColor
$t = $iBGColor
$iBGColor = _ChooseColor(2, 0xFF0000, 2, $hGUI)
If @error Then $iBGColor = $t
_GDIPlus_GraphicsClear($hGraphic, 0xFF000000 + $iBGColor)
GUICtrlSetBkColor($iBtnBgColor, $iBGColor)
$bUpdatePreview = True
Case $iRadio_CCExposure, $iRadio_CCDensity
GUICtrlSetLimit($iSlider_CCValue, 255, -255)
GUICtrlSetData($iSlider_CCValue, 0)
GUICtrlSetData($iInp_CCValue, 0)
GUICtrlSetTip($iSlider_CCValue, "Range is from -255 to 255")
If BitAND(GUICtrlRead($iRadio_CCExposure), $GUI_CHECKED) Then
$iType = $iAdjustExposure
Else
$iType = $iAdjustDensity
EndIf
$bUpdatePreview = True
Case $iRadio_CCBlackSaturation, $iRadio_CCWhiteSaturation
If BitAND(GUICtrlRead($iRadio_CCBlackSaturation), $GUI_CHECKED) Then
$iType = $iAdjustBlackSaturation
GUICtrlSetLimit($iSlider_CCValue, 254, 0)
GUICtrlSetData($iSlider_CCValue, 0)
GUICtrlSetData($iInp_CCValue, 0)
GUICtrlSetTip($iSlider_CCValue, "Range is from 0 to 254")
Else
$iType = $iAdjustWhiteSaturation
GUICtrlSetLimit($iSlider_CCValue, 255, 1)
GUICtrlSetData($iSlider_CCValue, 255)
GUICtrlSetData($iInp_CCValue, 255)
GUICtrlSetTip($iSlider_CCValue, "Range is from 1 to 255")
EndIf
$bUpdatePreview = True
Case $iRadio_CCContrast, $iRadio_CCHighlight, $iRadio_CCShadow, $iRadio_CCMidtone
GUICtrlSetLimit($iSlider_CCValue, 100, -100)
GUICtrlSetData($iSlider_CCValue, 0)
GUICtrlSetData($iInp_CCValue, 0)
GUICtrlSetTip($iSlider_CCValue, "Range is from -100 to 100")
If BitAND(GUICtrlRead($iRadio_CCBlackSaturation), $GUI_CHECKED) Then
$iType = $iAdjustContrast
ElseIf BitAND(GUICtrlRead($iRadio_CCHighlight), $GUI_CHECKED) Then
$iType = $iAdjustHighlight
ElseIf BitAND(GUICtrlRead($iRadio_CCShadow), $GUI_CHECKED) Then
$iType = $iAdjustShadow
Else
$iType = $iAdjustMidtone
EndIf
$bUpdatePreview = True
Case $iRadio_CCCurveAllChannel
$iChannel = $iCurveChannelAll
$bUpdatePreview = True
Case $iRadio_CCCurveRed
$iChannel = $iCurveChannelRed
$bUpdatePreview = True
Case $iRadio_CCCurveGreen
$iChannel = $iCurveChannelGreen
$bUpdatePreview = True
Case $iRadio_CCCurveBlue
$iChannel = $iCurveChannelBlue
$bUpdatePreview = True
Case $iCheckbox_BlurExpandEdge
$bUpdatePreview = True
Case $iBtnLoad
If Not $bDnD Then
$sFile = FileOpenDialog("Load an image", "", "Images (*.jpg;*.bmp;*.png;*.gif;*.tif)|All (*.*)", 3, "", $hGUI)
If @error Then ContinueLoop
EndIf
If $hImage Then _GDIPlus_ImageDispose($hImage)
$hImage = _GDIPlus_ImageLoadFromFile($sFile)
If Not $hImage Then ContinueLoop
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
$aAnim = DllCall($ghGDIPDll, "uint", "GdipImageGetFrameDimensionsCount", "handle", $hImage, "int*", 0)
DllCall($ghGDIPDll, "uint", "GdipImageGetFrameDimensionsList", "handle", $hImage, "struct*", $tGUID, "int", $aAnim[2])
$aAnim = DllCall($ghGDIPDll, "uint", "GdipImageGetFrameCount", "handle", $hImage, "struct*", $tGUID, "uint*", 0)
$aPixelFormat = _GDIPlus_ImageGetPixelFormat($hImage)
$aImageRawFormat = _GDIPlus_ImageGetRawFormat($hImage)
$sPrefix = ""
If $aAnim[3] > 1 Then $sPrefix = "animated "
;~ CopyImage2Gfx($hImage, $hGraphic, $hDC, $hDC_backbuffer, $iWidth, $iHeight)
GUICtrlSetData($iLabelImgInfo, StringRegExpReplace($sFile, ".*\\(.*)", "$1") & ", " & $sPrefix & $aImageRawFormat[1] & ", " & $iWidth & "x" & $iHeight & ", " & $aPixelFormat[1] & ", " & Round(FileGetSize($sFile) / 1024, 2) & " kb")
$bDnD = False
$bStart = True
$bUpdatePreview = True
DllStructSetData($tRECTF, "Width", $iWidth)
DllStructSetData($tRECTF, "Height", $iHeight)
If $hBmp_tmp Then
_GDIPlus_GraphicsDispose($hCtx_tmp)
_GDIPlus_BitmapDispose($hBmp_tmp)
EndIf
$hBmp_tmp = _GDIPlus_ImageClone($hImage)
$hCtx_tmp = _GDIPlus_ImageGetGraphicsContext($hBmp_tmp)
GUICtrlSetState($iBtnApply, $GUI_ENABLE)
GUICtrlSetState($iBtnSave, $GUI_ENABLE)
If $hBmp_Undo Then _GDIPlus_BitmapDispose($hBmp_Undo)
$hBmp_Undo = _GDIPlus_ImageClone($hImage)
If $hBmp_Empty Then _GDIPlus_BitmapDispose($hBmp_Empty)
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0)
$hBmp_Empty = $aResult[6]
Case $iBtnSave
$sFile = FileSaveDialog("Save Image", "", "Image (*.png;*.jpg;*.bmp;*.gif;*.tif)", 2, "", $hGUI)
If @error Then ContinueLoop
If $hBmp_tmp Then
_GDIPlus_GraphicsDispose($hCtx_tmp)
_GDIPlus_BitmapDispose($hBmp_tmp)
EndIf
$hBmp_tmp = _GDIPlus_ImageClone($hBmp_Empty)
$hCtx_tmp = _GDIPlus_ImageGetGraphicsContext($hBmp_tmp)
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hCtx_tmp, "int", 7)
Switch $iTabSelection
Case 0 ;Black & White
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hCtx_tmp, "int", 5)
_GDIPlus_BlackAndWhite($hImage, $hCtx_tmp, $hIA, GUICtrlRead($iInp_BWThreshold), False)
Case 1 ;Blur
$hEffect = _GDIPlus_Blur($tBlur, GUICtrlRead($iInp_BlurRadius), BitAND(GUICtrlRead($iCheckbox_BlurExpandEdge), $GUI_CHECKED))
Case 2 ;Brightness / Contrast
$hEffect = _GDIPlus_BrightnessContrast($tBrightnessContrast, GUICtrlRead($iInp_BCBrightness), GUICtrlRead($iInp_BCContrast))
Case 3 ;Color Balance
$hEffect = _GDIPlus_ColorBalance($tColorBalance, GUICtrlRead($iInp_CBCyanRed), GUICtrlRead($iInp_CBMagentaGreen), GUICtrlRead($iInp_CBYellowBlue))
Case 4 ;Color Curve
$hEffect = _GDIPlus_ColorCurve($tColorCurve, $iType, $iChannel, GUICtrlRead($iInp_CCValue))
Case 5 ;Color LUT
Case 6 ;Color Matrix
$hEffect = _GDIPlus_ColorMatrix($tColorMatrix, GUICtrlRead($iInp_CMRed), GUICtrlRead($iInp_CMGreen), GUICtrlRead($iInp_CMBlue), 1)
Case 7 ;Greyscale
_GDIPlus_Greyscale($hImage, $hCtx_tmp, $hIA, False)
Case 8 ;Hue / Saturation / Lightness
$hEffect = _GDIPlus_HueSaturationLightness($tHueSaturationLightness, GUICtrlRead($iInp_HSLHueLevel), GUICtrlRead($iInp_HSLSatLevel), GUICtrlRead($iInp_HSLLightnLevel))
Case 9 ;Levels
$hEffect = _GDIPlus_Levels($tLevels, GUICtrlRead($iInp_LevelsHighlight), GUICtrlRead($iInp_LevelsMidtone), GUICtrlRead($iInp_LevelsShadow))
Case 10;Negative
_GDIPlus_Negative($hImage, $hCtx_tmp, $hIA)
Case 11;Sharpen
$hEffect = _GDIPlus_Sharpen($tSharpen, GUICtrlRead($iInp_SharpenRadius), GUICtrlRead($iInp_SharpenAmount))
Case 12;Tint
$hEffect = _GDIPlus_Tint($tTint, GUICtrlRead($iInp_TintHue), GUICtrlRead($iInp_TintAmount))
EndSwitch
If $iTabSelection <> 0 And $iTabSelection <> 7 Then
_GDIPlus_DrawImageFX($hCtx_tmp, $hImage, $tRECTF, $hEffect)
_GDIPlus_EffectDispose($hEffect)
EndIf
_GDIPlus_SaveBitmap($sFile, $hBmp_tmp, 90, $iBGColor)
;~ Switch _GDIPlus_ImageSaveToFile($hBmp_tmp, $sFile)
;~ Case 0
;~ MsgBox(16 + 262144, "Error", "Image couldn't be saved!", 20, $hGUI)
;~ Case Else
;~ MsgBox(64 + 262144, "Information", "Image has been successfully saved!", 20, $hGUI)
;~ EndSwitch
Case $iTab
Switch GUICtrlRead($iTab)
Case 0 ;Black & White
$iTabSelection = 0
Case 1 ;Blur
$iTabSelection = 1
Case 2 ;Brightness / Contrast
$iTabSelection = 2
Case 3 ;Color Balance
$iTabSelection = 3
Case 4 ;Color Curve
$iTabSelection = 4
Case 5 ;Color LUT
$iTabSelection = 5
Case 6 ;Color Matrix
$iTabSelection = 6
Case 7 ;Greyscale
$iTabSelection = 7
Case 8 ;Hue / Saturation / Lightness
$iTabSelection = 8
Case 9 ;Levels
$iTabSelection = 9
Case 10;Negative
$iTabSelection = 10
Case 11;Sharpen
$iTabSelection = 11
Case 12;Tint
$iTabSelection = 12
EndSwitch
$bUpdatePreview = True
EndSwitch
If $bUpdatePreview And $bStart Then
$bUpdatePreview = False
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hGraphic, "int", 7)
Switch $iTabSelection
Case 0 ;Black & White
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hGraphic, "int", 5)
_GDIPlus_BlackAndWhite($hImage, $hGraphic, $hIA, GUICtrlRead($iInp_BWThreshold))
$bDrawFX = False
Case 1 ;Blur
$hEffect = _GDIPlus_Blur($tBlur, GUICtrlRead($iInp_BlurRadius), BitAND(GUICtrlRead($iCheckbox_BlurExpandEdge), $GUI_CHECKED))
$bDrawFX = True
Case 2 ;Brightness / Contrast
$hEffect = _GDIPlus_BrightnessContrast($tBrightnessContrast, GUICtrlRead($iInp_BCBrightness), GUICtrlRead($iInp_BCContrast))
$bDrawFX = True
Case 3 ;Color Balance
$hEffect = _GDIPlus_ColorBalance($tColorBalance, GUICtrlRead($iInp_CBCyanRed), GUICtrlRead($iInp_CBMagentaGreen), GUICtrlRead($iInp_CBYellowBlue))
$bDrawFX = True
Case 4 ;Color Curve
$hEffect = _GDIPlus_ColorCurve($tColorCurve, $iType, $iChannel, GUICtrlRead($iInp_CCValue))
$bDrawFX = True
Case 5 ;Color LUT
$bDrawFX = False
Case 6 ;Color Matrix
$hEffect = _GDIPlus_ColorMatrix($tColorMatrix, GUICtrlRead($iInp_CMRed), GUICtrlRead($iInp_CMGreen), GUICtrlRead($iInp_CMBlue), 1)
$bDrawFX = True
Case 7 ;Greyscale
_GDIPlus_Greyscale($hImage, $hGraphic, $hIA)
$bDrawFX = False
Case 8 ;Hue / Saturation / Lightness
$hEffect = _GDIPlus_HueSaturationLightness($tHueSaturationLightness, GUICtrlRead($iInp_HSLHueLevel), GUICtrlRead($iInp_HSLSatLevel), GUICtrlRead($iInp_HSLLightnLevel))
$bDrawFX = True
Case 9 ;Levels
$hEffect = _GDIPlus_Levels($tLevels, GUICtrlRead($iInp_LevelsHighlight), GUICtrlRead($iInp_LevelsMidtone), GUICtrlRead($iInp_LevelsShadow))
$bDrawFX = True
Case 10;Negative
_GDIPlus_Negative($hImage, $hGraphic, $hIA)
$bDrawFX = False
Case 11;Sharpen
$hEffect = _GDIPlus_Sharpen($tSharpen, GUICtrlRead($iInp_SharpenRadius), GUICtrlRead($iInp_SharpenAmount))
$bDrawFX = True
Case 12;Tint
$hEffect = _GDIPlus_Tint($tTint, GUICtrlRead($iInp_TintHue), GUICtrlRead($iInp_TintAmount))
$bDrawFX = True
EndSwitch
If $bDrawFX Then
_GDIPlus_GraphicsClear($hCtx_tmp, 0xFF000000 + $iBGColor)
_GDIPlus_DrawImageFX($hCtx_tmp, $hImage, $tRECTF, $hEffect)
_GDIPlus_EffectDispose($hEffect)
CopyImage2Gfx($hBmp_tmp, $hGraphic, $hDC, $hDC_backbuffer, $iWidth, $iHeight)
Else
DllCall($hDLL_GDI32, "bool", "BitBlt", "handle", $hDC, "int", 2, "int", 2, "int", $iW_Prev - 4, "int", $iH_Prev - 4, "handle", $hDC_backbuffer, "int", 0, "int", 0, "dword", $SRCCOPY)
EndIf
EndIf
WEnd
Func ResetSettings()
Switch $iTabSelection
Case 0 ;Black & White
GUICtrlSetData($iSlider_BWThreshold, $iSlider_BWThreshold_Default)
GUICtrlSetData($iInp_BWThreshold, StringFormat("%04.2f", $iSlider_BWThreshold_Default / 100))
$bUpdatePreview = True
Case 1 ;Blur
GUICtrlSetData($iSlider_BlurRadius, $iSlider_BlurRadius_Default)
GUICtrlSetData($iInp_BlurRadius, $iSlider_BlurRadius_Default)
GUICtrlSetState($iCheckbox_BlurExpandEdge, $GUI_UNCHECKED)
$bUpdatePreview = True
Case 2 ;Brightness / Contrast
GUICtrlSetData($iSlider_BCBrightness, $iSlider_BCBrightness_Default)
GUICtrlSetData($iInp_BCBrightness, $iSlider_BCBrightness_Default)
GUICtrlSetData($iSlider_BCContrast, $iSlider_BCContrast_Default)
GUICtrlSetData($iInp_BCContrast, $iSlider_BCContrast_Default)
$bUpdatePreview = True
Case 3 ;Color Balance
GUICtrlSetData($iSlider_CBCyanRed, $iSlider_CBCyanRed_Default)
GUICtrlSetData($iInp_CBCyanRed, $iSlider_CBCyanRed_Default)
GUICtrlSetData($iSlider_CBMagentaGreen, $iSlider_CBMagentaGreen_Default)
GUICtrlSetData($iInp_CBMagentaGreen, $iSlider_CBMagentaGreen_Default)
GUICtrlSetData($iSlider_CBYellowBlue, $iSlider_CBYellowBlue_Default)
GUICtrlSetData($iInp_CBYellowBlue, $iSlider_CBYellowBlue_Default)
$bUpdatePreview = True
Case 4 ;Color Curve
GUICtrlSetData($iSlider_CCValue, 0)
GUICtrlSetData($iInp_CCValue, 0)
GUICtrlSetState($iRadio_CCExposure, $GUI_CHECKED)
GUICtrlSetState($iRadio_CCCurveAllChannel, $GUI_CHECKED)
$bUpdatePreview = True
Case 5 ;Color LUT
;~ $bUpdatePreview = True
Case 6 ;Color Matrix
GUICtrlSetData($iSlider_CMRed, $iSlider_CMRed_Default)
GUICtrlSetData($iInp_CMRed, StringFormat("%04.2f", $iSlider_CMRed_Default / 100))
GUICtrlSetData($iSlider_CMGreen, $iSlider_CMGreen_Default)
GUICtrlSetData($iInp_CMGreen, StringFormat("%04.2f", $iSlider_CMGreen_Default / 100))
GUICtrlSetData($iSlider_CMBlue, $iSlider_CMBlue_Default)
GUICtrlSetData($iInp_CMBlue, StringFormat("%04.2f", $iSlider_CMBlue_Default / 100))
$bUpdatePreview = True
Case 7 ;Greyscale
GUICtrlSetData($iSlider_GSLumRed, $iSlider_GSLumRed_Default)
GUICtrlSetData($iInp_GSLumRed, StringFormat("%04.2f", $iSlider_GSLumRed_Default / 100))
GUICtrlSetData($iSlider_GSLumGreen, $iSlider_GSLumGreen_Default)
GUICtrlSetData($iInp_GSLumGreen, StringFormat("%04.2f", $iSlider_GSLumGreen_Default / 100))
GUICtrlSetData($iSlider_GSLumBlue, $iSlider_GSLumBlue_Default)
GUICtrlSetData($iInp_GSLumBlue, StringFormat("%04.2f", $iSlider_GSLumBlue_Default / 100))
$GDIP_RLUM = $iSlider_GSLumRed_Default / 100
$GDIP_GLUM = $iSlider_GSLumGreen_Default / 100
$GDIP_BLUM = $iSlider_GSLumBlue_Default / 100
$bUpdatePreview = True
Case 8 ;Hue / Saturation / Lightness
GUICtrlSetData($iSlider_HSLHueLevel, $iSlider_HSLHueLevel_Default)
GUICtrlSetData($iInp_HSLHueLevel, $iSlider_HSLHueLevel_Default)
GUICtrlSetData($iSlider_HSLSatLevel, $iSlider_HSLSatLevel_Default)
GUICtrlSetData($iInp_HSLSatLevel, $iSlider_HSLSatLevel_Default)
GUICtrlSetData($iSlider_HSLLightnLevel, $iSlider_HSLLightnLevel_Default)
GUICtrlSetData($iInp_HSLLightnLevel, $iSlider_HSLLightnLevel_Default)
$bUpdatePreview = True
Case 9 ;Levels
GUICtrlSetData($iSlider_LevelsHighlight, $iSlider_LevelsHighlight_Default)
GUICtrlSetData($iInp_LevelsHighlight, $iSlider_LevelsHighlight_Default)
GUICtrlSetData($iSlider_LevelsMidtone, $iSlider_LevelsMidtone_Default)
GUICtrlSetData($iInp_LevelsMidtone, $iSlider_LevelsMidtone_Default)
GUICtrlSetData($iSlider_LevelsShadow, $iSlider_LevelsShadow_Default)
GUICtrlSetData($iInp_LevelsShadow, $iSlider_LevelsShadow_Default)
$bUpdatePreview = True
Case 10;Negative
$bUpdatePreview = True
Case 11;Sharpen
GUICtrlSetData($iSlider_SharpenRadius, $iSlider_SharpenRadius_Default)
GUICtrlSetData($iInp_SharpenRadius, $iSlider_SharpenRadius_Default)
GUICtrlSetData($iSlider_SharpenAmount, $iSlider_SharpenAmount_Default)
GUICtrlSetData($iInp_SharpenAmount, $iSlider_SharpenAmount_Default)
$bUpdatePreview = True
Case 12;Tint
GUICtrlSetData($iSlider_TintHue, $iSlider_TintHue_Default)
GUICtrlSetData($iInp_TintHue, $iSlider_TintHue_Default)
GUICtrlSetData($iSlider_TintAmount, $iSlider_TintAmount_Default)
GUICtrlSetData($iInp_TintAmount, $iSlider_TintAmount_Default)
$bUpdatePreview = True
EndSwitch
EndFunc ;==>ResetSettings
#region GDI+ FX functions
Func _GDIPlus_BlackAndWhite($hBitmap, $hGraphics, $hIA, $iThreshold, $bUpdate = True)
Local $tBWMatrix, $pBWMatrix
_GDIPlus_ImageAttributesSetThreshold($hIA, 0, True, $iThreshold)
$tBWMatrix = _GDIPlus_ColorMatrixCreateGrayScale()
$pBWMatrix = DllStructGetPtr($tBWMatrix)
_GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $pBWMatrix)
Local $iW = _GDIPlus_ImageGetWidth($hBitmap), $iH = _GDIPlus_ImageGetHeight($hBitmap)
If $bUpdate Then
CopyImage2Gfx($hBitmap, $hGraphics, $hDC, $hDC_backbuffer, $iW, $iH, $hIA)
Else
_GDIPlus_GraphicsClear($hGraphics, 0xFF000000 + $iBGColor)
_GDIPlus_GraphicsDrawImageRectRectIA($hGraphics, $hBitmap, 0, 0, $iW, $iH, 0, 0, $iW, $iH, $hIA)
EndIf
_GDIPlus_ImageAttributesSetThreshold($hIA, 0, False)
EndFunc ;==>_GDIPlus_BlackAndWhite
Func _GDIPlus_Blur($tBlur, $fRadius, $bExpandEdge = False)
If Not IsDllStruct($tBlur) Then Return SetError(1, @error, 0)
DllStructSetData($tBlur, "radius", $fRadius)
DllStructSetData($tBlur, "expandEdge", $bExpandEdge)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_BLUREFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tBlur)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_Blur
Func _GDIPlus_BrightnessContrast($tBrightnessContrast, $iBrightnessLevel, $iContrastLevel)
If Not IsDllStruct($tBrightnessContrast) Then Return SetError(1, @error, 0)
DllStructSetData($tBrightnessContrast, "brightnessLevel", $iBrightnessLevel)
DllStructSetData($tBrightnessContrast, "contrastLevel", $iContrastLevel)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_BRIGHTNESSCONTRASTEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tBrightnessContrast)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_BrightnessContrast
Func _GDIPlus_ColorBalance($tColorBalance, $iCyanRed, $iMagentaGreen, $iYellowBlue)
If Not IsDllStruct($tColorBalance) Then Return SetError(1, @error, 0)
DllStructSetData($tColorBalance, "cyanRed", $iCyanRed)
DllStructSetData($tColorBalance, "magentaGreen", $iMagentaGreen)
DllStructSetData($tColorBalance, "yellowBlue", $iYellowBlue)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_COLORBALANCEEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tColorBalance)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_ColorBalance
Func _GDIPlus_ColorCurve($tColorCurve, $iType, $iChannel, $iValue)
If Not IsDllStruct($tColorCurve) Then Return SetError(1, @error, 0)
DllStructSetData($tColorCurve, "type", $iType)
DllStructSetData($tColorCurve, "channel", $iChannel)
DllStructSetData($tColorCurve, "value", $iValue)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_COLORCURVEEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tColorCurve)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_ColorCurve
Func _GDIPlus_ColorMatrix($tColorMatrix, $fRed, $fGreen, $fBlue, $fAlpha)
If Not IsDllStruct($tColorMatrix) Then Return SetError(1, @error, 0)
DllStructSetData($tColorMatrix, "m", $fRed, 1)
DllStructSetData($tColorMatrix, "m", $fGreen, 7)
DllStructSetData($tColorMatrix, "m", $fBlue, 13)
DllStructSetData($tColorMatrix, "m", $fAlpha, 19)
DllStructSetData($tColorMatrix, "m", 1, 25) ;the element in the fifth row and fifth column of a 5×5 homogeneous matrix must be 1, and all of the other elements in the fifth column must be 0
Local $pEffect = _GDIPlus_EffectCreate($GDIP_COLORMATRIXEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tColorMatrix)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_ColorMatrix
Func _GDIPlus_Greyscale($hBitmap, $hGraphic, $hIA, $bUpdate = True)
Local $tGreyscaleMatrix = _GDIPlus_ColorMatrixCreateGrayScale()
Local $pGreyscaleMatrix = DllStructGetPtr($tGreyscaleMatrix)
_GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $pGreyscaleMatrix)
Local $iW = _GDIPlus_ImageGetWidth($hBitmap), $iH = _GDIPlus_ImageGetHeight($hBitmap)
If $bUpdate Then
CopyImage2Gfx($hBitmap, $hGraphic, $hDC, $hDC_backbuffer, $iW, $iH, $hIA)
Else
_GDIPlus_GraphicsClear($hGraphic, 0xFF000000 + $iBGColor)
_GDIPlus_GraphicsDrawImageRectRectIA($hGraphic, $hBitmap, 0, 0, $iW, $iH, 0, 0, $iW, $iH, $hIA)
EndIf
_GDIPlus_ImageAttributesSetThreshold($hIA, 0, False)
EndFunc ;==>_GDIPlus_Greyscale
Func _GDIPlus_HueSaturationLightness($tHueSaturationLightness, $iHueLevel, $iSaturationLevel, $iLightnessLevel)
If Not IsDllStruct($tHueSaturationLightness) Then Return SetError(1, @error, 0)
DllStructSetData($tHueSaturationLightness, "hueLevel", $iHueLevel)
DllStructSetData($tHueSaturationLightness, "saturationLevel", $iSaturationLevel)
DllStructSetData($tHueSaturationLightness, "lightnessLevel", $iLightnessLevel)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_HUESATURATIONLIGHTNESSEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tHueSaturationLightness)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_HueSaturationLightness
Func _GDIPlus_Levels($tLevels, $iHighlight, $iMidtone, $iShadow)
If Not IsDllStruct($tLevels) Then Return SetError(1, @error, 0)
DllStructSetData($tLevels, "highlight", $iHighlight)
DllStructSetData($tLevels, "midtone", $iMidtone)
DllStructSetData($tLevels, "shadow", $iShadow)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_LEVELSEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tLevels)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_Levels
Func _GDIPlus_Negative($hBitmap, $hGraphic, $hIA)
Local $tNegMatrix = _GDIPlus_ColorMatrixCreateNegative()
Local $pNegMatrix = DllStructGetPtr($tNegMatrix)
_GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $pNegMatrix)
CopyImage2Gfx($hBitmap, $hGraphic, $hDC, $hDC_backbuffer, _GDIPlus_ImageGetWidth($hBitmap), _GDIPlus_ImageGetHeight($hBitmap), $hIA)
_GDIPlus_ImageAttributesSetThreshold($hIA, 0, False)
EndFunc ;==>_GDIPlus_Negative
Func _GDIPlus_Sharpen($tSharpen, $fRadius, $fAmount)
If Not IsDllStruct($tSharpen) Then Return SetError(1, @error, 0)
DllStructSetData($tSharpen, "radius", $fRadius)
DllStructSetData($tSharpen, "amount", $fAmount)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_SHARPENEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tSharpen)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_Sharpen
Func _GDIPlus_Tint($tTint, $iHue, $iAmount)
If Not IsDllStruct($tTint) Then Return SetError(1, @error, 0)
DllStructSetData($tTint, "hue", $iHue)
DllStructSetData($tTint, "amount", $iAmount)
Local $pEffect = _GDIPlus_EffectCreate($GDIP_TINTEFFECT)
If @error Then Return SetError(2, @error, 0)
_GDIPlus_EffectsSetParameters($pEffect, $tTint)
If @error Then Return SetError(3, @error, 0)
Return $pEffect
EndFunc ;==>_GDIPlus_Tint
#endregion GDI+ FX functions
#region Message Functions
Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg, $wParam
Switch $lParam
Case $hSlider_BWThreshold
GUICtrlSetData($iInp_BWThreshold, StringFormat("%04.2f", GUICtrlRead($iSlider_BWThreshold) / 100))
$bUpdatePreview = True
Case $hSlider_BlurRadius
GUICtrlSetData($iInp_BlurRadius, GUICtrlRead($iSlider_BlurRadius))
$bUpdatePreview = True
Case $hSlider_BCBrightness
GUICtrlSetData($iInp_BCBrightness, GUICtrlRead($iSlider_BCBrightness))
$bUpdatePreview = True
Case $hSlider_BCContrast
GUICtrlSetData($iInp_BCContrast, GUICtrlRead($iSlider_BCContrast))
$bUpdatePreview = True
Case $hSlider_CBCyanRed
GUICtrlSetData($iInp_CBCyanRed, GUICtrlRead($iSlider_CBCyanRed))
$bUpdatePreview = True
Case $hSlider_CBMagentaGreen
GUICtrlSetData($iInp_CBMagentaGreen, GUICtrlRead($iSlider_CBMagentaGreen))
$bUpdatePreview = True
Case $hSlider_CBYellowBlue
GUICtrlSetData($iInp_CBYellowBlue, GUICtrlRead($iSlider_CBYellowBlue))
$bUpdatePreview = True
Case $hSlider_CCValue
GUICtrlSetData($iInp_CCValue, GUICtrlRead($iSlider_CCValue))
$bUpdatePreview = True
Case $hSlider_CMBlue
GUICtrlSetData($iInp_CMBlue, StringFormat("%04.2f", GUICtrlRead($iSlider_CMBlue) / 100))
$bUpdatePreview = True
Case $hSlider_CMGreen
GUICtrlSetData($iInp_CMGreen, StringFormat("%04.2f", GUICtrlRead($iSlider_CMGreen) / 100))
$bUpdatePreview = True
Case $hSlider_CMRed
GUICtrlSetData($iInp_CMRed, StringFormat("%04.2f", GUICtrlRead($iSlider_CMRed) / 100))
$bUpdatePreview = True
Case $hSlider_GSLumBlue
GUICtrlSetData($iInp_GSLumBlue, StringFormat("%04.2f", GUICtrlRead($iSlider_GSLumBlue) / 100))
$GDIP_BLUM = GUICtrlRead($iSlider_GSLumBlue) / 100
$bUpdatePreview = True
Case $hSlider_GSLumGreen
GUICtrlSetData($iInp_GSLumGreen, StringFormat("%04.2f", GUICtrlRead($iSlider_GSLumGreen) / 100))
$GDIP_GLUM = GUICtrlRead($iSlider_GSLumGreen) / 100
$bUpdatePreview = True
Case $hSlider_GSLumRed
GUICtrlSetData($iInp_GSLumRed, StringFormat("%04.2f", GUICtrlRead($iSlider_GSLumRed) / 100))
$GDIP_RLUM = GUICtrlRead($iSlider_GSLumRed) / 100
$bUpdatePreview = True
Case $hSlider_HSLHueLevel
GUICtrlSetData($iInp_HSLHueLevel, GUICtrlRead($iSlider_HSLHueLevel))
$bUpdatePreview = True
Case $hSlider_HSLLightnLevel
GUICtrlSetData($iInp_HSLLightnLevel, GUICtrlRead($iSlider_HSLLightnLevel))
$bUpdatePreview = True
Case $hSlider_HSLSatLevel
GUICtrlSetData($iInp_HSLSatLevel, GUICtrlRead($iSlider_HSLSatLevel))
$bUpdatePreview = True
Case $hSlider_LevelsHighlight
GUICtrlSetData($iInp_LevelsHighlight, GUICtrlRead($iSlider_LevelsHighlight))
$bUpdatePreview = True
Case $hSlider_LevelsMidtone
GUICtrlSetData($iInp_LevelsMidtone, GUICtrlRead($iSlider_LevelsMidtone))
$bUpdatePreview = True
Case $hSlider_LevelsShadow
GUICtrlSetData($iInp_LevelsShadow, GUICtrlRead($iSlider_LevelsShadow))
$bUpdatePreview = True
Case $hSlider_SharpenAmount
GUICtrlSetData($iInp_SharpenAmount, GUICtrlRead($iSlider_SharpenAmount))
$bUpdatePreview = True
Case $hSlider_SharpenRadius
GUICtrlSetData($iInp_SharpenRadius, GUICtrlRead($iSlider_SharpenRadius))
$bUpdatePreview = True
Case $hSlider_TintAmount
GUICtrlSetData($iInp_TintAmount, GUICtrlRead($iSlider_TintAmount))
$bUpdatePreview = True
Case $hSlider_TintHue
GUICtrlSetData($iInp_TintHue, GUICtrlRead($iSlider_TintHue))
$bUpdatePreview = True
EndSwitch
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_HSCROLL
Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg, $lParam
Switch $wParam
Case $iReset
ResetSettings()
EndSwitch
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_COMMAND
Func WM_CONTEXTMENU($hWnd, $Msg, $wParam, $lParam)
#forceref $Msg, $wParam, $lParam
Local $aCI = GUIGetCursorInfo(HWnd($hGUI))
If Not @error Then
If $aCI[4] = $iTab Then
_GUICtrlMenu_TrackPopupMenu($hQMenu, $hWnd)
Return True
EndIf
EndIf
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_CONTEXTMENU
Func WM_ERASEBKGND($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg,$wParam, $lParam
DllCall($hDLL_GDI32, "bool", "BitBlt", "handle", $hDC, "int", 2, "int", 2, "int", $iW_Prev - 4, "int", $iH_Prev - 4, "handle", $hDC_backbuffer, "int", 0, "int", 0, "dword", $SRCCOPY)
Return 1
EndFunc ;==>WM_ERASEBKGND
Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg,$wParam, $lParam
DllCall($hDLL_GDI32, "bool", "BitBlt", "handle", $hDC, "int", 2, "int", 2, "int", $iW_Prev - 4, "int", $iH_Prev - 4, "handle", $hDC_backbuffer, "int", 0, "int", 0, "dword", $SRCCOPY)
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_NOTIFY
Func WM_DROPFILES($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg, $lParam
Local $aRet = DllCall("shell32.dll", "int", "DragQueryFile", "int", $wParam, "int", -1, "ptr", 0, "int", 0)
If @error Then Return SetError(1, 0, 0)
Local $sDroppedFile, $tBuffer = DllStructCreate("char[256]")
If $aRet[0] = 1 Then
DllCall("shell32.dll", "int", "DragQueryFile", "int", $wParam, "int", 0, "ptr", DllStructGetPtr($tBuffer), "int", DllStructGetSize($tBuffer))
$sDroppedFile = DllStructGetData($tBuffer, 1)
If StringInStr(FileGetAttrib($sDroppedFile), "D") Then
DllCall("shell32.dll", "none", "DragFinish", "int", $wParam)
Return MsgBox(16 + 262144, "Error", "This is not a file ;-)", 20, $hGUI)
EndIf
EndIf
DllCall("shell32.dll", "none", "DragFinish", "int", $wParam)
$sFile = $sDroppedFile
$bDnD = True
GUICtrlSendMsg($iBtnLoad, $BM_CLICK, 0, 0)
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_DROPFILES
#endregion Message Functions
#region needed additional functions
Func _GDIPlus_SaveBitmap($sFilename, $hBmp, $iJPGQual = 90, $iTpColor = 0)
Local $bError = False, $bResult, $aResult, $hBmp_BG, $hBmp1bpp, $hCtxt1bpp; $hBmp8bpp, $hCtxt8bpp
Local $sSaveTypes = "|jpg|bmp|gif|png|tif|", $sSaveType = "jpg"
Local $sSuffix = StringRight($sFilename, 3)
If StringInStr($sSaveTypes, $sSuffix) Then
$sSaveType = $sSuffix
Else
$sFilename &= "." & $sSaveType
EndIf
If FileExists($sFilename) Then
Local $iChoice = MsgBox(4 + 32 + 256 + 262144, "Warning", "'" & $sFilename & "' already exists!" & @CRLF & @CRLF & "Overwrite file?", 0, $hGUI)
If $iChoice = 7 Then Return 0
EndIf
If Not $iTabSelection Then
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", $GDIP_PXF01INDEXED, "ptr", 0, "int*", 0) ;create empty 32 bit bitmap
$hBmp1bpp = $aResult[6]
$hCtxt1bpp = _GDIPlus_ImageGetGraphicsContext($hBmp1bpp)
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hCtxt1bpp, "int", 5)
_GDIPlus_GraphicsDrawImageRect($hCtxt1bpp, $hBmp, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsDispose($hCtxt1bpp)
$hBmp = $hBmp1bpp
;~ ElseIf $iTabSelection = 7 Then
;~ $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", $GDIP_PXF08INDEXED, "ptr", 0, "int*", 0) ;create empty 32 bit bitmap
;~ $hBmp8bpp = $aResult[6]
;~ $hCtxt8bpp = _GDIPlus_ImageGetGraphicsContext($hBmp8bpp)
;~ DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hCtxt8bpp, "int", 0)
;~ _GDIPlus_GraphicsDrawImageRect($hCtxt8bpp, $hBmp, 0, 0, $iWidth, $iHeight)
;~ _GDIPlus_GraphicsDispose($hCtxt8bpp)
;~ $hBmp = $hBmp8bpp
EndIf
Switch $sSaveType
Case "jpg"
Local $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
Local $tParams = _GDIPlus_ParamInit(1)
Local $tData = DllStructCreate("int Quality")
DllStructSetData($tData, "Quality", $iJPGQual)
Local $pData = DllStructGetPtr($tData)
_GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
Local $pParams = DllStructGetPtr($tParams)
If $iTpColor Then
$hBmp_BG = _GDIPlus_ChangeBGColor($hBmp, 0xFF000000 + $iTpColor)
$bResult = _GDIPlus_ImageSaveToFileEx($hBmp_BG, $sFilename, $sCLSID, $pParams)
_GDIPlus_BitmapDispose($hBmp_BG)
Else
$bResult = _GDIPlus_ImageSaveToFileEx($hBmp, $sFilename, $sCLSID, $pParams)
EndIf
If Not $bResult Then
$bError = True
Else
$bError = False
EndIf
$tData = ""
$tParams = ""
Case Else
If $iTpColor And $sSuffix <> "png" Then
$hBmp_BG = _GDIPlus_ChangeBGColor($hBmp, 0xFF000000 + $iTpColor)
$bResult = _GDIPlus_ImageSaveToFile($hBmp_BG, $sFilename)
_GDIPlus_BitmapDispose($hBmp_BG)
Else
$bResult = _GDIPlus_ImageSaveToFile($hBmp, $sFilename)
EndIf
If Not $bResult Then
$bError = True
Else
$bError = False
EndIf
EndSwitch
If Not $iTabSelection Then _GDIPlus_BitmapDispose($hBmp)
If $bError Then
MsgBox(16 + 262144, "ERROR", "An error has occured - the image couldn't saved!", 30, $hGUI)
Return 0
EndIf
MsgBox(64 + 262144, "Information", "Image successfully saved to '" & $sFilename & "'", 10, $hGUI)
Return 1
EndFunc ;==>_GDIPlus_SaveBitmap
Func _GDIPlus_ChangeBGColor($hBitmap, $iBGColor)
Local $iW_TP = _GDIPlus_ImageGetWidth($hBitmap), $iH_TP = _GDIPlus_ImageGetHeight($hBitmap)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iW_TP, "int", $iH_TP, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0) ;create empty 32 bit bitmap
Local $hBmp_TP = $aResult[6]
Local $hCtxt_TP = _GDIPlus_ImageGetGraphicsContext($hBmp_TP)
_GDIPlus_GraphicsClear($hCtxt_TP, $iBGColor)
_GDIPlus_GraphicsDrawImageRect($hCtxt_TP, $hBitmap, 0, 0, $iW_TP, $iH_TP)
_GDIPlus_GraphicsDispose($hCtxt_TP)
Return $hBmp_TP
EndFunc ;==>_GDIPlus_ChangeBGColor
Func _GDIPlus_ImageClone($hImage)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCloneImage", "handle", $hImage, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[2]
EndFunc ;==>_GDIPlus_ImageClone
Func _GDIPlus_ImageAttributesCreate()
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateImageAttributes", "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[1]
EndFunc ;==>_GDIPlus_ImageAttributesCreate
Func _GDIPlus_ImageAttributesSetThreshold($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $nThershold = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetImageAttributesThreshold", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $fEnable, "float", $nThershold)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_ImageAttributesSetThreshold
Func _GDIPlus_ImageAttributesDispose($hImageAttributes)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDisposeImageAttributes", "handle", $hImageAttributes)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_ImageAttributesDispose
Func _GDIPlus_ImageAttributesSetColorMatrix($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $pClrMatrix = 0, $pGrayMatrix = 0, $iColorMatrixFlags = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetImageAttributesColorMatrix", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $fEnable, "ptr", $pClrMatrix, "ptr", $pGrayMatrix, "int", $iColorMatrixFlags)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_ImageAttributesSetColorMatrix
Func _GDIPlus_GraphicsDrawImageRectRectIA($hGraphics, $hImage, $nSrcX, $nSrcY, $nSrcWidth, $nSrcHeight, $nDstX, $nDstY, $nDstWidth, $nDstHeight, $hImageAttributes = 0, $iUnit = 2)
Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawImageRectRect", "handle", $hGraphics, "handle", $hImage, "float", $nDstX, "float", _
$nDstY, "float", $nDstWidth, "float", $nDstHeight, "float", $nSrcX, "float", $nSrcY, "float", $nSrcWidth, "float", _
$nSrcHeight, "int", $iUnit, "handle", $hImageAttributes, "int", 0, "int", 0)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsDrawImageRectRectIA
Func _GDIPlus_ColorMatrixCreateGrayScale()
Local $iI, $iJ, $tCM, $aLums[4] = [$GDIP_RLUM, $GDIP_GLUM, $GDIP_BLUM, 0]
$tCM = DllStructCreate($tagGDIPCOLORMATRIX)
For $iI = 0 To 3
For $iJ = 1 To 3
DllStructSetData($tCM, "m", $aLums[$iI], $iI * 5 + $iJ)
Next
Next
DllStructSetData($tCM, "m", 1, 19)
DllStructSetData($tCM, "m", 1, 25)
Return $tCM
EndFunc ;==>_GDIPlus_ColorMatrixCreateGrayScale
Func _GDIPlus_ColorMatrixCreateNegative()
Local $iI, $tCM
$tCM = _GDIPlus_ColorMatrixCreateScale(-1, -1, -1, 1)
For $iI = 1 To 4
DllStructSetData($tCM, "m", 1, 20 + $iI)
Next
Return $tCM
EndFunc ;==>_GDIPlus_ColorMatrixCreateNegative
Func _GDIPlus_ColorMatrixCreateScale($nRed, $nGreen, $nBlue, $nAlpha = 1)
Local $tCM
$tCM = DllStructCreate($tagGDIPCOLORMATRIX)
DllStructSetData($tCM, "m", $nRed, 1)
DllStructSetData($tCM, "m", $nGreen, 7)
DllStructSetData($tCM, "m", $nBlue, 13)
DllStructSetData($tCM, "m", $nAlpha, 19)
DllStructSetData($tCM, "m", 1, 25)
Return $tCM
EndFunc ;==>_GDIPlus_ColorMatrixCreateScale
Func _GDIPlus_EffectCreate($sEffectGUID, $pEffect = 0)
Local $iI, $tGUID, $pGUID, $tElem, $aElem[4], $aResult
$tGUID = _WinAPI_GUIDFromString($sEffectGUID)
$pGUID = DllStructGetPtr($tGUID)
$tElem = DllStructCreate("uint[4]", $pGUID)
For $iI = 1 To 4
$aElem[$iI - 1] = DllStructGetData($tElem, 1, $iI)
Next
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateEffect", "uint", $aElem[0], "uint", $aElem[1], "uint", $aElem[2], "uint", $aElem[3], "uint*", $pEffect)
If @error Then Return SetError(@error, @extended, 0)
Return SetError($aResult[0], 0, $aResult[5])
EndFunc ;==>_GDIPlus_EffectCreate
Func _GDIPlus_EffectsSetParameters($pEffectObject, $tEffectParameters, $iSizeAdj = 1)
Local $aSize = DllCall($ghGDIPDll, "uint", "GdipGetEffectParameterSize", "ptr", $pEffectObject, "uint*", 0)
Local $iSize = $aSize[2] * $iSizeAdj
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetEffectParameters", "ptr", $pEffectObject, "struct*", $tEffectParameters, "uint", $iSize)
If @error Then Return SetError(@error, @extended, 0)
Return SetError($aResult[0], 0, $aResult[3])
EndFunc ;==>_GDIPlus_EffectsSetParameters
Func _GDIPlus_EffectDispose($pEffect)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDeleteEffect", "ptr", $pEffect)
If @error Then Return SetError(@error, @extended, 0)
Return SetError($aResult[0], 0, $aResult[0] = 0)
EndFunc ;==>_GDIPlus_EffectDispose
Func _GDIPlus_DrawImageFX($hGraphics, $hBitmap, $tRECTF, $pEffect, $hMatrix = 0, $pImgAttributes = 0, $iUnit = 2)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDrawImageFX", _
"handle", $hGraphics, _
"handle", $hBitmap, _
"struct*", $tRECTF, _
"handle", $hMatrix, _
"ptr", $pEffect, _
"ptr", $pImgAttributes, _
"uint", $iUnit)
If @error Then Return SetError(@error, @extended, 0)
Return SetError($aResult[0], 0, $aResult[0] = 0)
EndFunc ;==>_GDIPlus_DrawImageFX
Func CopyImage2Gfx($hBmp, $hGraphic, $hDC, $hDC_backbuffer, $bW, $bH, $hIA = 0)
Local $f, $iXPos, $iYPos, $iImgW, $iImgH
_GDIPlus_GraphicsClear($hGraphic, 0xFF000000 + $iBGColor)
If $bW < $iW_Prev And $bH < $iH_Prev Then
$iXPos = ($iW_Prev - $bW) / 2
$iYPos = ($iH_Prev - $bH) / 2
$iImgW = $bW
$iImgH = $bH
Else
If $bW > $bH Then
$f = $bW / $iW_Prev
If ($bH / $f) > $iH_Prev Then $f = $bH / $iH_Prev
Else
$f = $bH / $iH_Prev
EndIf
$iImgW = Int($bW / $f)
$iImgH = Int($bH / $f)
$iXPos = ($iW_Prev - $iImgW) / 2 - 2
$iYPos = ($iH_Prev - $iImgH) / 2 - 2
EndIf
If $hIA Then
_GDIPlus_GraphicsDrawImageRectRectIA($hGraphic, $hBmp, 0, 0, $bW, $bH, $iXPos, $iYPos, $iImgW, $iImgH, $hIA)
Else
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBmp, $iXPos, $iYPos, $iImgW, $iImgH)
EndIf
DllCall($hDLL_GDI32, "bool", "BitBlt", "handle", $hDC, "int", 2, "int", 2, "int", $iW_Prev - 4, "int", $iH_Prev - 4, "handle", $hDC_backbuffer, "int", 0, "int", 0, "dword", $SRCCOPY)
EndFunc ;==>CopyImage2Gfx
Func _GDIPlus11_Startup() ;code by Authenticity - modified by UEZ
Local $tInput, $tToken, $aResult, $sGDIPDLL, $sVer
$giGDIPRef += 1
If $giGDIPRef > 1 Then Return True
Switch @OSVersion
Case "WIN_VISTA", "WIN_2008"
$sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll"
Case Else
$sGDIPDLL = @SystemDir & "\gdiplus.dll"
EndSwitch
$sVer = FileGetVersion($sGDIPDLL)
If $sVer < "6.0" Then Return SetError(1, 0, False) ;For XP you need a GDIPlus.dll v1.1 in the script directory, refer to: http://www.winsxs.org/?OtherTech/thread-13-1-1
$ghGDIPDll = DllOpen($sGDIPDLL)
$tInput = DllStructCreate($tagGDIPSTARTUPINPUT)
$tToken = DllStructCreate("int Data")
DllStructSetData($tInput, "Version", 1)
$aResult = DllCall($ghGDIPDll, "int", "GdiplusStartup", "struct*", $tToken, "struct*", $tInput, "ptr", 0)
If @error Then Return SetError(2, @extended, False)
$giGDIPToken = DllStructGetData($tToken, "Data")
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus11_Startup
Func _GDIPlus_Convert2HBitmap($hBitmap, $iColor); removes alpha backround using system color and converts to gdi bitmap
Local $iBGColor = _WinAPI_GetSysColor($iColor)
$iBGColor = 0x10000 * BitAND($iBGColor, 0xFF) + BitAND($iBGColor, 0x00FF00) + BitShift($iBGColor, 16)
Local $iWidth = _GDIPlus_ImageGetWidth($hBitmap), $iHeight = _GDIPlus_ImageGetHeight($hBitmap)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0)
Local $hBitmap_New = $aResult[6]
Local $hCtx_new = _GDIPlus_ImageGetGraphicsContext($hBitmap_New)
Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iBGColor)
_GDIPlus_GraphicsFillRect($hCtx_new, 0, 0, $iWidth, $iHeight, $hBrush)
_GDIPlus_GraphicsDrawImageRect($hCtx_new, $hBitmap, 0, 0, $iWidth, $iHeight)
Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_New)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_BitmapDispose($hBitmap_New)
_GDIPlus_GraphicsDispose($hCtx_new)
Return $hHBitmap
EndFunc ;==>_GDIPlus_Convert2HBitmap
Func _GDIPlus_BMPFromMemory($bImage, $hHBitmap = False)
If Not IsBinary($bImage) Then Return SetError(1, 0, 0)
Local $aResult
Local Const $memBitmap = Binary($bImage) ;load image saved in variable (memory) and convert it to binary
Local Const $len = BinaryLen($memBitmap) ;get length of image
Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002)
Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer
Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct
DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data
_MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE
$aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) ;Creates a stream object that uses an HGLOBAL memory handle to store the stream contents
If @error Then Return SetError(2, 0, 0)
Local Const $hStream = $aResult[3]
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface
If @error Then Return SetError(3, 0, 0)
Local Const $hBitmap = $aResult[2]
Local $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr")
DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _
"dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak
$tMem = 0
$tVARIANT = 0
If $hHBitmap Then
Local Const $hHBmp = _WinAPI_BitmapCreateDIBFromBitmap($hBitmap)
_GDIPlus_BitmapDispose($hBitmap)
Return $hHBmp
EndIf
Return $hBitmap
EndFunc ;==>_GDIPlus_BMPFromMemory
Func _WinAPI_BitmapCreateDIBFromBitmap($hBitmap) ;create 32-bit bitmap v5 (alpha channel supported)
Local $tBIHDR, $aRet, $tData, $pBits, $hResult = 0
$aRet = DllCall($ghGDIPDll, 'uint', 'GdipGetImageDimension', 'ptr', $hBitmap, 'float*', 0, 'float*', 0)
If (@error) Or ($aRet[0]) Then Return 0
$tData = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $aRet[2], $aRet[3], $GDIP_ILMREAD, $GDIP_PXF32ARGB)
$pBits = DllStructGetData($tData, 'Scan0')
If Not $pBits Then Return 0
$tBIHDR = DllStructCreate('dword bV5Size;long bV5Width;long bV5Height;word bV5Planes;word bV5BitCount;dword bV5Compression;' & _ ;http://msdn.microsoft.com/en-us/library/windows/desktop/dd183381(v=vs.85).aspx
'dword bV5SizeImage;long bV5XPelsPerMeter;long bV5YPelsPerMeter;dword bV5ClrUsed;dword bV5ClrImportant;' & _
'dword bV5RedMask;dword bV5GreenMask;dword bV5BlueMask;dword bV5AlphaMask;dword bV5CSType;' & _
'int bV5Endpoints[3];dword bV5GammaRed;dword bV5GammaGreen;dword bV5GammaBlue;dword bV5Intent;' & _
'dword bV5ProfileData;dword bV5ProfileSize;dword bV5Reserved')
DllStructSetData($tBIHDR, 'bV5Size', DllStructGetSize($tBIHDR))
DllStructSetData($tBIHDR, 'bV5Width', $aRet[2])
DllStructSetData($tBIHDR, 'bV5Height', $aRet[3])
DllStructSetData($tBIHDR, 'bV5Planes', 1)
DllStructSetData($tBIHDR, 'bV5BitCount', 32)
DllStructSetData($tBIHDR, 'bV5Compression', 0) ; $BI_BITFIELDS = 3, $BI_RGB = 0, $BI_RLE8 = 1, $BI_RLE4 = 2, $RGBA = 0x41424752
DllStructSetData($tBIHDR, 'bV5SizeImage', $aRet[3] * DllStructGetData($tData, 'Stride'))
DllStructSetData($tBIHDR, 'bV5AlphaMask', 0xFF000000)
DllStructSetData($tBIHDR, 'bV5RedMask', 0x00FF0000)
DllStructSetData($tBIHDR, 'bV5GreenMask', 0x0000FF00)
DllStructSetData($tBIHDR, 'bV5BlueMask', 0x000000FF)
DllStructSetData($tBIHDR, 'bV5CSType', 2) ; LCS_WINDOWS_COLOR_SPACE = 2
DllStructSetData($tBIHDR, 'bV5Intent', 4) ; $LCS_GM_IMA
$hResult = DllCall('gdi32.dll', 'ptr', 'CreateDIBSection', 'hwnd', 0, 'ptr', DllStructGetPtr($tBIHDR), 'uint', 0, 'ptr*', 0, 'ptr', 0, 'dword', 0)
If (Not @error) And ($hResult[0]) Then
DllCall('gdi32.dll', 'dword', 'SetBitmapBits', 'ptr', $hResult[0], 'dword', $aRet[2] * $aRet[3] * 4, 'ptr', DllStructGetData($tData, 'Scan0'))
$hResult = $hResult[0]
Else
$hResult = 0
EndIf
_GDIPlus_BitmapUnlockBits($hBitmap, $tData)
$tData = 0
$tBIHDR = 0
Return $hResult
EndFunc ;==>_WinAPI_BitmapCreateDIBFromBitmap
;Code below was generated by: 'File to Base64 String' Code Generator v1.12 Build 2013-05-17
Func Reset_Icon()
Local $Reset_Icon
$Reset_Icon &= "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR42mNkIAKwxjMJM/9i8vjx9M86hkMM35HlGAlpZslmcFMxllssrMcidq7/Ydr3pX9nE2dANIOImD7HXCltAT9hUX4GEUkhhps7vj+/kHpBCq8B7BHMvPwezFUCnHylopI8zOxM7AyszGwMAvwCDPwK3Axz9Hf6/rv9fwtOA5itGIPlUvjXiMryMPDy8jFwMHMwcLJzMgjw8jNoK6gwrF9y/vGh2MNy+L3AwcDGYMRgoJMivdLQWUOBm4WbgYebh4HxNyPDP5FvDPNd92S92/N5OsFAtFqj8cDCVVeenY2D4fyxa3c4jkvclnDm9fzw4BvDishNjAQNCDhu/VbfREPo28/vDA8OvPq42mePQGRKLPfyOYu/EhWNQUdt3uiaawh//PKR4cdhln8zfJczo6vBa4DHJtPHZj66Mm/fvWf4tov5//yoNUwwuf///7MwMjL+wWuAzUyd97ZpJgJvnr5h2H/i9Ls7IS+FQeJrVq1nDAkL/E/QBYELvK+yeX3UYv/Ew7Dn7u4HDGdzjJ9VTXxHtBeCZwR1vOO9H8tjwyL15fC3R5/OftQ62//kK9EGgIDaZMmez4ovikV5JRmYtvBmXui+OQMkPmPxSsaM2PD/BA0AgfA6t9gzpqcX/WT6yiC6V0n3fN+NK/uOXmZ0stYlzgAQiOwOdb/14+yEs5z3/jOUMGjBxAESN7ER3OAlewAAAABJRU5ErkJggg=="
Return Binary(_Base64Decode($Reset_Icon))
EndFunc ;==>Reset_Icon
Func _Logo($bSaveBinary = False, $sSavePath = @ScriptDir)
Local $Logo
$Logo &= 'Er4A/9j/4AAQSkYASUYAAQEBAGABABAA/9sAQwAEQAIDAwMCBAAgBCEAAAUJBgUAAAsIAAgGCQ0LDQ0NAAsMDA4QFBEOAA8TDwwMEhgSABMVFhcXFw4RABkbGRYaFBYXCh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Jw6z4tsdYvbyWSCxU7LMgeXu9fx4znOcCuiq7sAAA898a+CfENwB+PLnWtB1W3gALXV7AWmpQTAC8nb91lI7Y4ACPTPrxhN4J8QA+i/DTw5Z2OgBlrqF7ouomewCLV5sLMpJGQQDvxj8/qK9fogCAPMfHI+K+qQDg2dbOw023mgByqNaxzHcYzwDe+bk+x5HGeACtb4bab4z0+wALG2voNL0+1gAD++giJd5c9QAluefy6DtxXSDFFABRRVgDgen/WV3/Af8B/wD/AP8A/wD/AAP/AP8AAf/Z'
$Logo = _Base64Decode($Logo)
Local $tSource = DllStructCreate('byte[' & BinaryLen($Logo) & ']')
DllStructSetData($tSource, 1, $Logo)
Local $tDecompress
_WinAPI_LZNTDecompress($tSource, $tDecompress, 33819)
$tSource = 0
Local $bString = Binary(DllStructGetData($tDecompress, 1))
If $bSaveBinary Then
Local $hFile = FileOpen($sSavePath & "\GDI+ Color Transformer 07.2.1.jpg", 18)
FileWrite($hFile, $bString)
FileClose($hFile)
EndIf
Return $bString
EndFunc ;==>_Logo
Func _Base64Decode($sB64String)
Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)
If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "")
Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]")
$aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0)
If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "")
Return DllStructGetData($bBuffer, 1)
EndFunc ;==>_Base64Decode
Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize)
$tOutput = DllStructCreate("byte[" & $iBufferSize & "]")
If @error Then Return SetError(1, 0, 0)
Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0)
If @error Then Return SetError(2, 0, 0)
If $aRet[0] Then Return SetError(3, $aRet[0], 0)
Return $aRet[6]
EndFunc ;==>_WinAPI_LZNTDecompress
#endregion needed additional functions