Command-line cropping

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
dzenanz
Posts: 5
Joined: Fri May 14, 2010 7:12 am

Command-line cropping

Post by dzenanz »

I need to crop many (192) png images into left and right parts, while avoiding some object in the middle. Images are of different resolutions. I have coordinates of these objects (it is output of my program), and I can control the format of these coordinates.

What is the simplest way to do this? I am not afraid to write scripts, I just don't know XnView's syntax.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Command-line cropping

Post by xnview »

Do you have tried nconvert?

Code: Select all

nconvert -crop x y w h -out png -o out.png input.png
Pierre.
dzenanz
Posts: 5
Joined: Fri May 14, 2010 7:12 am

Re: Command-line cropping

Post by dzenanz »

Yes, this is what I was looking for. Thank you and cday (who sent emails).
Post Reply