[Script] Quick Picto Viewer v5+

Post your working scripts, libraries and tools for AHK v1.1 and older
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

30 Oct 2020, 08:42

@ozzii . Thank you for the kind words <3.

Hey, guys! This is a bugs-only-fix release.

- v4.6.6 (2020-10-30)
- [new] option to invert selection area when erasing a given area from the image
- reduced excessive redraws in some panels [fill area, insert text and paste in place/transform area]
- various important bug fixes:
- using an image as alpha mask did not work
- setting opacity levels for text colours did not work
- spawning new QPV instances gave a bogus error message and failed
- choosing to open in QPV the containing folder of a given image, in some cases, would have led to an error
- some error messages displayed in the OSD vanished quicker than they could have ever been read :-)

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

30 Oct 2020, 18:35

robodesign wrote:
28 Oct 2020, 13:55
@CyberKlabauter : The new version sports feature requests from you. Lock selection area aspect ratio. And command line options.
Hi Marius,

wow. That is just amazing! I really fall in love with QPV. I will give an example of use how I use the new functins. Maybe it is helpfull for some other. If I have a meeting I often make a photo documentation of the flipcharts. If the photos are taken in lowlight I usually want to improve the readability. With this little code snippet it's a breeze now:

Code: Select all


^+q:: 
        RunQuickPictoViewer(JEE_ExpWinGetSel(), "set_lockSelectionAspectRatio=4  set_desiredSelAspectRatio=1.777778 imgFxMode=4 set_lumosAdjust=2.00000 set_GammosAdjust=0.150000 set_satAdjust=0.600000 set_realGammos=6.000 set_hueAdjust=150 set_zatAdjust=50")
return

RunQuickPictoViewer(FileList, Presets) {
    FileList := """" RegExReplace(FileList, "[\r\n]+", """ """) """"
    Run, %a_scriptDir%\..\QuickPictoViewer\QuickPictoViewer.exe %FileList% " " %Presets%
     }  
    #Include, %a_scriptDir%\Lib\JEE_ExplorerFunctions.ahk ; from https://www.autohotkey.com/boards/viewtopic.php?f=6&t=35041
    
Select all photos in windows explorer you want to process and press Strg + Shift + q . You are almost done :dance:

Thank you sooo much Marius!

Than I have three questions / topics:
1. Is there a caommandline option to autosave the picture immediately with a new filename?

2. Is it possible possible to define my own apect ratio? like
set_lockSelectionAspectRatio=X
set_desiredSelAspectRatio=2.3

3. During testing I notice a small thing with the locked ratio of the selection tool. If I press Shift, resize the selection and the mouse runs out of the picture area, it does lost the aspect ratio.

Same case if I have a defined aspect ratio like 16:9. But other than pressing Shift it restores the aspect ratio after releasig the mouse button. But the selection area jumps down to the bottom line of the selected area.

Once again. Great work! And by the way, the speed has improved noticeable!
Last edited by CyberKlabauter on 01 Nov 2020, 17:51, edited 1 time in total.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

31 Oct 2020, 07:22

Hello!

Thank you for using the image viewer and providing me feedback. I'm really glad to know you like it.

1. No such option at the moment. I'll think about it... Should it exit after saving?

2. Yes, it's possible, internally. But not in the interface. I'll add this in the next release.

3. This sounds like a bug. I'll test this and fix it, if I can reproduce it.

The next release will feature more bug fixes (as the previous release). I'm working on identifying a performance regression that occurred since v4.1 and correct it.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

31 Oct 2020, 11:12

Hi
1. I think exit after saving would make sense. Only if the the commandline parameters are processed in the same order like the user provides them, it could make sense to continue (e.g. color correction => save => color correction two => save a second time => new image size). So in that case it would exit only if the save command is not the last parameter. But maybe the order of the commandline parameters is not considered - exit after saving would make sense most in my point of view.

2. and 3. Awesome like always! I am looking forward to it.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

31 Oct 2020, 15:28

Hello, again!

The new release is here:

- v4.6.7 (2020-10-31)
- [new] option to set alpha channel intensity in the viewport colours adjustments panel
- [new] option to set image selection area aspect ratio to user defined in «selection properties» panel
- removed option to «remove alpha channel» , because setting the alpha intensity does the same thing, but with fine-grained control over it
- [fixed bug] drawing freeform lines and curves had bugs related to setting the tension level for the curve
- fixed performance regression introduced in v4.2.0 related to viewport color adjustments

