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

Posted on 2007-09-29
Last Modified: 2008-01-09
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.
Question by:chrisatwork
    LVL 9

    Accepted 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.
    LVL 7

    Expert Comment

    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.

    Author Comment


    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.


    LVL 9

    Expert Comment

    Thanks much, Christopher. Glad you got it working.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    HOW TO CREATE A WEB 2.0 IMAGE WITH A REFLECTION I would like to start by saying I know Web 2.0 isn't a style. It is actually the practice of information sharing or  collaboration on the Web. It is also associated with the technology that is used …
    In this article, I'll explain how to change the color of a selection in Photoshop. I'm sure there are a couple different ways to do this in photoshop, but this is my preferred method in Photoshop. I am using Photoshop CS6 and I will be adjusting the…
    In this tutorial viewers will learn how to correct colors in Photoshop using the Curves adjustment Open a photo for editing in Photoshop: Begin by creating a new adjustment layer by going to Layer > New Adjustment Layer > Curves: Select "OK" on the …
    In this tutorial viewers will learn how to create layer styles in Photoshop to easily apply effects to multiple items. Open a document in Photoshop: Apply layer styles to a layer by right clicking the layer in the Layers window and selecting "Blendi…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now