renewed: Fit image to window height with option to autoresiz

Ideas for improvements and requests for new features in XnView Classic

Moderators: helmut, XnTriq, xnview

User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France

Post by Olivier_G »

It's probably a good time to join the discussion, as I wasn't quite happy with the current "auto image size" feature & all while working on the reorganization of options.
A selection of useful ideas first: 1 2 3 4 5 6 7 8 9 10 11 12 (and there are many more: redundant, bugs or understanding the feature... which shows that it is an important issue).

Summary:
- XnView application window size: Maximized / Fixed heigth and width / Fixed heigth only / Fixed width only / Free
- Position of XnView window on size change: keep same center / keep one corner x4 / keep one side+center x4 (current is 'center on screen')
- Image size relative to window size: No fit(1:1) / Fit width and heigth / Fit width or heigth / Fit width only / Fit heigth only (+stretch X/Y to fill the window without keeping ratio)
- Influence of Image size on Window size (kind of feedback loop +desktop size taken into account or not)
There are also some related issues: behaviour of MDI windows within XnView application window, position of image in the window (which corner? side? or center?) and finally Options permanent setting vs Menu temporary setting.

Confused?
Well, if there have been hundreds of posts about this, it's probably because the issue is complex. The idea here is to come with a good solution for all those situations, that is both convenient to use and easy to understand. More thinking beforehand to get directly to the right solution is also easier for Pierre and for end-users...

Olivier
PS: I will try to come with suggestions here and in other open topics by the end of the week.
Arqfaim
Posts: 10
Joined: Tue Oct 03, 2006 10:37 pm
Location: Lisboa

Post by Arqfaim »

I'm the author of ideas 4 :wink: and I'll be following this thread.
klaus2
Posts: 98
Joined: Thu Nov 02, 2006 7:27 pm

Fit image to window height, variable width

Post by klaus2 »

About the original suggestion: Fit image to window height, variable width
In beta1 it is in ------ great :-) :-) :-)

It works just as expected, except a little thing:
imo, the window position resp. the left position of the viewer window should be kept as the user sets it ("keep left side");
Actually the viewer window will be vertically centered in the screen middle ("current is 'center on screen'") ) and by that, the screen space we just saved get's lost again.

Many many thanks for having implemented the option :-)
klaus2,
a happy user
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France

Post by Olivier_G »

Suggestion:
XnView Window: Fixed size / Fixed height only / Fixed width only / Free
+Keep upper-left corner [ ] (Otherwise keep center of window = default) (inactive with Fixed size)
(+it might be useful to add '[ ] Limit minimum size to: X= / Y=')

Image scale: No fit(1:1) / Fit in / Fit over / Fit width / Fit height / Stretch
+Reduce only [ ] (inactive with No fit)

Reset Position: Same relative position / Center / Upper-Left / Upper-Right / Lower-Left / Lower-Right

