Page 1 of 1

Resize canvas by longest side to be square?

Posted: Tue Jun 16, 2020 3:35 pm
by hexaae
Is there a way to create a batch process under Actions where the canvas will be set to "square" based on the longest side (height or width) of the pic?
For example you have 2 pics: A (250x450), B (1600x450), and you want them to be "square" (A = 450x450, B = 1600x1600) resizing canvas by the longest side. Unfortunately 'Canvas resize' image option has no option to specify "width == height by the longest side" to generate square images with different size...

Or maybe there's another solution I didn't think of yet?

Re: Resize canvas by longest side to be square?

Posted: Fri Jun 19, 2020 11:47 am
by hexaae
That option would be extremely useful for www sites requiring many thumbnails of the same size, or with different square in size thumbs.

Re: Resize canvas by longest side to be square?

Posted: Fri Jul 10, 2020 12:20 pm
by crazydaz
You have to resize it first and then change the canvas size.

Resize Action has the feature to resize by the longest edge.

Image

Re: Resize canvas by longest side to be square?

Posted: Mon Jul 13, 2020 7:00 am
by hexaae
Thanks but this won't help: canvas resize MUST not be fixed, that's the problem. For a 250x450 picture for example I need a final result of 450x450, and for a picture 350x800 I need a final result of 800x800 and this should be done AUTOMATICALLY on a batch of thousands pictures with different size.
Canvas resize to the longest side would be extremely useful for product catalogs, since it won't crop the picture but just extend the shorter side to make it square, keeping the picture subject centered.

Re: Resize canvas by longest side to be square?

Posted: Mon Jul 13, 2020 12:03 pm
by crazydaz
Do you know any other app which can do that? You would need a script for that. Is it only 2 sizes you are after?

Netherveless, in this case, the quickest way would be to separate all images into 2 folders:
450px
800px

Then create preset for 450px, and another for 800px.

And then batch process all 250x450 etc.
And then batch process all 350x800 etc.

Done.

Re: Resize canvas by longest side to be square?

Posted: Mon Jul 13, 2020 1:50 pm
by hexaae
Of course no. They may have any size...

Re: Resize canvas by longest side to be square?

Posted: Tue Jul 14, 2020 9:51 am
by crazydaz
yeah, in that case, we need a new feature:

"Make it Square" action button would be awesome

Seems like, its been on Pierre's to-do list from 2014 :D So I wouldn't excpect it to come anytime soon either:
Resize to square canvas by longest side
Batch: Canvas resize to longest side

In the meantime, if you use Photoshop you can use this simple script to make any image square. Then just create a Droplet and just Batch it all through:

Code: Select all

app.preferences.rulerUnits = Units.PIXELS;

app.backgroundColor.rgb.hexValue = "FFFFFF"; // will keep expanded background white
app.foregroundColor.rgb.hexValue = "000000";

var doc = activeDocument
doc.resizeCanvas(Math.max(doc.width,doc.height),Math.max(doc.width,doc.height))

Re: Resize canvas by longest side to be square?

Posted: Tue Jul 14, 2020 11:34 am
by hexaae
Thank you crazydaz.
Hope to see this feature anytime soon since is quite useful for common WEB product catalogs. 'Resize Canvas by longer side' would be a great and unique feature.

Re: Resize canvas by longest side to be square?

Posted: Mon Jul 20, 2020 8:23 am
by xnview
See issue for current status and some details.

Re: Resize canvas by longest side to be square?

Posted: Tue Aug 18, 2020 1:36 pm
by xnview
This problem is supposed to be fixed in XnView MP 0.96.5. Please check and confirm the bug fix here.

Re: Resize canvas by longest side to be square?

Posted: Mon Sep 28, 2020 8:40 am
by hexaae
Will be available also for XnConvert?

Re: Resize canvas by longest side to be square?

Posted: Mon Sep 28, 2020 3:37 pm
by xnview
hexaae wrote: Mon Sep 28, 2020 8:40 am Will be available also for XnConvert?
yes i'll update it soon

Re: Resize canvas by longest side to be square?

Posted: Mon Sep 28, 2020 4:21 pm
by hexaae
xnview wrote: Tue Aug 18, 2020 1:36 pm This problem is supposed to be fixed in XnView MP 0.96.5. Please check and confirm the bug fix here.
Exactly what I wanted: standard canvas custom x-y resize, or smart option by Longest/Shortest Side. Works fine in XnView. Waiting for same option in XnConvert now.
A big thank you!