• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

create batch action to crop images at predefined x,y co-ordinates - URGENT!

I have around 500 identically sized gifs from which I need to crop a fixed number of pixels from top and bottom, then resize to the original height. I would like to automate this, for obvious reasons!

Is there any way in a action script or otherwise, of opening an image, setting a fixed size crop marquee at a predefined x,y coordinate, cropping, resizing and saving again?

I can obviously set the marquee size and click in the image, but the marquee locates at the clock point.

Very urgent or I will go stir crazy this weekend! 500 points.
  • 2
1 Solution
Hmm, I'll take a crack at this, but I'm not sure what you mean by  "the marquee locates at the clock point".

I would start with an open image. Perhaps make a copy of it just be make sure you don't ruin anything.

1. Create a new action.
2. Hit "C" for the crop tool.
3. Select the crop size and location on the document by clicking and dragging. When you get the exact placement correct, hit "Enter".
4. Go to Image/Canvas Size to enter in the new canvas settings.
5. Stop recording the action.

If I'm understanding you correctly, that should do what you need to get done. But if I'm missing something, feel free to post back.
And after you have recorted the Action, use File/Automation/Batch to do it for all images you want.

Best is if images are in some folder and done images put in another. Then you dont have to open images first.
chrisatworkAuthor Commented:

Thank you for that, sorry about the typo, should have read "click point"! Too much of a hurry....

After I posted this I had an idea; as the images needed to be cropped equally top and bottom, and consistently on all images, I set up an action to resize the canvas which cropped the image, then resized back to the original.  Ran it as a batch and no problems.

Although I solved it, you offered a valid solution so points to you with thanks.

Ripin: thank you for your comments.


Thanks much, Christopher. Glad you got it working.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now