Images processing using ImageMagick (convert)

Submitted by editor on Sat, 06/11/2016 - 23:54

Crop images using convert (ImageMagick)

Example (Single file):
convert input.jpg -crop 1300x950+312+72 crop.jpg
convert input.jpg -crop 1300x950-100-50 crop.jpg

Resize images using convert (ImageMagick)

convert -resize 1024x768 *.JPG new_.jpg
convert -resize 25% *.JPG new_.jpg

 

Batch process (bulk processing - shell/batch script)

#Example 1. Crop images
for i in $( ls Renamed/*.jpg); do convert -crop 1300x950+312+72 $i outs/$i; done

#Example 2 Resize images
for i in $( ls ./*.jpg); do convert -resize 1024 $i outs/$i; done

Add new comment