is there any lightweight command line batch image cropping tool(Linux or Windows) which can handle a variety of the formats ?
To use ImageMagick to crop, first open the app, or right-click your image and select it from the Open With option. Next, left-click anywhere on the image, and select Transform > Crop. Left-click and drag to create box around the area you wish to crop to, and when you're happy, click Crop.
Most Linux distributions include the Shotwell application, which you can use to crop photos and perform other basic photo editing tasks. Open the image, click the Crop menu at the bottom or press Control + O on your keyboard. Adjust the anchor then click Crop.
Double-click a shape to select it. Drag within the image to create the shape boundary and move it to the desired location in the image. Click the Commit button , or press Enter to finish the cropping. To cancel the cropping operation, click the Cancel button or press Esc.
In Linux you can use
mogrify -crop {Width}x{Height}+{X}+{Y} +repage image.png
for CLI image manipulation
Imagemagick's convert does the trick for me (and much more than cropping):
convert -crop +100+10 in.jpg out.jpg
crops 100 pixels off the left border, 10 pixels from the top.
convert -crop -100+0 in.jpg out.jpg
crops 100 pixels off the right, and so on. The Imagemagick website knows more:
http://www.imagemagick.org/Usage/crop/#crop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With