@CyberKlabauter . The selection area always sticks to the locked aspect ratio. It may not look that it does so under some circumstances. For example... when the selection area is bound to image size/boundaries [press L to toggle this] and you resize the selection and it exceeds the image boundaries. However, when you release the mouse click, it will be constrained to the given aspect ratio lock.

Shift+click on the selection corners... is for locking aspect ratio to the «starting» aspect ratio, that is, before clicking. And for this, you can have the selection unlocked.

In other words, i found no bugs, only perhaps weird/kinky behaviour ^_^ . If you believe there IS a bug, please test the new version and explain in details the steps to reproduce.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 16:37

Hi Marius,

not sure it is a bug. I will demonstrate what I mean. Maybe it is just, that I expected a different behavior. However, I think it is not a big issue.
robodesign wrote:
31 Oct 2020, 15:28
The selection area always sticks to the locked aspect ratio. It may not look that it does so under some circumstances. For example... when the selection area is bound to image size/boundaries [press L to toggle this] and you resize the selection and it exceeds the image boundaries. However, when you release the mouse click, it will be constrained to the given aspect ratio lock.
If the selection area is bound to image size/boundaries and I resize the selection and it exceeds the image boundaries it restores the ratio as expected. But the starting y and x coordinates are different as well as the size of the selection.

Image
robodesign wrote:
31 Oct 2020, 15:28
Shift+click on the selection corners... is for locking aspect ratio to the «starting» aspect ratio, that is, before clicking. And for this, you can have the selection unlocked.
If I Shift+click on the selection corners and lock the current aspect ratio, it looses the aspect ratio as soon I exceed the image boundaries. The captured aspect ratio will not be restored if I release shift and mouse key.

Image
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 16:48

Hi Marius,
another question / request. I want to resize images by commandline paramters. I was able to find some resize parameters of the resize dialog, like:

Code: Select all

   ResizeUseDestDir=1
   ResizeDestFolder=.\
   ResizeInPercentage=0
   ResizeKeepAratio=1
   ResizeQualityHigh=1
   ResizeApplyEffects=1
   ResizeRotationUser=Rotate: 0°
   ResizeCropAfterRotation=1
But not the new width and height. Also the Ini file does not change if I enter width and height parameters. I guess it is not possible to resize by commandline. Or is it? Could you implement that, if not?

Thank's in advanced!
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 16:59

Hello!

Thank you for the extensive explanation.

In both cases, it behaves as intended.... When the option to lock the selection area is turned on (from the menu or the selection properties panel), the coordinates are updated to reflect the desired aspect ratio when drawn on screen, that's why "the sudden" jump.

In the GIFs you showed, the selection area is bound by the image boundaries. That's why you get that weird behavior. Try deactivating it, by pressing L. Imagine you are applying multiple constraints on the coordinates, that are conflicting. Image boundaries, aspect ratio and you go beyond the boundaries. So... The application does its best to satisfy the constraints.

In the second case, when that option is not activated (for locking aspect ratio), but you use shift + click, there is no aftermath checking that the selection is at the whatever aspect ratio. It just ensures that the selection area doesn't exceed the image boundaries (as you have it activated).

Hope this clears it....

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 17:23

Not every option in every panel is loaded or saved from the INI file.

However, right click on the elements in the user interface. You can find variable names for various user interface elements. And then, you can feed them in the command line...,even if if they are never loaded /saved in the INI file... Hope this helps.

Please note, in the INI file, not all possible options are saved or loaded when QPV starts... Some of the settings are saved and loaded only when specific panels are used. This ensures better agility ^_^. Go through all the panels, use them once or twice and then you'll see the complete range of loaded /saved settings.

To be even clearer... The command line option to change settings allows you to change any internal global variable. Open the main ahk file to see the list. Take a coffee with you, because it's huge and unordered.... ^_^... you can make it crash at start if you want. For example, you can overwrite the variable "glPG" or any other internally critical variable ^_^.

Best regards, Marius.

CyberKlabauter wrote:
01 Nov 2020, 16:48
Hi Marius,
another question / request. I want to resize images by commandline paramters. I was able to find some resize parameters of the resize dialog, like:

