Page 1 of 1

How do I resize to fit?

Posted: Sat Dec 09, 2017 8:53 pm
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.

Re: How do I resize to fit?

Posted: Mon Dec 18, 2017 4:40 pm
by xnview
yes, you need to change the height to update the width

Re: How do I resize to fit?

Posted: Mon Feb 19, 2018 7:32 am
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.

Re: How do I resize to fit?

Posted: Wed Feb 28, 2018 9:33 am
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

Re: How do I resize to fit?

Posted: Wed Feb 28, 2018 3:08 pm
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.

Re: How do I resize to fit?

Posted: Sun Mar 04, 2018 5:02 pm
by xnview
so like 'resize' in batch convert?

Re: How do I resize to fit?

Posted: Sun Mar 04, 2018 5:30 pm
by Sablesword
Yes.

Re: How do I resize to fit?

Posted: Fri Apr 20, 2018 10:55 am
by xnview
See issue for current status and some details.

Re: How do I resize to fit?

Posted: Thu Jun 07, 2018 9:42 am
by xnview
This problem is supposed to be fixed in XnView MP 0.91. Please check and confirm the bug fix here.

Re: How do I resize to fit?

Posted: Thu Jun 07, 2018 10:46 am
by Sablesword
The bug is fixed for the built-in presets, but not for custom presets.

Re: How do I resize to fit?

Posted: Thu Jun 07, 2018 11:35 am
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?

Re: How do I resize to fit?

Posted: Thu Jun 07, 2018 12:17 pm
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.

Re: How do I resize to fit?

Posted: Sun Jun 10, 2018 2:35 pm
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

Re: How do I resize to fit?

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

Re: How do I resize to fit?

Posted: Thu Jun 28, 2018 4:12 pm
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.