Comments:
- 'Keep upper left corner' is to have Previous/Next toolbar buttons at the same place. People want this even with variable Window size. Otherwise, keeping the same center of Window is fine (current 'window to center of screen' is wrong, though).
- 'Fit in' will fit the whole picture within Window (if this one has variable dimension, it won't exceed the desktop size of course).
- 'Fit over' will fit either Width or Height in order to maximize image: one dimension will reach maximum limit (fixed or desktop if variable) and you will pan - in just 1 direction - to see the whole image.
- When image is scaled to fit a variable dimension of the window (ex: Window='Fixed height only' + Image='Fit width') it will use the largest, up to desktop limit.
- Variable dimension(s) of Window should also adapt during manual zooming.
- When redimensioning the Window, it should become the new constraint for image scale, without enforcing a window size. Those new dimensions will be used for next image (with Fixed, Fixed height or Fixed width).
- In 'Reset position', 'Same relative position' is to make accurate comparisons when switching between different versions (even of different size). I also thought about a 'Same coordinates' but found it less useful.

Some examples:
- I read top/down documents (texts, comics...) -> I would use 'Fit width' and 'Upper-Left' position.
- I have to check images but don't want to pan carefully all over the image -> I would use 'Fit over' (and 'Same relative position').
- I just want to see the full image maximized to my screen -> I would use 'Fit in'.

What do you think about this suggestion?
(I just checked this idea against every messages of threads listed before, and I believe it passed all of them quite well... Menu vs Options needs more thinking)
Olivier
Danny
Posts: 578
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

Well, one thing that i really think is wrong is the image fitting. If it says "fit" in the setting it then should indeed always fit towards that setting.
With that i mean, that even if you resize the window it should always fit the image.

Currently, if you choose the "fit image to desktop" setting for example, and you resize the window, the image will keep it's zoom factor.

I'd like it to work as it does for "fit to window height" though.

@Oliver_G: I don't think we would need a fixed setting for window height or width in the options, if you just enable "remember window size/position" and maybe "different size/position for browser and viewer". It should then automatically remember whatever dimensions your window had the last time, right?
Choosing "fit to height" for example would then automatically override the window's width. Should work out as expected.

Overall: The whole issue of positioning and zooming the image and the program window should be restructured from the ground up IMHO.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France

Post by Olivier_G »

Danny wrote:The whole issue of positioning and zooming the image and the program window should be restructured from the ground up IMHO.
Well... that's exactly what I tried... :)
Danny wrote:I don't think we would need a fixed setting for window height or width in the options, if you just enable "remember window size/position" and maybe "different size/position for browser and viewer". It should then automatically remember whatever dimensions your window had the last time, right? Choosing "fit to height" for example would then automatically override the window's width. Should work out as expected.
You mean that when 'remember window size/position' is checked, the user also wants to keep this size consistency within a session => window size should be implied by image setting, right? (I tend to agree on the logic)

Questions:
- When using 'fit to height' (and therefore: fixed height in this scenario), some users would want variable width whereas others would want fixed width. How would you handle this? ('Force XnView to fit image' could work here). Same for 'fit to width'.
- When using 'no fit', some users would want fixed heigth, others fixed width and others fixed width and height. Same for 'Fit in' and 'Fit over'.

I think your idea would have simplified things further... but from the threads I have read, it seems people expect much more flexibility than what can be achieved that way.
What do other people think? (especially those who asked for some changes)
Olivier
Danny
Posts: 578
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

Olivier_G wrote:
Danny wrote:I don't think we would need a fixed setting for window height or width in the options, if you just enable "remember window size/position" and maybe "different size/position for browser and viewer". It should then automatically remember whatever dimensions your window had the last time, right? Choosing "fit to height" for example would then automatically override the window's width. Should work out as expected.
You mean that when 'remember window size/position' is checked, the user also wants to keep this size consistency within a session => window size should be implied by image setting, right? (I tend to agree on the logic)

Questions:
- When using 'fit to height' (and therefore: fixed height in this scenario), some users would want variable width whereas others would want fixed width. How would you handle this? ('Force XnView to fit image' could work here). Same for 'fit to width'.
- When using 'no fit', some users would want fixed heigth, others fixed width and others fixed width and height. Same for 'Fit in' and 'Fit over'.

I think your idea would have simplified things further... but from the threads I have read, it seems people expect much more flexibility than what can be achieved that way.
What do other people think? (especially those who asked for some changes)
Well, it'd depend on the auto image size setting, of course. If "remember ..." is activated and auto-image-size is set to "fit to desktop" then i would expect the latter setting to override the first one in terms of window size.
Whereas if "fit to height" (or "fit to width") is used in combination with "remember..." the height (width) should be remembered and only the other respective size should be adjusted.

If they want the height AND the width to be fixed, then there's "fit image to window" instead (along with "Remember...), right?
klaus2
Posts: 98
Joined: Thu Nov 02, 2006 7:27 pm

fit image to window height, var width

Post by klaus2 »

Oliver_G and Danny,

i understand your concern about a basic concept, thinking of all those possible various combinations that have or may come up.
Sounds like a very complex story. But, as i am the one who asked so long for this specific fit mode (fit image to window height, var. width), please allow to me to argue today only for that very little modification of the new fit mode (not to center the window).
My reason is:
imo the common motivation of the "fit .. to window" family is that the user controls size and position of the window, as far as not the specific logic of a certain fit mode may overrule this basic rule.
a) "fit .. to window height" respects that guideline perfectly (user controls pos, width and height).
Centering of the image within (inside) the window is ok and does not conflict the base rule.
Centering of the window itself within the screen does not happen here, and that is ok.
b) "fit .. to window height, var width" should be the same, except that the window width here intentionally is overruled / defined by the image width.
The center operation from a) [centering _within_ a window] should not be translated to a window centering within the screen, because that deactivates the user control about the desired window position.
Conclusion: "fit .. to window height, var width" should preserve the user decision of the left side of the window, like "fit .. to window height" does.
Besides that suggestion, for me personally the fit modes now are perfect :-)

