[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • 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.
0
chrisatwork
Asked:
chrisatwork
  • 2
1 Solution
 
thinkwelldesignsCommented:
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.
0
 
RipinCommented:
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.
0
 
chrisatworkAuthor Commented:
thinkwelldesigns

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.

Christopher

0
 
thinkwelldesignsCommented:
Thanks much, Christopher. Glad you got it working.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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