Option to add 'Fit Image to Window' Zoom Level as Zoom Step in 'View' settings

Ideas for improvements and requests for new features in XnView MP

Moderator: xnview

AdjacentBadger
Posts: 1
Joined: Sat Feb 14, 2026 2:57 pm

Option to add 'Fit Image to Window' Zoom Level as Zoom Step in 'View' settings

Post by AdjacentBadger »

I would like to have an optional setting (in the View section) that causes the “Fit image to window” zoom percentage (i.e. whatever zoom level is automatically applied when opening an image) to be inserted into / respected by the normal zoom stepping sequence.

This would ensure that the perfectly fitted view is always one of the available zoom steps when using keyboard/mouse zoom commands — while also preserving 100% as a guaranteed step.

Current behaviour (example with relative √2 steps)
Zoom levels follow strict multiples: ≈9%, ≈13%, ≈18%, ≈25%, ≈35%, ≈50%, 70.7%, 100%, 141%, etc.

If “Fit to window” happens to land at ~16%, it is not one of the steps → you can never return exactly to the fitted view by stepping through the zoom levels.

Desired behaviour (with new option enabled):
  • Calculate the actual “Fit to window” zoom percentage when the image is opened
  • Find the closest default zoom step
  • Replace only that closest step with the exact fit-to-window percentage
  • Important exception: never replace 100%. If the closest step would have been 100%, insert the fit percentage as an additional step instead (e.g. … 70.7%, 98%, 100%, 141% …) or place it immediately before/after 100% — whichever keeps the sequence clean and logical. The goal is that 100% always remains available as a distinct, reliable step.
Example – Relative √2 stepping
Default steps: ≈9%, ≈13%, ≈18%, ≈25%, …, 70.7%, 100%, 141%, …
Fit-to-window = 16% → replace 18% with 16%
Resulting steps: ≈9%, ≈13%, 16% (exact fit), ≈25%, …, 70.7%, 100%, 141%, …

Fit-to-window = 98% → do not replace 100%; instead insert 98% nearby
Resulting steps: … 70.7%, 98% (exact fit), 100%, 141%, …

Example – Fixed 5% steps
Default steps: 5%, 10%, 15%, 20%, …, 95%, 100%, 105%, …
Fit-to-window = 16% → replace 15% with 16%
Resulting steps: 5%, 10%, 16% (exact fit), 20%, …, 100%, …

Fit-to-window = 97% → insert 97% without removing 100%
Resulting steps: … 95%, 97% (exact fit), 100%, 105%, …

Additional notes
  • The replacement/insertion should happen dynamically per image
  • It would be best if this logic respected whichever auto-zoom method the user has chosen (“Fit”, “Fill”, “1:1”, custom %, etc.)
  • A simple checkbox like
    ☐ Snap nearest zoom step to initial auto-zoom level (preserve 100%)
    would make the feature easy to discover and toggle
Motivation

When reviewing images, it’s very convenient to return exactly to the “fits perfectly in the window” view while zoom scrolling for pixel checking.

Thank you.
KLE-France
Posts: 111
Joined: Mon Jan 14, 2019 3:00 pm

Re: Option to add 'Fit Image to Window' Zoom Level as Zoom Step in 'View' settings

Post by KLE-France »

A "+1" for this from me as well.

Building upon this idea:
AdjacentBadger wrote: Sat Feb 14, 2026 3:22 pm
Additional notes
  • (...)
  • It would be best if this logic respected whichever auto-zoom method the user has chosen (“Fit”, “Fill”, “1:1”, custom %, etc.)
  • (...)
I would propose "snap-to's" not only for the user's chosen auto-fit, but also for all of the main auto-fit and other meaningful zoom levels, accompanied by a brief (maybe 1-second), on-screen message that appears to indicate the particular auto-fit level:
  • Fit image to window height ("Window height" briefly appears)
  • Fit image to window width ("Window width" briefly appears)
  • 100% ("100% zoom" briefly appears)
  • Real size ("Real size" briefly appears)
  • etc. (if there are others)
I would also add that I don't think the "nearby replacements" would be necessary if there were visual indications for auto-fit levels.

Taking this for example:
AdjacentBadger wrote: Sat Feb 14, 2026 3:22 pm Example – Relative √2 stepping
Default steps: ≈9%, ≈13%, ≈18%, ≈25%, …, 70.7%, 100%, 141%, …
Fit-to-window = 16% → replace 18% with 16%
Resulting steps: ≈9%, ≈13%, 16% (exact fit), ≈25%, …, 70.7%, 100%, 141%, …
It seems reasonable to me to allow 16% (accompanied by the message) and 18%. E.g.:

Resulting steps: ≈9%, ≈13%, 16% ("Window height"), ≈18%, ≈25%, …, 70.7%, 100%, 141%, …

In any case, this is indeed a very good idea, if implementable.