resizing all images to the same size without distorting them

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
aristosv
Posts: 4
Joined: Thu Sep 22, 2016 4:29 am

resizing all images to the same size without distorting them

Post by aristosv »

Hello,

I have a bunch of images, all different sizes and I want to use them on an e-shop website. If I use them as they are, the whole website structure gets all mixed up because of the different sizes. I need to make all the images the same size without distorting the way they look. I mean without stretching them or something.

I suppose the only way to do that, is to have a blank image the size I want it (eg. 150x150 px) and then overlay all my images in that blank image, resizing them to fit. I don't know if I'm making any sense, but is there a way XnConvert can do that?
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: resizing all images to the same size without distorting

Post by cday »

aristosv wrote:I have a bunch of images, all different sizes and I want to use them on an e-shop website. If I use them as they are, the whole website structure gets all mixed up because of the different sizes. I need to make all the images the same size without distorting the way they look. I mean without stretching them or something.

I suppose the only way to do that, is to have a blank image the size I want it (eg. 150x150 px) and then overlay all my images in that blank image, resizing them to fit. I don't know if I'm making any sense, but is there a way XnConvert can do that?
Do all the images have the same aspct ratio, the same ratio of width to height?

If not, the only way to make them the same size would be either by cropping some images or by stretching some to the required size...
aristosv
Posts: 4
Joined: Thu Sep 22, 2016 4:29 am

Re: resizing all images to the same size without distorting

Post by aristosv »

Maybe I'm not understanding something here, but if they all had the same width to height ratio, all I would have to do is simply resize them to the same height and width, and there would be no distortion to the images at all. Correct?
The problem is that all the images are different sizes (and different height to width ratios).

This is why I though of the solution of starting out with a blank image and overlaying my images, while maintaining width to height ratio. So I may have some white space around the image, but at least no distortion of the image.
Would this be something XnConvert can do?
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: resizing all images to the same size without distorting

Post by cday »

aristosv wrote:Maybe I'm not understanding something here, but if they all had the same width to height ratio, all I would have to do is simply resize them to the same height and width, and there would be no distortion to the images at all. Correct?
Yes...
The problem is that all the images are different sizes (and different height to width ratios).

This is why I though of the solution of starting out with a blank image and overlaying my images, while maintaining width to height ratio. So I may have some white space around the image, but at least no distortion of the image. Would this be something XnConvert can do?
Yes, on the Actions tab Canvas resize enables you to specify a background colour for the space around the processed image, white if you like. :D
aristosv
Posts: 4
Joined: Thu Sep 22, 2016 4:29 am

Re: resizing all images to the same size without distorting

Post by aristosv »

I just tried this feature and its not really working. I set the canvas size to 150x150 pixels, and it simply takes a part of the image and creates an 150x150 image.
As shown below.

I need it to put the whole picture inside the 150x150 pixel image, without distorting it.
10c1.jpg
10c1_result.jpg
10c1_result.jpg (18.7 KiB) Viewed 2438 times
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: resizing all images to the same size without distorting

Post by cday »

At a quick look you may need to use a Resize action as well and experiment a bit to get the result you need, assuming that it can be obtained. In my quick test I obtained the following result, not sure if it's exactly what you need or whether the settings shown below are the best:
10c1_test.jpg
10c1_test.jpg (16.24 KiB) Viewed 2435 times
Image_1.png
It may at least give you an idea of how to proceed, and there are plenty of settings to experiment with... :wink:
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: resizing all images to the same size without distorting

Post by XnTriq »

Related topics:
aristosv
Posts: 4
Joined: Thu Sep 22, 2016 4:29 am

Re: resizing all images to the same size without distorting

Post by aristosv »

This seems to have worked. Thanks.
Post Reply