Batch Resize ->Fit Over: Square Ratios

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
Jed
Posts: 4
Joined: Sun Nov 29, 2009 9:51 pm

Batch Resize ->Fit Over: Square Ratios

Post by Jed »

I noticed that when I batch resize photos for thumbnails, and select the Fit Over checkbox, it will not resize correctly on photos that have a lesser ratio than the specified one. Instead of checking both edges and making sure that they resize over the specified dimensions, it will take the shortest edge of the input image and resize that edge to the specified dimension; but if the photo is square(ish) and your aspect ratio is rectangular, then the longer side of the photograph will at times will not exceed the dimension specified.

To clarify, take this example:
I am resizing a photo that is:
250W x 200H (5:4 ratio)

I tell XnView to resize that photo to:
200W x 150H (4:3 ratio)
And check the "Fit over (W or H)" box

XnView will take the shortest edge of the input photograph (200H) and resize it to the input dimension (150H) which will output a photo with the following dimensions:
188W x 150H

Notice how the output width did not "fit over" the specified width? Please verify this error by testing it out yourself.

In order to correct this error I believe that XnView needs to calculate check the output width and height of a photograph, compare those to the input widths, then choose which side it is resizing; instead of assume that resizing the shortest side of the input photograph will output both dimension correctly.

It hurt my brain trying to figure out why some of my exported photos were not big enough on one of the dimensions. Hopefully I did not hurt your brain in trying to explain it. Let me know if you have any questions or if I am making no sense.
Jed
Posts: 4
Joined: Sun Nov 29, 2009 9:51 pm

Re: Batch Resize ->Fit Over: Square Ratios

Post by Jed »

Was this just me, or can someone confirm it as a bug?
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: Batch Resize ->Fit Over: Square Ratios

Post by marsh »

See also, scaling to the shorter side
Entering 200 x 200, keep ratio might help.
Jed
Posts: 4
Joined: Sun Nov 29, 2009 9:51 pm

Re: Batch Resize ->Fit Over: Square Ratios

Post by Jed »

Those are not quit the issue I was having. Those people WANTED to resize to the shorter side, regardless of whether or not the longer side also exceeded the specified dimensions. And in those situations they will not encounter the error I mentioned. Let me give you an extreme example of the problem I encountered.

I am resizing a photo that is: 1024W x 768H (4:3 ratio)
I tell XnView to resize that photo to: 400W x 100H (4:1 ratio), And check the "Fit over (W or H)" box

XnView will take the shortest edge of the input photograph (768H) and resize it to the input dimension (100H) which will output a photo with the following dimensions: 133W x 100H.

133 pixels wide is nowhere near the input dimension of 400. And adding the flag "Follow orientation (switch W/H)" of course doesn't change anything. It's a glitch with how XnView fits over the specified dimensions... unless I'm missing something.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch Resize ->Fit Over: Square Ratios

Post by xnview »

Jed wrote:XnView will take the shortest edge of the input photograph (768H) and resize it to the input dimension (100H) which will output a photo with the following dimensions: 133W x 100H.
You would like to have 400W x 300H?
Pierre.
Jed
Posts: 4
Joined: Sun Nov 29, 2009 9:51 pm

Re: Batch Resize ->Fit Over: Square Ratios

Post by Jed »

Exactly. Isn't that was fit over is supposed to do? Or did I misunderstand?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch Resize ->Fit Over: Square Ratios

Post by xnview »

Perhaps it will better to have :
Fit within: Width only/Height only/Width and Height/Width or Height (longest size) ??
Pierre.
User avatar
negg
Posts: 87
Joined: Sat Jul 09, 2005 12:09 am
Location: Frankfurt, Germany

Re: Batch Resize ->Fit Over: Square Ratios

Post by negg »

This bug still exists in 1.97 - I mean, what's the point of fit over when it does not work?

Pierre, I consider this a serious bug, this one should be addressed really soon (or "Fit over" deactivated, so people don't need to experiment).
Perhaps it will better to have :
Fit within: Width only/Height only/Width and Height/Width or Height (longest size) ??
No I don't think so. If fit over works like "resize using one side, if the other one is smaller than desired then use that side to resize" everything can be achieved.
XnView 1.93.4 on Windows XP SP2
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: Batch Resize ->Fit Over: Square Ratios

Post by marsh »

Resize options have changed in latest MP v.0.25. "Fit", "Longest side", "Shortest side".
Post Reply