Page 1 of 1

Command-line cropping

Posted: Mon Dec 10, 2012 2:54 pm
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.

Re: Command-line cropping

Posted: Tue Dec 11, 2012 7:25 am
by xnview
Do you have tried nconvert?

Code: Select all

nconvert -crop x y w h -out png -o out.png input.png

Re: Command-line cropping

Posted: Tue Dec 11, 2012 8:41 am
by dzenanz
Yes, this is what I was looking for. Thank you and cday (who sent emails).