Jump to content
Sign in to follow this  

Image Editor using GDI+

Recommended Posts


Hello again the AutoIt Forums! I've gotten really addicted to the GDIPlus stuff and I'm trying to do more. Trying to create small editor using GDIPlus and I'm a bit lost just getting started.

The main GUI is small, so when I you Snip an area that's larger than the GUI it would only display as large as the GUI (I got around this by setting an event for WM_WINDOWPOSCHANGING but it flickers really badly). I tried doing something by setting the bitmap to a GUICtrlCreatePic control but it still flickered. So essentially I need a way to create a graphics larger than the GUI itself and I don't know how to do something like that. I thought it would have been _GDIPlus_GraphicsCreateFromHDC but it still wasn't create it properly. I did a lot of googling and this topic has a lot of great info in it and I will probably incorporate scrollbars too, later, but UEZ didn't give the secret to resizing! Lol

I've got the source code for vPaint downloaded, and I've started to through some of it (But like the author said, the source code is messy and things are out of order) so it may take a while.


#include <GDIPlus.au3>
#include <File.au3>
#include <GUIConstants.au3>
#include <String.au3>
#include <GuiConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <ScreenCapture.au3>
#include <Color.au3>
#include <Misc.au3>
#include <WinAPISys.au3>
#include <GuiToolbar.au3>
#include <GuiImageList.au3>
#include <Array.au3>

AutoItSetOption("GuiOnEventMode", 1)
AutoItSetOption("MustDeclareVars", 1)

HotKeySet("{Esc}", "ClosePixShop")

Global $frm_pixshop_abscoord[4] = [100, 100, 400, 200]
Global $frmPixShop
Global $tlbPixShopToolbar
Global $hWnd_toolbar_image_list
Global $hWnd_dll = DllOpen("user32.dll")
Global $frm_pixshop_state = @SW_HIDE
Global $hWnd_bitmaps[1]
Global $picBitmaps[1]
Global $abscoord_bitmaps[1][2] = [[0, 0]]
Global $abscoord_graphics[4] = [8, 46, 0, 0]
Global $pixshop_buffer[1]
Global Enum $idToolbarStart = 1000, $idMouse, $idSnip, $idCrop, $idText, $idBrush, $idToolbarEnd
Global $hWnd_pixshop_graphics
Global $hWnd_pixshop_bitmap
Global $hWnd_pixshop_buffer


Func PixShop()
    $frmPixShop = GUICreate("PixShop", $frm_pixshop_abscoord[2], $frm_pixshop_abscoord[3], $frm_pixshop_abscoord[0], $frm_pixshop_abscoord[1], $WS_SIZEBOX, $WS_EX_TOPMOST)
    $tlbPixShopToolbar = _GUICtrlToolbar_Create($frmPixShop, $TBSTYLE_TRANSPARENT)
    GUICtrlCreateLabel("", 0, 36, $frm_pixshop_abscoord[2], $frm_pixshop_abscoord[3], -1, $WS_EX_LAYERED)
    GUICtrlSetBkColor(-1, 0x0D0D0D)
    GUISetBkColor(0x535353, $frmPixShop)
    $hWnd_toolbar_image_list = _GUIImageList_Create(24, 24, 5, 5)
    _GUIImageList_AddIcon($hWnd_toolbar_image_list, @ScriptDir & "\Icons\Mouse.ico")
    _GUIImageList_AddIcon($hWnd_toolbar_image_list, @ScriptDir & "\Icons\Snip.ico")
    _GUIImageList_AddIcon($hWnd_toolbar_image_list, @ScriptDir & "\Icons\Crop.ico")
    _GUIImageList_AddIcon($hWnd_toolbar_image_list, @ScriptDir & "\Icons\Text.ico")
    _GUIImageList_AddIcon($hWnd_toolbar_image_list, @ScriptDir & "\Icons\Brush.ico")
    _GUICtrlToolbar_SetImageList($tlbPixShopToolbar, $hWnd_toolbar_image_list)
    _GUICtrlToolbar_SetIndent($tlbPixShopToolbar, 2)
    _GUICtrlToolbar_AddButton($tlbPixShopToolbar, $idMouse, 0)
    _GUICtrlToolbar_AddButton($tlbPixShopToolbar, $idSnip, 1)
    _GUICtrlToolbar_AddButton($tlbPixShopToolbar, $idCrop, 2)
    _GUICtrlToolbar_AddButton($tlbPixShopToolbar, $idText, 3)
    _GUICtrlToolbar_AddButton($tlbPixShopToolbar, $idBrush, 4)
    _GUICtrlToolbar_SetColorScheme($tlbPixShopToolbar, 0x535353, 0x535353)
    _GUICtrlToolbar_CheckButton($tlbPixShopToolbar, $idMouse, True)

    GUISetOnEvent($GUI_EVENT_CLOSE, "ClosePixShop")
    ; Register the WM_GETMINMAXINFO function

    ; Register the WM_NOTIFY function
    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    GUIRegisterMsg($WM_PAINT, "WM_PAINT")

    GUISetState(@SW_SHOW, $frmPixShop)


    While (True)
