Jump to content

GDI+ Color Transformer v0.9.7 build 2016-04-23


UEZ
 Share

Recommended Posts

Very nice work UEZ !

Look nice too !

You could add some tooltips for help to understand each effect setting.

It gives nice effects ( and so why not call it GdiPhotoEffects ? )  o:)

Didn't find any bug (win7x64)

Thanks to share this little jewel !  :thumbsup:

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Thanks for your comments wakillon!

You could add some tooltips for help to understand each effect setting.

I assume that information about each effect will go beyond the scope of the tool tip. ;)

It gives nice effects ( and so why not call it GdiPhotoEffects ? )

Well, it manipulates only the colors of an image not any pixel and that's the reason why I called it that way. Calling it Photo Effects will convey a false impression imho.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Hmm, I think yes but I'm not really sure. I will make a test soon.

Ok, you got me! ;)  The Blur effect manipulates also the pixels.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

very nice UEZ, lot of work. xp users >who follow these instructions to obtain complete gdiplus 1.1 functionality, have the gdiplus.dll v 6.x in the script directory. that is why i recommend the following _GDIPlus_Startup() function:

 

Edited code

Func _GDIPlus11_Startup() ;code by Authenticity - modified by UEZ - modified by Edano
    $giGDIPRef += 1
    If $giGDIPRef > 1 Then Return True

    ; check system version first
    Global $ghGDIP_DLL_location="GDIPlus.dll"; sometimes needed eg for convolution.au3
    If Number(FileGetVersion($ghGDIP_DLL_location))<6 Then; OS Vista or higher v 6.x.x.x

        ; OS XP v 5.x.x.x
        $ghGDIP_DLL_location=@ScriptDir&"\GDIPlus.dll"; check local
        If Number(FileGetVersion($ghGDIP_DLL_location))<6 Then
            MsgBox(0x40010,"Error","This script only runs on OS Vista or higher."&@CRLF&@CRLF&"For XP you need a GDIPlus.dll v1.1 in the script directory, refer to:       "&@CRLF&"http://www.winsxs.org/?OtherTech/thread-13-1-1")
            Return False
        EndIf
    EndIf

    $ghGDIPDll = DllOpen($ghGDIP_DLL_location)
    If $ghGDIPDll = -1 Then
        $giGDIPRef = 0
        Return SetError(1, 2, False)
    EndIf

    Local $tInput = DllStructCreate($tagGDIPSTARTUPINPUT)
    Local $tToken = DllStructCreate("ulong_ptr Data")
    DllStructSetData($tInput, "Version", 1)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdiplusStartup", "struct*", $tToken, "struct*", $tInput, "ptr", 0)
    If @error Then Return SetError(@error, @extended, False)
    $giGDIPToken = DllStructGetData($tToken, "Data")
    Return $aResult[0] = 0
EndFunc   ;==>__GDIPlus_Startup
Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

@Edano: does it work for you also on WinXP?

I didn't include the check for Win XP because it is experimental (somehow I didn't get it run in my WinXP vm)!

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

@Edano: does it work for you also on WinXP?

I didn't include the check for Win XP because it is experimental (somehow I didn't get it run in my WinXP vm)!

Br,

UEZ

 

yes, it works. you must follow the exactly, then you use the gdiplus v1.1 dll in the script directory. all effects work like a charm. be very careful with the hex editor, as i pointed it out. copy the three files needed from a vista or win7 OS. i use winxp pro service pack 3, can't say if that is important.

try it again and tell me if you're stuck. maybe by PM ?

Edano

 

Edit PM sent

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

  • 10 months later...

Your are welcome. What did you do which this tool?

What does "eiei" mean?

 

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Hi UEZ, congratulations for this cool tool, as usual coming from you.

Perhapsyou can help me, I'm getting some errors hen I attempt to run it, I believe it comesfrom GDI but not figured out how to solve it.Thanks in advance and regards.

 

