Batch with condition

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Rzulty

Batch with condition

Post by Rzulty »

I'm kinda new to nConvert but I've been using XnView for a while mostly to do one almost repeatable action:
I have jpgs with many different width/height ratios and I want to have them all 280x280px but I don't want to deform them so I have to do two things: first choose which is bigger: width or height and resize the image so the bigger dimension would be 280px. Next I want to resize canvas with given background color to make the image 280x280px.
My question is: how (if it is possible) to make a nConvert script with condition (the script should first recognize what is bigger - width or height)?

Cheers,
Rzulty
User avatar
xnview
Author of XnView
Posts: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Batch with condition

Post by xnview »

Rzulty wrote:I'm kinda new to nConvert but I've been using XnView for a while mostly to do one almost repeatable action:
I have jpgs with many different width/height ratios and I want to have them all 280x280px but I don't want to deform them so I have to do two things: first choose which is bigger: width or height and resize the image so the bigger dimension would be 280px. Next I want to resize canvas with given background color to make the image 280x280px.
My question is: how (if it is possible) to make a nConvert script with condition (the script should first recognize what is bigger - width or height)?
It's not possible, but you can resize it with ratio, and use canvas resize after
Pierre.