EndFunc   ;==>PixShop

Func ClosePixShop()
    For $i = 0 To UBound($hWnd_bitmaps) - 1
    Exit (0)
EndFunc   ;==>ClosePixShop

Func WM_PAINT($hWndFrom, $iMsg, $wParam, $lParam)
    #forceref $hWndFrom, $iMsg, $wParam, $lParam
EndFunc   ;==>WM_PAINT

Func WM_NOTIFY($hWndFrom, $iMsg, $wParam, $lParam)
    #forceref $hWndFrom, $iMsg, $wParam, $lParam
    Local $tNMTOOLBAR = DllStructCreate($tagNMTOOLBAR, $lParam)
    Local $tlbCode = DllStructGetData($tNMTOOLBAR, "Code")
    Local $iItem = DllStructGetData($tNMTOOLBAR, "iItem")
    Local $id_checked_button

    If ($tlbCode = $TBN_BEGINDRAG) Then
        If (Not _GUICtrlToolbar_IsButtonChecked($tlbPixShopToolbar, $iItem)) Then
            For $id = $idToolbarStart + 1 To $idToolbarEnd - 1
                If (_GUICtrlToolbar_IsButtonChecked($tlbPixShopToolbar, $id)) Then
                    $id_checked_button = $id
                    _GUICtrlToolbar_CheckButton($tlbPixShopToolbar, $id, False)

            _GUICtrlToolbar_CheckButton($tlbPixShopToolbar, $iItem, True)

        Switch $iItem
            ; Button pressed was the $idColor button
            Case $idSnip
                Local $abscoord_frm_pixshop = WinGetPos($frmPixShop)

                While (_IsPressed("01", $hWnd_dll))

                GUISetState(@SW_HIDE, $frmPixShop)

                $hWnd_bitmaps[UBound($hWnd_bitmaps) - 1] = SnipArea($abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][0], $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][1])
                $pixshop_buffer[UBound($pixshop_buffer) - 1] = "SnippedImage|" & $hWnd_bitmaps[UBound($hWnd_bitmaps) - 1]
                ReDim $hWnd_bitmaps[UBound($hWnd_bitmaps)]

                ReDim $pixshop_buffer[UBound($pixshop_buffer)]

                If ($abscoord_graphics[2] = 0 And $abscoord_graphics[3] = 0) Then
                    $abscoord_graphics[2] = $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][0]
                    $abscoord_graphics[3] = $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][1]
                    $pixshop_buffer[UBound($pixshop_buffer) - 1] = "ResizeGraphics|0,0-" & $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][0] & ',' & $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1][1]
                    ReDim $pixshop_buffer[UBound($pixshop_buffer)]
                        If (IsArray($abscoord_frm_pixshop)) Then
                        If ($abscoord_frm_pixshop[2] < $abscoord_graphics[2]) Then
                        WinMove($frmPixShop, "", $abscoord_frm_pixshop[0], $abscoord_frm_pixshop[1], $abscoord_graphics[2] + 24, $abscoord_frm_pixshop[3])
                        $abscoord_frm_pixshop[2] = $abscoord_graphics[2] + 24
                        If ($abscoord_frm_pixshop[3] < $abscoord_graphics[3]) Then
                        WinMove($frmPixShop, "", $abscoord_frm_pixshop[0], $abscoord_frm_pixshop[1], $abscoord_frm_pixshop[2], $abscoord_graphics[3] + 46)
                        $abscoord_frm_pixshop[3] = $abscoord_graphics[3] + 54

                ReDim $abscoord_bitmaps[UBound($abscoord_bitmaps, $UBOUND_ROWS)][2]

                GUISetState(@SW_SHOW, $frmPixShop)


                _GUICtrlToolbar_CheckButton($tlbPixShopToolbar, $iItem, False)
                _GUICtrlToolbar_CheckButton($tlbPixShopToolbar, $id_checked_button, True)
            Case $idCrop
                ToolTip("Crop Image")
            Case $idText
                ToolTip("Add Text")
            Case $idBrush
                ToolTip("Brush Image")