Code: Select all

   ResizeUseDestDir=1
   ResizeDestFolder=.\
   ResizeInPercentage=0
   ResizeKeepAratio=1
   ResizeQualityHigh=1
   ResizeApplyEffects=1
   ResizeRotationUser=Rotate: 0°
   ResizeCropAfterRotation=1
But not the new width and height. Also the Ini file does not change if I enter width and height parameters. I guess it is not possible to resize by commandline. Or is it? Could you implement that, if not?

Thank's in advanced!
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 19:39

robodesign wrote:
01 Nov 2020, 16:59
Hope this clears it....
It does! Thank you for your explanation.
robodesign wrote:
01 Nov 2020, 17:23
However, right click on the elements in the user interface. You can find variable names for various user interface elements. And then, you can feed them in the command line...,even if if they are never loaded /saved in the INI file... Hope this helps.
...
To be even clearer... The command line option to change settings allows you to change any internal global variable. Open the main ahk file to see the list.
This helped a lot and is amazing. Anyways. I was not able to resize an image. I tried:

Code: Select all

set_ResizeMustPerform=1 set_SimpleOperationsScaleXlmgFactor=160 px set_SimpleOperationsScaleYlmgFactor=90 px set_ResizeUseDestDir=1 set_ResizeDestFolder=c:\test set_ResizeInPercentage=0 set_ResizeKeepAratio=1 set_ResizeQualityHigh=1 set_ResizeApplyEffects=1 set_ResizeRotationUser=Rotate: 0° set_ResizeCropAfterRotation=1 set_UserJpegQuality=100"
I may see no effect, because the image would have been saved first? If I open the resize dialog (Strg + r) it shows the current image size.

Do you have any ideas? I may have to wait for an save command?
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

01 Nov 2020, 19:47

It's me again. Another thing I notice:

If I set aspect ratio manually it behaves somehow weird.

And bevor I set the custom aspect ratio first time the input field was too small (collabsed). It was impossible to see what I entered.

Image
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

02 Nov 2020, 04:07

CyberKlabauter wrote:
01 Nov 2020, 19:47
It's me again. Another thing I notice:

If I set aspect ratio manually it behaves somehow weird.

And bevor I set the custom aspect ratio first time the input field was too small (collabsed). It was impossible to see what I entered.

Image
Oh my God , you are using it wrong man.... 😔 You must put the result of 16/20 in that field, not stuff like 12/3 or 4:3. My bad, i did not explain it. So, for 16:20, put in there: 0.8.

And yes, I did forget to set a text field width. This will be fixed in the next version.

I will try in the next version to calculate the number on my own when I indentify in the text field : or /.

Also, in the next release, based on your suggestions, I will add a new command line option: call_functionName. So, when Quick Picto Viewer starts, you can call a specific panel or any other internal function.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

03 Nov 2020, 05:21

robodesign wrote:
02 Nov 2020, 04:07
Oh my God , you are using it wrong man.... 😔 You must put the result of 16/20 in that field, not stuff like 12/3 or 4:3. My bad, i did not explain it. So, for 16:20, put in there: 0.8.
Yes I was wrong. I could have imagine that factor was required. I already figured it out with the commandline parameters. I guess it was too late in the evening.
robodesign wrote:
02 Nov 2020, 04:07
Also, in the next release, based on your suggestions, I will add a new command line option: call_functionName. So, when Quick Picto Viewer starts, you can call a specific panel or any other internal function.
This will make QPV very powerfull. I can't wait to check it out!

It is just incredible how fast the development is progressing :thumbup:
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

03 Nov 2020, 06:24

Thank you.
I'm glad you figured it out!

The next release will also feature edge detection filter - almost done.

I also managed to make the edit field handle... aspect ratio provided in the format you fed it initially... 16:20 .

It'll no longer allow both locking aspect ratio and constraining the selection area to image boundaries. So users will need to choose one or the other. This solved the problems you experienced.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

06 Nov 2020, 12:31

Hello, guys!

A new version is ready...

- v4.7.0 (2020-11-06)
- [new] "add noise“ filter with options to blur and pixelize the noise
- [new] "detect edges“ filter with the ability to achieve the bevel/emboss effect by increasing iterations and using blending modes.
- [new] option to have Quick Picto Viewer randomize viewport colour effects and adjustments during slideshows
- [new] option in command line to call a specific function [only functions that take no arguments]
- [new] when using the transform tool or pasting images in place, the user can increase the object opacity above 100%, to render any partially visible pixels more visible
- implemented error checking when loading settings from the INI file
- QPV no longer allows for the image selection area to be constrained simultaneously by image boundaries and aspect ratio; it is one or the other, or no constraints ;-)


