Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create an Automator folder action to automatically crop images that are added to a specific folder. It works; however, it crops the images towards the center. How can I crop starting from the right edge? I found Propper Cropper, which looks like it does what I need, but unfortunately it was compiled for PPC, and is therefore not a universal action. Is there an alternative (preferably an Automator action)? If this is not possible with Automator, is there some other software I can download to achieve this?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Install Homebrew and then install ImageMagick with brew install imagemagick.

for f in "$@"; do
    [[ "$f" != *.png || "$f" != *.jpg ]] && continue
    /usr/local/bin/mogrify -crop 50x50+0+0 "$f"
done
  • -crop 50x50+0+0: crop from the top left corner, create only one image
  • -crop 50x50+0+0 -gravity SouthEast: crop from the bottom right corner
  • -resize 160x90^ -gravity center -extent 160x90: make images smaller or bigger and crop them so that they fill the specified area
  • -crop '-50-50' -crop '+50+50': crop 50 pixels from all sides

See http://www.imagemagick.org/Usage/resize/ for more examples.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.