Using Automator to batch crop with custom coordinates / measurements

Solution 1:

Here is a way to achieve what you want with ImageMagick. Hopefully you’re comfortable using Terminal (and also use Homebrew to manage all your packages).

Either way, you must install ImageMagick so you can run convert command line in Terminal.

  1. Open the folder you want to batch processing all the images. If your folder name called images is located on Desktop, you’ll need to enter cd ~/Desktop/images/ in Terminal.

  2. ImageMagick have a built-in option to crop images according to sizes and coordinates. The command is:

     convert <input documents> <width>x<height>+<pos x>+<pos y> <output filepath>
    

Cropping Images with ImageMagick

If I want to crop all the images into:

  • Width: 300px
  • Height: 500px
  • Position X: 100px from top left
  • Position Y: 70px from top left

I can enter the command below:

convert *.jpg -crop 300x500+100+70 result/screenshot.jpg

Make sure the target filepath exists. In this case, you should create a folder called result in Desktop. Or you can use absolute path like ~/Desktop/result or whatever folder you want to point. Just drag the folder into Terminal like this:

Dragging Folder into Terminal