Multiple operations in one command?

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

Moderators: XnTriq, xnview

nah0y
Posts: 4
Joined: Fri Jan 27, 2017 12:20 pm

Multiple operations in one command?

Postby nah0y » Sat Jan 28, 2017 11:04 pm

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: 27080
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multiple operations in one command?

Postby xnview » Sun Jan 29, 2017 10:52 am

Yes, multiple operations are possible: Put all your operations on the same command line.
Pierre.

nah0y
Posts: 4
Joined: Fri Jan 27, 2017 12:20 pm

Re: Multiple operations in one command?

Postby nah0y » Sun Jan 29, 2017 2:40 pm

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: 27080
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multiple operations in one command?

Postby xnview » Sun Jan 29, 2017 4:08 pm

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


Return to “NConvert”

Who is online

Users browsing this forum: No registered users and 1 guest