Request: Crop/pad image to aspect ratio

XnConvert Multi Platform - Windows, MacOSX, Linux
Post Reply
Danny
Posts: 564
Joined: Sat Sep 04, 2004 5:09 pm

Request: Crop/pad image to aspect ratio

Post by Danny » Mon Apr 01, 2019 6:02 pm

Let's say we have a bunch of images with varying dimensions (w×h) and I want them all to fit into a 16:9 canvas, but I don't want to define a fixed size (like 1920×1080px). The wider side should stay the same, only the narrow side of the image should be padded with a given color or transparency until the desired aspect ration is met.

It seem like there's currently no way to achieve that, so I'm asking for a solution.

Related: https://newsgroup.xnview.com/viewtopic.php?f=79&t=38104

Basically what this script does: http://www.fmwconcepts.com/imagemagick/aspectpad/

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

Re: Request: Crop/pad image to aspect ratio

Post by xnview » Mon Apr 15, 2019 2:18 pm

So a ratio & background color?
Pierre.

Post Reply