EndFunc   ;==>WM_NOTIFY

Func DrawPixShopGraphics()
    Local $hWnd_bitmap = _GDIPlus_BitmapCreateFromHBITMAP($hWnd_bitmaps[0])
    _GDIPlus_GraphicsClear($hWnd_pixshop_buffer, 0x00000000)

    _GDIPlus_GraphicsDrawImageRect($hWnd_pixshop_buffer, $hWnd_bitmap, $abscoord_graphics[0], $abscoord_graphics[1], $abscoord_graphics[2], $abscoord_graphics[3])
    _GDIPlus_GraphicsDrawImage($hWnd_pixshop_graphics, $hWnd_pixshop_bitmap, 0, 0)
EndFunc   ;==>DrawPixShopGraphics

Func SnipArea(ByRef $snipped_image_width, ByRef $snipped_image_height)
    Local $abscoord_mouse
    Local $hMask
    Local $hMaster_Mask
    Local $temp_val
    Local $mouse_x_1
    Local $mouse_y_1
    Local $mouse_x_2
    Local $mouse_y_2

    ToolTip("Left click and drag to select the area", 0, 0)

    Local $frmOverlay = GUICreate("GUI Overlay", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)

    WinSetTrans($frmOverlay, "", 1)
    GUISetBkColor(0x000000, $frmOverlay)
    GUISetState(@SW_SHOW, $frmOverlay)
    GUISetCursor(3, 1, $frmOverlay)

    Local $frmSnipArea = GUICreate("GUI Snip", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)

    ; Wait until mouse button pressed
    While (Not _IsPressed("01", $hWnd_dll))

    ; Get first mouse position
    $abscoord_mouse = MouseGetPos()
    $mouse_x_1 = $abscoord_mouse[0]
    $mouse_y_1 = $abscoord_mouse[1]

    ; Draw rectangle while mouse button pressed
    While _IsPressed("01", $hWnd_dll)
        $abscoord_mouse = MouseGetPos()

        $hMaster_Mask = _WinAPI_CreateRectRgn(0, 0, 0, 0)
        $hMask = _WinAPI_CreateRectRgn($mouse_x_1, $abscoord_mouse[1], $abscoord_mouse[0], $abscoord_mouse[1] + 1) ; Bottom of rectangle
        _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
        $hMask = _WinAPI_CreateRectRgn($mouse_x_1, $mouse_y_1, $mouse_x_1 + 1, $abscoord_mouse[1]) ; Left of rectangle
        _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
        $hMask = _WinAPI_CreateRectRgn($mouse_x_1 + 1, $mouse_y_1 + 1, $abscoord_mouse[0], $mouse_y_1) ; Top of rectangle
        _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
        $hMask = _WinAPI_CreateRectRgn($abscoord_mouse[0], $mouse_y_1, $abscoord_mouse[0] + 1, $abscoord_mouse[1]) ; Right of rectangle
        _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
        ; Set overall region
        _WinAPI_SetWindowRgn($frmSnipArea, $hMaster_Mask)

        If WinGetState($frmSnipArea) < 15 Then GUISetState()


    ; Get second mouse position
    $mouse_x_2 = $abscoord_mouse[0]
    $mouse_y_2 = $abscoord_mouse[1]

    ; Set in correct order if required
    If $mouse_x_2 < $mouse_x_1 Then
        $temp_val = $mouse_x_1
        $mouse_x_1 = $mouse_x_2
        $mouse_x_2 = $temp_val

    If $mouse_y_2 < $mouse_y_1 Then
        $temp_val = $mouse_y_1
        $mouse_y_1 = $mouse_y_2
        $mouse_y_2 = $temp_val


    $snipped_image_width = $mouse_x_2 - $mouse_x_1
    $snipped_image_height = $mouse_y_2 - $mouse_y_1

    Return _ScreenCapture_Capture("", $mouse_x_1, $mouse_y_1, $mouse_x_2, $mouse_y_2, False)
