Jump to content
UEZ

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

Recommended Posts

wakillon

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

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
wakillon

Ok, but do the Blur effect change only colors ?


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

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
mesale0077

Very nice work UEZ !

thank you

Share this post


Link to post
Share on other sites
Edano

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]

Share this post


Link to post
Share on other sites
UEZ

@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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
Edano

@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]

Share this post


Link to post
Share on other sites
MossMoss

Thank you Very much UEZ. I register this website for thank you eiei.

your code help me very much.

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
jcpetu

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

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
jcpetu

UEZ, okey dokey,  no problem.

Thanks for the answer and the beautifull peace of code.

Br.

Share this post


Link to post
Share on other sites
nitekram

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

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
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

  • Similar Content

    • Xandy
      By Xandy
      MapIt is a tile world editor.  MapIt was built around the concept of reversing Dragon Warrior map images.  MapIt can take image input and produce a tile and world array.
      MapIt features Unity style dragable labels that adjust property values.

      MapParser is a C++ project that scans images for unique tiles.  MapParser is very fast.  Due to hard drive failure, many bugs were restored b/c I had to rewind many years.  Frustrated with the design, I wrote a new version from the ground up.  This New Version:  AutoIt Front-end, command line controls, and shared with the world; so that I can't lose it again.
      You can toggle the C++ MapParser off to see the difference in speeds between the MapParser CPP verse AutoIt function.  Function is named Scan_Tiles() in AutoIt.  You can also chose to download without MapParser.exe.
      At the moment Scanning a image resets the arrays, but you can add tiles after scanning.
      Images can be added as tiles without scan image at all.  Then configure settings to give your world parameters and manually fill the world data with tile indexes.
      Using the settings you can change tile size after a scan.  Example: you wanted to replace a map with different sized tiles.
      Changing and replacing tile / world data is easy.  B/c tile world editor.

      Hotkeys, I use CTRL+R in image above to signal replace tile action and I use "G" to Get the tile under mouse.
      Hotkeys are not saved to disk and thus are set to default between sessions.
      I might draw the world to pre-rendered surfaces and use them as multi-layer someday.  I do that in my AutoIt, DragonWarrior Remake but I could spend forever unsure what features are important for this.  The DW_Remake has a method of replacing a tile with a tile on two layers.  So you could replace a tree on the first layer with a grass, and a tree in the second layer.  This is all getting very confusing.
      I attempted to write the good code.  If something could be better, please advise.
      Forth release.  Enjoy.
      For download, videos, and example of created world file data; please visit the MapIt webpage: http://songersoft.com/programming/mapit/mapit_about.phtml
      Special thanks: @AdmiralAlkex, @Melba23, @MrCreatoR
      Main AutoIt source file: Will not run without other Includes and SDL DLLs.
      Last Update: 5/23/2018 7:55 PM EST
      Next Version  
    • Ambient
      By Ambient
      I have tried several way sto get this to work to no avail. Any help would be appreciated. #include <ListViewConstants.au3> #include <GuiListView.au3> #include "GuiListViewEx.au3" $idItem = GUICtrlCreateListViewItem($r & " | " & $c & $adoRs.Fields("TransactionAmount").value & " | " & $Timestamp & " | " & _StringProper($adoRs.Fields("Tillid").value) & @CRLF & @CRLF & "Card Number : " & $cardnum & " " , $idListView) ConsoleWrite( "IDITEM" & $idItem) If STRINGLEFT($adoRs.Fields("TransactionAmount").value,1)= "-" Then Consolewrite(" String is Negative" & @CRLF) ;Drops in Here as expected ;GUICtrlSetColor(-1, $COLOR_RED) ; Colour line if item is negative this didn' work $TxC= _GUICtrlListView_SetTextColor($hListView, $CLR_RED) ; I also tried $TxC= _GUICtrlListView_SetTextColor(-1, 0xFF0000) CONSOLEWRITE("TEXTCOLOUR RETURNED " & $TxC & @crlf) ; This is returning True ELSE Consolewrite(" String is NOT Negative" & @CRLF) EndIf  
    • lenclstr746
      By lenclstr746
      HELLO GUYS
      I'm a work on a background see and click bot project 
      I can complete it if your help me
      (using imagesearch , gdi+ and  fastfind)
    • dadalt95
      By dadalt95
      I would like to know if it's possible to pass an image recognition (captcha) system.
       
      What are the ways to achieve this?
      Just the references or links is enough for me by now.
       
      Thanks by now!
       
      Thanks!
    • Xandy
      By Xandy
      I have a bunch of SDL_Surfaces loaded into memory.  I want to list them in a ComboBox.
      Using this code, I can load images to the combobox from file but not from existing SDL_Surface memory
      CODE ISN"T MEANT TO RUN
      ; Create combobox pic list example $aControl[$iControl_id][$eControl_data] = _GUICtrlComboBoxEx_Create($gui, $data_value, $data_x, $data_y, $data_w, $data_h, $CBS_DROPDOWNLIST) ; Image List for ComboboxEx Local $hImage = _GUIImageList_Create($gTile_w, $gTile_h, 6) ; Fill hImage with SDL_Surfaces stored in memory: aNPC_surf[scale][type][way][frame] For $i = 0 To 1 ; This works but only from file: ;_GUIImageList_AddBitmap($hImage, $gFolder_graphics & $gaWorld_info[$player.iWorld_cur][$eWi_filename] & "Tiles\" & $i & ".bmp") ; I've broken up a sprite sheet and want to insert into combobox from memory ;_GUIImageList_Add($hImage, $aNPC_surf[1][1][1][$i]) _GUIImageList_Add($hImage, _GDIPlus_BitmapCreateFromMemory($aNPC_surf[1][1][1][$i]), True) ;_GDIPlus_BitmapCreateFromMemory($aNPC_surf[1][1][1][$i]) ; Add the index number to combobox item _GUICtrlComboBoxEx_AddString($aControl[$eNPC_iPic_type][$eControl_data], $i, $i, $i) Next ; Set hImage list to combobox control _GUICtrlComboBoxEx_SetImageList($aControl[$eNPC_iPic_type][$eControl_data], $hImage) Anyone know if I can convert from SDL_Surface to hBitmap?  Maybe I'm doing something else wrong.
       
      I've seen hBitmap converted to SDL_Surface but I don't really understand it yet: 
       
      My full script can be found here:
       
×