Resize canvas by longest side to be square?
Moderators: XnTriq, helmut, xnview, Dreamer
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Resize canvas by longest side to be square?
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?
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?
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
That option would be extremely useful for www sites requiring many thumbnails of the same size, or with different square in size thumbs.
-
- Posts: 21
- Joined: Wed Nov 20, 2019 2:09 pm
Re: Resize canvas by longest side to be square?
You have to resize it first and then change the canvas size.
Resize Action has the feature to resize by the longest edge.
Resize Action has the feature to resize by the longest edge.
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
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.
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.
-
- Posts: 21
- Joined: Wed Nov 20, 2019 2:09 pm
Re: Resize canvas by longest side to be square?
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.
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.
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
Of course no. They may have any size...
-
- Posts: 21
- Joined: Wed Nov 20, 2019 2:09 pm
Re: Resize canvas by longest side to be square?
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 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:
"Make it Square" action button would be awesome
Seems like, its been on Pierre's to-do list from 2014 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))
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
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.
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.
-
- Author of XnView
- Posts: 44339
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Resize canvas by longest side to be square?
See issue for current status and some details.
Pierre.
-
- Author of XnView
- Posts: 44339
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Resize canvas by longest side to be square?
This problem is supposed to be fixed in XnView MP 0.96.5. Please check and confirm the bug fix here.
Pierre.
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
Will be available also for XnConvert?
-
- Author of XnView
- Posts: 44339
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 13
- Joined: Tue Jun 16, 2020 3:12 pm
Re: Resize canvas by longest side to be square?
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.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.
A big thank you!