Jump to content
UEZ

AutoIt Watermark Image v0.89 beta build 2014-08-25

Recommended Posts

engjcowi

Looks great


Drunken Frat-Boy Monkey Garbage

Share this post


Link to post
Share on other sites
mesale0077

nice code

Share this post


Link to post
Share on other sites
Chance

You're a legend in this GDI stuff, like for real!

Share this post


Link to post
Share on other sites
Myicq

It's when you see things like this you realize how far you have to go to master the AutoIT language. Awesome job!

A few comments:

In my PC, the color picker (choose color for text) totally messed up the gui when closing the color picker. Like the gui was not redrawn. Had to exit the program. Not sure if this is general.

Also a suggestion or two: would be nice to have a ini or SQLite database settings file so that I could store and save settings from the program ? These could also be used with a sister script : command line version like

c:> wmimg.exe  /S mymark1  *.png

to watermark using setting "mymark1"

..and perhaps also a drag-n-drop version now we are at the wishes ? ;)

But hey, wishes are free. Again: thank you for your awesome work so far. I will save this script and learn from it.


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
UEZ

@engjcowi, mesale0077, JScript, FlutterShy, Myicq: thanks for your feedback!

@Myicq: what os are you using. which AutoIt version? I never saw this mess up! I will add drag 'n' drop, a sub menu for batch watermarking images and commandline options for batch processing from external programs. About saving settings to a ini file I need to think about it whether it makes sense.

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
Myicq

UEZ, thanks for that.

I think the settings file would be good, since you have so many options.

My version info here:

@AutoITVersion = 3.3.8.1 (I can use others no problem, just happened to test here)

@OsBuild = 2600

@OsType = Win32_NT

@OSVersion = WIN_XP

@OsLang = 0406 da_DK

@OsServicePack = SP3

Screenshot:

Posted Image

Edited by Myicq

I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
UEZ

I tested it in a VM running WinXP but the GUI still looks good after closing the color picker GUI.

Does it appear also when you don't choose a color and press Cancel? Show me the screenshot please.

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
Myicq

It does appear also after pressing Cancel. But there are 100s of things that can be different from my machine here to your VM.

Btw: the gui also messes up if I drag your program around the screen, especially if I dragit outside visible screen area and back.

Not sure why, perhaps GDI area / functions ? My simple Autoit scripts don't do this.

Let me know how I can / should test for you.


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
UEZ

Can you replace this code with the original one and test again?

Case $idButtonColor_WM
                $iColorFont_WM = _ChooseColor(2, $iColorFont_WM, 2, HWnd($hGUI_WM))
                If Not @error Then
                    GUICtrlSetBkColor($idButtonColor_WM, $iColorFont_WM)
                    _WinAPI_RedrawWindow(HWnd($hGUI_WM), 0, 0, BitOR($RDW_INVALIDATE, $RDW_UPDATENOW))
                    UpdatePreview_WM()
                    $iSaveColor_WM = $iColorFont_WM
                Else
                    $iColorFont_WM = $iSaveColor_WM
                EndIf

It is in the main While loop.

Thanks,

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
Myicq

Same thing, no difference after replacing that code block.

But I think it's not releated to this button as dragging the GUI around also causes artifacts.

Is there other GDI+ test suites, or somewhere I can identify versions of GDI+ ?

Just to possibly target at my installation here, or potential version info clashes.

EDIT: dragging issue seems to happen only when an image is loaded.

Initially when no image is loaded I can drag as I want. Main window does not go "bad"

Edited by Myicq

I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
UEZ

Can you test it on a different PC with WinXP? Or just login with a different user on same PC?

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
funkey

Hello UEZ, nice and useful script! *****

But on my WinXP I have the same error with messing up the window if a picure is loaded.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
UEZ

Thanks to funkey who found the problem -> WM_ERASEBKGND_WM is causing the issue on non aero desktops, also on Win7!

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
JScript

Drag-and-drop would be wonderful, but not wanting to abuse, it would be great if had something related to image resizing, Madonna mia, splendid!

For me to put multiple images on the web, it came came from heaven, it is easy to manipulate and very intuitive!!! :thumbsup:

Posted Image again * 2...

JS


http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
UEZ

Drag-and-drop would be wonderful, but not wanting to abuse, it would be great if had something related to image resizing, Madonna mia, splendid!

For me to put multiple images on the web, it came came from heaven, it is easy to manipulate and very intuitive!!! :thumbsup:

Posted Image again * 2...

JS

Drag 'n' drop is already implemented since version 0.55 and now in 0.60 you can resize the image -> press More button and select Resize.

