Multiple operations in one command?

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

Moderators: XnTriq, xnview

Post Reply
nah0y
Posts: 5
Joined: Fri Jan 27, 2017 12:20 pm

Multiple operations in one command?

Post by nah0y »

Hello!

Is it possible to execute multiple operations in one command?
I need a square thumbnail of an image, so I want to resize first, and then crop the image.
But I'd like to do that in one take :)

The issue is that when I resize the image, I need to know the resized size before I can give the crop command the correct values...

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

Re: Multiple operations in one command?

Post by xnview »

Yes, multiple operations are possible: Put all your operations on the same command line.
Pierre.
nah0y
Posts: 5
Joined: Fri Jan 27, 2017 12:20 pm

Re: Multiple operations in one command?

Post by nah0y »

Thanks for the answer :)

Yes but in the case of the square thumbnail I want, I can't do that in one command right?

Because I first need to resize, then crop but the crop method takes xywh and I don't know the new width/height after a resize (if I use ratio resize 0 500).
But maybe the other way around? First crop then resize? Same problem, because I can't crop without first giving width/height that I don't have without calling -info on my image.
User avatar
xnview
Author of XnView
Posts: 34720
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multiple operations in one command?

Post by xnview »

oh ok, yes in your case it's difficult to use only one command
Pierre.
Post Reply