Batch: Canvas resize to longest side

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
Acantiming
Posts: 7
Joined: Sun Jul 07, 2013 8:18 pm

Batch: Canvas resize to longest side

Post by Acantiming » Sun Feb 25, 2018 8:08 pm

Hi there,

i have a bunch of images across many sub-folders with different resolutions and ratios. I want to do a batch job to get all images as square resolution images, but they should all resized by canvas of the longest image side (height or wide). Is there a way to do this with XnView? Later all images should be resized to 600x600px, when the size is bigger then 600x600px, but it should stay at the current resolution, when its smaller than this size. Is there some solution for me?

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

Re: Batch: Canvas resize to longest side

Post by xnview » Tue Feb 27, 2018 10:18 am

in batch convert>Resize, you can choose longest side
Pierre.

Acantiming
Posts: 7
Joined: Sun Jul 07, 2013 8:18 pm

Re: Batch: Canvas resize to longest side

Post by Acantiming » Tue Feb 27, 2018 10:52 am

Many thx for your response, but either i didn't understand that function or im to stupid. I have tested your suggestion now, but it didnt work as expected. I have here a a concrete example: Let's assume, i have the following source images with the dimensions set to:

test1.jpg: 138x141
test2.jpg: 200x350
test3.jpg: 320x100

as a result i want the images canvas scale to:

test1.jpg: longest side is 141px > 141x141
test2.jpg: longest side is 350px > 350x350
test3.jpg: longest side is 320px > 320x320

With your suggestion, i press STRG+U > add the folder z:\somefolder (with all subfolders) > Tab "Transformations" > choose "Change Size" > Set your setting and get for picture test1.jpg 200 x 205 as resolution. Im really lost. I have now idea, how i get the desired result i want. There should be no area of the original image cut. If the image cant fit the square resolution, black bars should be added in the areas of the original picture, where the original image info is missing.

In a second step, when i have all my square pictures, i will resize this to a maximum of 600 x 600px but only, if the square picture is bigger than 600x600px. If it is smaller, there should be no resizing. This should be no problem with XnView if i can trust the settings i have seen. But i dont know how i can make the first step above.

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

Re: Batch: Canvas resize to longest side

Post by xnview » Tue Feb 27, 2018 12:44 pm

sorry i talk about resize not canvas resize, so currently it's not possible
Pierre.

Acantiming
Posts: 7
Joined: Sun Jul 07, 2013 8:18 pm

Re: Batch: Canvas resize to longest side

Post by Acantiming » Tue Feb 27, 2018 12:52 pm

Ahh ok. Many thx for that info. I will look for a alternative. Maybe IrfanView can do this in some sort. But i really like XnView a lot more. Thx for your help.

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

Re: Batch: Canvas resize to longest side

Post by xnview » Thu Mar 01, 2018 3:31 pm

Acantiming wrote:Ahh ok. Many thx for that info. I will look for a alternative. Maybe IrfanView can do this in some sort. But i really like XnView a lot more. Thx for your help.
i'll try to add it in XnConvert/XnView MP
Pierre.

Acantiming
Posts: 7
Joined: Sun Jul 07, 2013 8:18 pm

Re: Batch: Canvas resize to longest side

Post by Acantiming » Thu Mar 01, 2018 3:44 pm

Many thx. I have found a way to do this with Irfanview, maybe this helps you to implement it. I go in Irfanview to "Batch Processing", choose the pictures to convert, advance options, check there "resize" as in the first screenshot and additionally "Canvas" with the settings from the second screenshot. As a result, i got all my pictures in 600x600px. I have not got it to work, to resize only picture they are to big, if i checked this, I got not the results, i expected. But that's ok for now.
Attachments
hc_005.jpg
002 - Canvas
hc_005.jpg (90.69 KiB) Viewed 269 times
hc_004.jpg
001 - Resize Settings

Post Reply