What will come next?: command line parameters to call it from a batch job which will be a pain in the ass to implement all the possible features and settings...

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
Myicq

What will come next?: command line parameters to call it from a batch job which will be a pain in the ass to implement all the possible features and settings...

Depends how you implement it, doesn't it ? I would myself do this:

* in main GUI, make a button "save parameter set", ask for a name and save all parameters in an SQLite DB "settings.db"

* from batch, call something like toolname.exe -s mysetup

* you only need one parameter to check for. If left out, take a default.

* possibly allow override of text to watermark ?

* possibly allow parameter -f [db|ini] to use either SQLite or ini format.

In any case, this looks very promising!


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
UEZ

That would make sense when all images have the same dimension! What if you have different image sizes? Just think about it (font size, image stamp size, radius, etc)! Otherwise you will use all default settings except color, position, type (circular / standard) and fx type of the text. Then it's not so hard I think.

Is the issue with the messed up screen fixed now for you?

Btw, I added "Emboss" as a text effect. I will release it when the rotation of the text is working as I want (I've rewritten that part).

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

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
      Special thanks: AdmiralAlkex, Melba23, MrCrearoR, Dragon Warrior 3, SDL
      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.  
      Changing and replacing tile / world data is easy.  B/c tile world editor.

      CTRL+R in image above to signal replace tile action and I use "G" to Get the tile under mouse.
      A full list of hotkeys can be assigned in the: Help Menu\Hotkeys
       
      MapParser is a C++ project that scans images for unique tiles. 
      MapIt can be downloaded without MapParser. MapParser can be toggled off in the Scan_Image dialog. Without MapParser, MapIt will use the Scan_Tiles() function written in AutoIt ; which is 100 * slower Idk. If MapParser.exe will not run for you:      Installing Visual C++ Redistributable for Visual Studio 2015 should fix it: https://www.microsoft.com/en-us/download/details.aspx?id=48145   
      You can start with example world and tiles.
      Example world was made following these steps:
      Started with a tile map image of DragonWarrior3 town of: Reeve From MapIt World Menu \ New \ Scan_Image dialog, I set the area to exclude the key legend to the far right of image. After scanning the map image to world and tile array.  I removed a few of the map artifacts.  More work could be done on this world; removing unwanted tiles, but it is fine for now. I saved my world to disk.  This creates folder: Worldname: Containing folder of Tiles and a Worldname.txt. Using The Gimp, I edited some tiles to have a transparent color: Stairs, Trees, Desk Tables, Chest-of-drawers, Chairs, Signs, Doors, Beds. I changed the world layers to 2: Help Menu \ Settings \ eSETTING_WORLD_L = 2 F9 Finds all selected tile on current layer and changes to a new selected tile on new layer. I used F9 to change all Trees on layer: 0 to Trees on layer: 1. Then I used F9 to change all Trees on layer: 0 to Grass on layer: 0  
      In this video you can see how I used the Tile Menu \ Replace From Disk option to remap tile images to my custom tiles.  Conveniently my tiles already have a transparent pixel.
      See video for how that was done:
      To use the example world:
      First unzip the world save file: http://songersoft.com/programming/mapit/worlds/Reeve_Swapped.zip From the World Menu: choose \Load Navigate to the Reeve_Swapped.txt located in the extracted zip. Or you can scan any image.
      The map images I used are here: http://www.realmofdarkness.net/dq/games/nes/dw3/maps/world
      For download, videos, and example of created world file data; please visit the MapIt webpage: http://songersoft.com/programming/mapit/mapit_about.phtml
    • Pricehacker
      By Pricehacker
      Hello,
      I am making a program where the button is an image that "changes" when specific conditions are fullfilled. Problem is that these images have different dimensions and when a smaller picture is displayed over a bigger one both will be seen, therefore i would like the images to be hidden, invincible or, alternatively, deleted.
      I have tried using _GDIPlus_GraphicsClear() with no luck
      However that might just be me not using it right as im quite new to autoit
      Here is the code if you want to test run it:
      Thanks to everyone helping!
    • UEZ
      By UEZ
      AutoIt Windows Screenshooter
      Key Features:
      takes easily a screenshot from any visible window capture any region of the desktop incl. freehand capturing capture GUI controls and GUI menus separately capture a marked area every x seconds for a duration of y seconds create a GIF animation from saved frames (Vista or higher os required) capture to AVI file (without audio!) takes a screenshot from web sites (available only on Win7+ os and when Aero is enabled) put images to clipboard to paste to other applications easily color picker save image in different formats and also to PDF! add timestamp to saved images simple image editing options: greyscale, b&w, invert, rotate +-90° send image to printer and default email client preview of captured screens incl. zoom option multi monitor support display pixel color under mouse ruler basic image editor (paint, highlight, ellipse, rectangle, text and some graphic FX) watermark captured image no 3rd party tools or DLLs used - pure AutoIt! fully portable - no installation is needed multi language feature (Eng, Ger, Tur, Fra and Rus only) To do:
      capture content of scrollable window/control capture cascaded menus Due to DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) limitation some windows cannot be captured properly (GDI+, ProgDVB, etc.) but can take screenshots of hidden windows. One workaround is to use full screen capturing (F11/F12) or "Grab Screen" function! Or try double click with rmb on listview items (beta).
      Download source code (6295 downloads previously):  AutoIt Windows Screenshooter v1.81 Build 2018-08-12.7z (version 3.3.12.0+ needed!)
      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!
      Download compiled Exe only: 4shared / Media Fire / Softpedia (1.54mb)
      Distributing copies of the program in compiled format (exe) must be free of any fee!
      -----> click here to Donate!  
       
      (Current donators: 1. Cuong N.) 
      It is designed for Win7+ operating systems with AERO enabled! E.g. on WinXP machines some functions are not working properly and might crash the application!
      AV scanners may have a negative impact the execution of compiled exe and might report any malware. I guarantee that there is no malicious code in the source code / exe!!! 
      Main GUI:

       
       
      About Intro:

       
       
      Basic Image Editor:

       
       
      Watermark:

       
       
      Click link for an enhanced version of Watermark Image.
      Credits:
      main code by UEZ additional code (alphabetical order) by Authenticity, AutoItObject Team, Eemuli, Eukalyptus, funkey, _Kurt, martin, monoceres, ProgAndy, taietel, trancexx, Ward, wolf9228 and Yashied! mesale0077 for turkish translation wakillon for french translation AZJIO for russian translation Keys:
      Main GUI:
      User your mouse to scroll preview window or
      Numpad 8: Scroll preview window up
      Numpad 2: Scroll preview window down
      Numpad 4: Scroll preview window left
      Numpad 6: Scroll preview window right
      Numpad +: zoom in preview window or mousewheel down
      Numpad -: zoom out preview window or mousewheel up
      F1: capture again on last position
      F5: refresh Windows Name list
      PRINTSCREEN: take screenshot from whole screen
      ALT+PRINTSCR: take a screenshot from active window
      F10: Undo made changes with Image Editing function
      F11: take screenshot from whole screen incl mouse cursor
      F12: take screenshot from whole screen
      Ctrl+Alt+F9 start "Grab Screen" mode
      Ctrl+Alt+F12: take a screenshot from active window using alternative screenshot functionality (beta)!
      Ctrl+r: call ruler
      Ctrl+s: save current displayed image
      Ctrl+x: exit program
      ctrl+w: call web grab input field (availabe only when Aero is enabled)
      Ctrl+i: call image editor
      Ctrl+m: call watermark editor
      Ctrl+z: undo
      Only available on Vista+ os: double click with rmb on list items to use alternative screenshot functionality (beta)!
      When 'Grab Screen' is clicked you can hold down the ctrl key to switch to 'grab controls' mode. Control under mouse will be framed red.
      ctrl + shift will take the screenshot of appropriate control. To capture GUI menues you can press rmb which simulates the lmb. When a menu is opened press shift additionaly to capture it.
      Press and hold only the shift key to capture any region on the desktop using freehand capturing - release it so capture marked regions!
      Or just mark resizeable area which you want to grab. Press CTRL key to grab marked area or right mouse button to capture the marked area every x seconds for a duration of y seconds.
      When saving the image just enter the extension you whish to use (*.jpg;*.png;*.bmp;*.gif;*.tif;*.pdf). Big thanks to taietel for his PDF UDF!
      Image Editor:
      s: save
      c: copy
      n: send
      h: highlighter
      p: pen
      r: rectangle
      e: ellipse
      a: arrow
      o: color
      t: text
      g: text config
      Ctrl+z: undo
      Watermark editor:
      Ctrl+z: undo
       
      To start the app minimized just call it "Windows Screenshooter.exe /min"
      Maybe it is useful for someone...
      Any kind of comment is welcome.
      Br,
      UEZ
      Change log:
       
    • Atoxis
      By Atoxis
      Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here.  However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore.
      I'm not new to au3 but i'm not the most experienced with it's syntax/commands.

      Anyways, I've looked over the big threads involving imagesearch.

      Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post.

      Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen!
      Can't find a working copy so if anyone has one please send it my way lol.

      I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working.
      Thanks.
×