Please give me feedback, critique or suggestions.

Best regards, Marius.
Last edited by robodesign on 06 Nov 2020, 18:10, edited 2 times in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

06 Nov 2020, 17:37

Thank you soo much Marius. This is amazing. I don't have the time to test it now. But I will as soon as possible. Can't wait to use the new command line option :superhappy:
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

08 Nov 2020, 17:41

CyberKlabauter wrote:
06 Nov 2020, 17:37
Thank you soo much Marius. This is amazing. I don't have the time to test it now. But I will as soon as possible. Can't wait to use the new command line option :superhappy:
Looking forward to your feedback! I hope you'll like it. A new version is already on the pipe ^_^.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
CyberKlabauter
Posts: 44
Joined: 26 Jan 2017, 17:59

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

09 Nov 2020, 16:15

Hi Marius,
here my first testing and quick feedback.
robodesign wrote:
03 Nov 2020, 06:24
It'll no longer allow both locking aspect ratio and constraining the selection area to image boundaries. So users will need to choose one or the other. This solved the problems you experienced.
Locked apect ratio worked before, but it is a huge improvement in terms of usability! Now it's works very intuitive for me. Nicely done!
robodesign wrote:
03 Nov 2020, 06:24
I also managed to make the edit field handle... aspect ratio provided in the format you fed it initially... 16:20 .
If it is intetended to work with colon as a separator,it doesn't work for me so far. It behaves like before.
robodesign wrote:
03 Nov 2020, 06:24
The next release will also feature edge detection filter - almost done.
robodesign wrote:
06 Nov 2020, 12:31
- [new] "detect edges“ filter with the ability to achieve the bevel/emboss effect by increasing iterations and using blending modes.
Where can I find it? i am lost again :? (still working with the 32bit version, if it matters). But sounds very intersting to me. I would like to play with it, because I have an idea for an another unique feature.
robodesign wrote:
06 Nov 2020, 12:31
A new version is ready...
- v4.7.0 (2020-11-06)
- [new] option in command line to call a specific function [only functions that take no arguments]
Once more: I am lost. How can I figure out the right commandline command? I tried: PanelSaveImg and set_PanelSaveImg but no image was save nor a dialog poped up. I was hoping the original file may be overwritten immediatly, due to no function parameter are supported yet.
I also dived in your code hoping to find some hints near line 1545 ... But no luck. You see any hints are appreciated.

Thank's for all your work :thumbup:
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

09 Nov 2020, 16:47

Hello!

Thank you for providing me feedback!

Detect edges and other filters and image editing options are under edit menu, but first please create a selection area. Then, you'll be able to see all available options in that menu. Press E to create /toggle selection area.

I'll test tomorrow to see if it works here to type aspect ratios using colon. Afaik, it worked ^_^.

Please read the help provided at F1 (help /about panel, "command line" tab).... To call a specific function add the prefix call_ and the ending (). In your case, it's call_PanelSaveImg(). The prefix set_ is reserved for variables only.

Please let me know what suggestions you have.

Stop using the 32 bits edition, please ^_^. It's painful!

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: [Script] Quick Picto Viewer and Fast Slideshow creator

11 Nov 2020, 13:22

Hello, guys!

Guess who's back? ;-)

- v4.7.1 (2020-11-11)
- [new] option to fill selected area with patterns found in the welcome screen
- [new] transform area tool and paste in place tool now offer the possibility to crop the image object to basic shapes: triangle, (rounded) rectangle, ellipse and rhombus
- [new] blur/pixelize panel offers users three methods to choose from for pixelizing the image
- improved how the noise is pixelized; much better results; increased the pixelize maximum limit
- welcome screen also varies the angle of objects and added a new pattern: noise
- improvements for live preview area provided by detect edges, noise and blur filters; it now allows users to shift/ctrl the area to turn off the effect
- reorganized «Edit image» menu into multiple subsections
- implemented caching for file details in list view mode
- improvements related to how the user interface is initialized and implemented the possibility, on failure, to attempt to reinitialize it
- various bug fixes

I hope you will enjoy this new release. Looking forward to feedback...

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: charlie89, gwarble and 142 guests