Greetings!
klaus2
Danny
Posts: 578
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

@klaus2: How's the program supposed to decide upon the width of the window, if it isn't positioned in the center of the screen?
Last edited by Danny on Sun Nov 19, 2006 7:13 pm, edited 1 time in total.
Get the bugs fixed, THEN start adding features. It sucks, but someone has to do it.
klaus2
Posts: 98
Joined: Thu Nov 02, 2006 7:27 pm

Fit image to window height, var. width

Post by klaus2 »

Hi Danny,

i think this is no problem; it is already autocalculated correctly by "Fit image to window height, var. width": the width depends on the original height of the image, factored by the actual height of the window, applying the aspect ratio of the image, applying the border width of the window too.
Sample:
orig image width = 0,3 XX, height = 0,4 XX ((XX=some measure unit)
actual window height is 4 XX ..
image resizes / fits to that .. height 4XX, width 3 XX
so new window width is assumed to be 3 XX plus border's space
It has nothing to do with the centering.
The image's with is already calculated correctly.
We're speaking only about: where's the left border of the window ...

Best Regards!
klaus2
Danny
Posts: 578
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

Yes, i was merely pointing out that for this setting to work, the window size would have to be calculated based on the window's (top-)left position.

I don't know it, but i guess it's currently being calculated based on the screen resolution.
Get the bugs fixed, THEN start adding features. It sucks, but someone has to do it.
klaus2
Posts: 98
Joined: Thu Nov 02, 2006 7:27 pm

Fit image to window height; var width

Post by klaus2 »

oops. same applies to top position: for the reason mentioned the top pos of the viewer should be kept as the user did set it (not top aligned).
I'll enter it in the Feedback section, hopefully nobody feels offended, but i think it's the better place for B1 feedback.
:-)
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France

Post by Olivier_G »

Danny wrote:
Olivier_G wrote:- When using 'fit to height' (and therefore: fixed height in this scenario), some users would want variable width whereas others would want fixed width. How would you handle this? ('Force XnView to fit image' could work here). Same for 'fit to width'.
- When using 'no fit', some users would want fixed heigth, others fixed width and others fixed width and height. Same for 'Fit in' and 'Fit over'.
Whereas if "fit to height" (or "fit to width") is used in combination with "remember..." the height (width) should be remembered and only the other respective size should be adjusted. If they want the height AND the width to be fixed, then there's "fit image to window" instead (along with "Remember...), right?
This wouldn't make it for people who want to maximize 1 dimension. For example if I read comics, I will want to fit one page to a certain width (fixed or variable up to desktop max) and have height of the image expand beyond window or even desktop (while having a fixed window height if I want to). This request is exactly in the same situation.

About the centering of window:
- Center window in the screen as implemented today doesn't make sense.
- People should be able to select "Keep center of window"(default) or "Keep top-left corner".
- When window becomes too large to keep center/corner, XnView moves the window as needed... (but keeps original X/Y values -> a small image wouldn't be centered in the screen but would revert back to the original position/setting).
Olivier