"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(70,151) : error: $tagGDIPCOLORMATRIX previously declared as a 'Const'.
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(102,52) : error: $GDIP_RLUM previously declared as a 'Const'.
Global $GDIP_RLUM = $iSlider_GSLumRed_Default / 100,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(102,100) : error: $GDIP_GLUM previously declared as a 'Const'.
Global $GDIP_RLUM = $iSlider_GSLumRed_Default / 100, $GDIP_GLUM = $iSlider_GSLumGreen_Default / 100,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(102,166) : error: $GDIP_BLUM previously declared as a 'Const'.
Global $GDIP_RLUM = $iSlider_GSLumRed_Default / 100, $GDIP_GLUM = $iSlider_GSLumGreen_Default / 100, $GDIP_BLUM = $iSlider_GSLumBlue_Default / 100; ; Colors luminace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(860,48) : error: $GDIP_RLUM previously declared as a 'Const'.
   $GDIP_RLUM = $iSlider_GSLumRed_Default / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(861,50) : error: $GDIP_GLUM previously declared as a 'Const'.
   $GDIP_GLUM = $iSlider_GSLumGreen_Default / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(862,49) : error: $GDIP_BLUM previously declared as a 'Const'.
   $GDIP_BLUM = $iSlider_GSLumBlue_Default / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1093,54) : error: $GDIP_BLUM previously declared as a 'Const'.
   $GDIP_BLUM = GUICtrlRead($iSlider_GSLumBlue) / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1098,55) : error: $GDIP_GLUM previously declared as a 'Const'.
   $GDIP_GLUM = GUICtrlRead($iSlider_GSLumGreen) / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1103,53) : error: $GDIP_RLUM previously declared as a 'Const'.
   $GDIP_RLUM = GUICtrlRead($iSlider_GSLumRed) / 100
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1224,114) : error: _WinAPI_CopyImage() already defined.
Func _WinAPI_CopyImage($hImage, $iType = 0, $xDesired = 0, $yDesired = 0, $iFlags = 0); from _WinAPIEx by Yashied
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1324,38) : error: _GDIPlus_ImageAttributesCreate() already defined.
Func _GDIPlus_ImageAttributesCreate()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1336,56) : error: _GDIPlus_ImageAttributesDispose() already defined.
Func _GDIPlus_ImageAttributesDispose($hImageAttributes)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1342,163) : error: _GDIPlus_ImageAttributesSetColorMatrix() already defined.
Func _GDIPlus_ImageAttributesSetColorMatrix($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $pClrMatrix = 0, $pGrayMatrix = 0, $iColorMatrixFlags = 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1356,43) : error: _GDIPlus_ColorMatrixCreateGrayScale() already defined.
Func _GDIPlus_ColorMatrixCreateGrayScale()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1369,42) : error: _GDIPlus_ColorMatrixCreateNegative() already defined.
Func _GDIPlus_ColorMatrixCreateNegative()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1378,74) : error: _GDIPlus_ColorMatrixCreateScale() already defined.
Func _GDIPlus_ColorMatrixCreateScale($nRed, $nGreen, $nBlue, $nAlpha = 1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1389,55) : error: _GDIPlus_EffectCreate() already defined.
Func _GDIPlus_EffectCreate($sEffectGUID, $pEffect = 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1410,38) : error: _GDIPlus_EffectDispose() already defined.
Func _GDIPlus_EffectDispose($pEffect)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3"(1416,114) : error: _GDIPlus_DrawImageFX() already defined.
Func _GDIPlus_DrawImageFX($hGraphics, $hBitmap, $tRECTF, $pEffect, $hMatrix = 0, $pImgAttributes = 0, $iUnit = 2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:TempAU3GDIGDI-Color TransormerGDI+ Color Transformer.au3 - 20 error(s), 0 warning(s)
!>10:58:56 AU3Check ended. Press F4 to jump to next error.rc:2
>Exit code: 2    Time: 0.688

Link to comment
Share on other sites

The code works only for v3.3.8.1 or lower. I didn't update the code yet to run it also for > 3.3.9.x.

Edit: it seems very hard to update the code to run properly on > 3.3.9.x.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • 1 year later...

Is this still only working on v3.3.8.1 or lower?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Yes, because those GDI+ functions have been added to the GDIPlus.au3 meanwhile but with different function calls, etc. which is a nightmare to adjust the whole code now.

Further I didn't update the code - it is still the same as posted.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...