EndFunc   ;==>SnipArea

Func ResizePixShopGraphics()
    Local $graphics_width
    Local $graphics_height


    For $i = 0 To UBound($abscoord_bitmaps, $UBOUND_ROWS) - 1
        $graphics_width += $abscoord_bitmaps[$i][0]
        $graphics_height += $abscoord_bitmaps[$i][1]

    $hWnd_pixshop_graphics = _GDIPlus_GraphicsCreateFromHWND($frmPixShop)
    $hWnd_pixshop_bitmap = _GDIPlus_BitmapCreateFromGraphics($graphics_width, $graphics_height, $hWnd_pixshop_graphics)
    $hWnd_pixshop_buffer = _GDIPlus_ImageGetGraphicsContext($hWnd_pixshop_bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hWnd_pixshop_buffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
    _GDIPlus_GraphicsSetTextRenderingHint($hWnd_pixshop_graphics, $GDIP_TEXTRENDERINGHINT_ANTIALIASGRIDFIT)
EndFunc   ;==>ResizePixShopGraphics

Func WM_WINDOWPOSCHANGING($hWndFrom, $iMsg, $wParam, $lParam)
    #forceref $hWndFrom, $iMsg, $wParam, $lParam
    If ($hWndFrom <> $frmPixShop) Then Return $GUI_RUNDEFMSG

    Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam)
    Local $iLeft = DllStructGetData($stWinPos, 3)
    Local $iTop = DllStructGetData($stWinPos, 4)
    Local $iWidth = DllStructGetData($stWinPos, 5)
    Local $iHeight = DllStructGetData($stWinPos, 6)



Func WM_GETMINMAXINFO($hWndFrom, $iMsg, $wParam, $lParam)
    #forceref $hWndFrom, $iMsg, $wParam, $lParam
    Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)

    DllStructSetData($tagMaxinfo, 7, 300) ; Set MIN width
    DllStructSetData($tagMaxinfo, 8, 200) ; Set MIN height


Share this post

Link to post
Share on other sites

Gonna go ahead and bump this, hoping for the best! I haven't made any headway, I did message the author of vPaint but still no response.

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
Sign in to follow this  

  • Similar Content

    • 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.
    • Sven-Seyfert
      By Sven-Seyfert
      Hi Community,

      I'm looking for a way to do a Video Overlay GUI or something like that. The idea is to create a GUI which plays a video loop (with transparency/alpha channel) in front of an other GUI. Before you asking why - because I don't believe that GDIPlus can do it out of the box. My skillset for that kind of graphical things isn't good enough to do that, but here are some specialist like @UEZ maybe who can help.

      Example alpha channel video (visualized as animated *.gif):

      I tried to do the light rays effect directly with GDIPlus, but honestly that's a bit too difficult for me. I would be very glad and grateful if there are some suggestions, ideas or recommendations.

      Code for the Video play:
      Example video "End.mpeg":
      The next challenge is that the overlay GUI should be not clickable. If I hover over the overlay area, I want to have the possibility to control the GUI or what ever, in the background. But if there is any chance to make it with GDIPlus as a Video Overlay for light rays, I would prefer that approach instead of my crazy work-around idea.

      Thanks for any suggestion - I'm grateful!
    • 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.
      Fifth 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/26/2018 3:45 PM EST
      REMOVED CODE BLOCK:  I was informed the this page loaded very slowly, one solution so far has been to remove the 2k lines in the code block.
      When I recieve more feedback from the User I may reduce image size or remove images.
      Next Version Added: $eSETTING_TILE_LAST_PATH I have the weekend, I want to write world layers with aBoard surfaces.  
    • c.haslam
      By c.haslam
      I had thought that _GDIPlus_ImageClone($hImage) removes all property items, but I now know that it copies property items.
      What is the easiest way of copying an image that has property items to another image that does not have property items?
    • 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 Vista+ 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 (5771 downloads previously): AutoIt Windows Screenshooter v1.79 Build 2018-05-08.7z (version 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 Vista+ 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:


      Click link for an enhanced version of Watermark Image.
      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.
      Change log: