tannerhelland / PhotoDemon

A free portable photo editor focused on pro-grade features, high performance, and maximum usability.
https://photodemon.org
Other
1.4k stars 202 forks source link

Feature request: resize preview window (low priority) #261

Closed vatterspun closed 2 years ago

vatterspun commented 6 years ago

Background: I was trying to modify a banner image to soften the background but couldn’t get a clear idea of what transformations were coming up because the image was so thin. Certainly you can do "1:1" vs. "fit", but maybe a way to allow modification of the preview window for width/height?

image

Sidenote: the Adjustment – Lighting – Levels is fantastic. I was able to soften a banner background in a way that looked radically better than what we started with. Thanks!

tannerhelland commented 6 years ago

Great feedback @vatterspun, thank you. I'll investigate adding additional choices to the zoom options in preview windows.

vatterspun commented 6 years ago

:) Awesome, I'm very happy that was useful. I've really been wanting to test this program further and give a whole lot more feedback. Hopefully more things to come.

ghost commented 4 years ago

Just a comment about those preview windows: Zooming the preview image helps, but the windows themselves are a bit too small, especially on a little 10" laptop like mine. Making them larger, however, might compromise the nice layout of the adjustment dialog by crowding out the controls. Here's what might work: Make the adjustment dialog resizeable by dragging its borders, or simply make the dialog box cover the entire screen by default. That would allow for a larger preview window.

One thing I've noticed is that in the levels dialog, before and after can be toggled simply by hovering over those buttons with the mouse. Was that intended? I haven't noticed it in other dialogs.

tannerhelland commented 4 years ago

Good timing on your feedback, @g-busch! We must be on the same wavelength, because I have spent the past two weeks working on a patch that will make all Adjustment and Effect dialogs resizable. This will be a massive patch since it touches all 200+ tool windows, and each one needs to be manually updated to support this feature.

It has unfortunately not been trivial to make all dialogs resizable, as just allowing a window to resize doesn't mean all the controls on that window will resize too. (In fact, all controls just stay at their current position and size, so if you enlarge the window, all you get is a bigger window with a bunch of dead space - the controls on the window haven't changed at all!)

So a lot of new logic needed to be written to "reflow" UI elements on each dialog as their parent window is resized. The biggest time-sink is that complex dialogs need custom logic to resize nicely. Not every dialog could be automated using identical code, and after two weeks I'm only about 70% of the way through. I hope to have the patch ready in another week or so, time permitting.

One thing I've noticed is that in the levels dialog, before and after can be toggled simply by hovering

The Levels dialog allows you to use a "color picker" on the preview window to right-click a target color for either the lower-bound or upper-bound of the Levels adjustment. (The two eye-dropper buttons toggle which level will be set by sampling.) The preview window automatically switches to the "before" view on mouse-over while color-sampling is active, because the "before" view is only relevant one for color sampling.

(I can see how this behavior could be confusing. I will look at possibly leaving both eye-dropper buttons unselected at first, so that the user must manually activate one if they want to use the color-sampling feature. Thanks for mentioning it!)

ghost commented 4 years ago

Thanks, Tanner. I have noticed a few programs that allow dialogs to be resized, but there are relatively few. I wish Windows 7 itself had allowed that, as it would have solved a major annoyance I have with the long-winded copy/move dialog in Explorer that puts the submit button at the bottom, often beyond the bottom of my screen. In fact, judging from that dialog and some others in Win7, they are designed for the conventional 4:3 aspect ratio, while my screen is closer to 17:10. For that reason my default file manager is now XYplorer, which allows the user to set up a custom copy/move dialog.

Thanks also for explaining that mouse-over behavior in levels. Somehow I hadn't even noticed the eyedropper buttons. Time for a new eyeglass prescription! :) Anyway, the buttons have tooltips explaining what they do, so perhaps most users wouldn't find them confusing.

ghost commented 4 years ago

Now my mind is working overtime, so this comment is apt to be quite long:

I first started noticing how small the preview window was when I used the unsharp mask and couldn't see the difference between before and after. Once I OK'd the adjustment, I found the image shockingly oversharpened, so I had to undo that and go back and use a smaller value.

I've had thoughts about alternatives to resizing those dialogs. One would be making the dialogs non-modal -- I think that's the term. That way a dialog could be moved aside a bit to expose the main window, which could display the preview while adjustments are being made. The image would only change once the adjustments were submitted. This might alleviate the need for undoing the action and going back to the dialog to try different values.

In FastStone Image Viewer, by no means a full-fledged editor, the picture is always displayed in fullscreen, with the various dialogs hidden. They can be brought up with a mouse hover or by a keyboard shortcut, and occupy only a small portion of the screen. As the user makes adjustments, the image on the main screen changes accordingly. Holding down a designated button, or the image itself, with the left mouse button will show the image in its original state. Pressing OK makes the actual change. This would be pretty difficult in PD, however, where the adjustments are far more advanced and the dialogs have more options to display.

Another thought is a toggle button in the dialog that pulls the main screen up on top of the dialog to display a large preview. Clicking on the image in the main screen would then put the dialog back on top.

Of course, as a non-coding end user, I haven't a clue how any of these things could be accomplished.

ghost commented 4 years ago

Thanks, Tanner. That helps quite a bit. I understand your caveat about potential problems with the controls on resizing the dialogs, because resizing the levels dialog makes the sliders overlap the preview. So far I haven't seen that happen in the other dialogs, but then I don't use all of them. At any rate, it's a good start!

tannerhelland commented 2 years ago

This feature is now available in the 9.0 release. Pretty much every dialog in PhotoDemon can now be freely resized, and the preview area will expand to match.

Thank you again to @vatterspun for this excellent and detailed feature request!

(Still TODO are more granular settings for zoom in the preview window - I am workshopping some ideas on this and may have more to share in the future.)