How do I resize to fit?

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

How do I resize to fit?

Post by Sablesword »

With batch convert, I can resize images so that they fit within a 200x200 pixel box; so that the long side is 200 pixels and the short side is whatever shorter value preserves the image's original ratio.

But how do I do this with the Image->Resize command in the viewer? If I set a custom 200x200 pixel size, with "keep ratio" checked, then the image is resized so that the short side is 200 pixels and the long side is longer.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

yes, you need to change the height to update the width
Pierre.
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

Actually, on rechecking the image->resize command, it sets the width at 200 pixels and changes the height to be either longer or shorter, depending on the ratio.

It's an odd choice and I'm inclined to call it a bug.
TommiG2
Posts: 14
Joined: Mon Feb 12, 2018 12:40 pm

Re: How do I resize to fit?

Post by TommiG2 »

Dear Sablesword,

If you say "resize my batch of photos fitting in a box of 200*200 pix" and using the menu "Tools / Batch convert" with an action "Longest side" to 200 pixel, then it works as you expect.

But if you want to resize a specific image, then the meaning is different from a simple "fitting in a box".
Here you have more options:
+ "resize width and height to specific values" or
+ "resize width to a specific value and the height accordingly"
+ "resize height to a specific value and the width accordingly"
This is because you work with only one image, which you know is landscape or portrait and you have full control with more options than in a batch job. Of course you can do the fitting in a box by yourself with them.

In contrast a batch job works with different kind of images (landscape, portrait) and here a simple "fitting in a box" command makes sense.

I see this as different kinds of using and not as a bug.
Best regards,
Thomas
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

TommiG2,

My problem is that to resize a specific image I often have to manually enter the desired height and/or width. The "preset" sizes work properly and as expected for

+ "resize width and height to specific values" or
+ "resize width to a specific value and the height accordingly"
+ "resize to a percentage of the original size, rather than to specific values"

The preset sizes do NOT work properly or as expected for

+ "resize height to a specific value and the width accordingly"
+ "resize the shorter side (whether height or width) to a specific value and the other side accordingly"
+ "resize the longer side (whether height or width) to a specific value and the other side accordingly"

It is the last of these which is by far my most commonly needed case, and it is the presets not working properly for the last three cases that is the bug.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

so like 'resize' in batch convert?
Pierre.
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

Yes.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.91. Please check and confirm the bug fix here.
Pierre.
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

The bug is fixed for the built-in presets, but not for custom presets.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

Sablesword wrote: Thu Jun 07, 2018 10:46 am The bug is fixed for the built-in presets, but not for custom presets.
sorry but could you explain me more?
Pierre.
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

If I use one of the built-in presets, e.g. 640x480, on an image where height > width, then v0.90 gives a width of 640px and a height > 640px. Which is a bug. With v0.91 beta, the height is 480px and the width is reduced appropriately. Which is no longer a bug.

But if I create and save a custom preset, e.g. 200x200 with "keep ratio" checked, then there is still a bug. In fact, it seems like the bug is reversed from v0.90. In 0.90, a custom preset would set the width to the proper value but make the height too tall - higher than the value set for the height, if the image was higher than wide. In 0.91 beta, a custom preset will set the height properly, but make the width too wide - wider than the value in the preset - if the image has a width greater than its height.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

Sablesword wrote: Thu Jun 07, 2018 12:17 pm If I use one of the built-in presets, e.g. 640x480, on an image where height > width, then v0.90 gives a width of 640px and a height > 640px. Which is a bug. With v0.91 beta, the height is 480px and the width is reduced appropriately. Which is no longer a bug.

But if I create and save a custom preset, e.g. 200x200 with "keep ratio" checked, then there is still a bug. In fact, it seems like the bug is reversed from v0.90. In 0.90, a custom preset would set the width to the proper value but make the height too tall - higher than the value set for the height, if the image was higher than wide. In 0.91 beta, a custom preset will set the height properly, but make the width too wide - wider than the value in the preset - if the image has a width greater than its height.
right will be fixed in beta 2
Pierre.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How do I resize to fit?

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.91 beta 2. Please check and confirm the bug fix here.
Pierre.
Sablesword
Posts: 25
Joined: Sat Oct 25, 2014 12:17 am

Re: How do I resize to fit?

Post by Sablesword »

xnview wrote: Thu Jun 28, 2018 3:53 pm This problem is supposed to be fixed in XnView MP 0.91 beta 2. Please check and confirm the bug fix here.
Yes, fixed.
Post Reply