Scaling and cropping a graphic from InDesign in Photoshop?


Can anybody provide me with sample code about how to scale and crop an image with Photoshop according to its properties in Adobe InDesign and then reimport it?

I have a lot of placed RGB-JPGs in a document that need to be converted to CMYK-TIFFs. I already found this great script [url=][/url], but I am currently unsure how to crop the image according to its appearance in InDesign…



I would caution against this, as it could cause some unwanted consequences. With the speed of computers and networks today it is probably best to leave the scaling and cropping to InDesign when it exports the PDF for final output. If you do decide to go about it I would suggest adding in a QA step and working on a copy of the InDesign and Photoshop files so that if something goes wrong you can easily recover.

Ditto Jerome.

I’m going to have to disagree on this one.

I’ve worked on too many jobs where someone placed and scaled huge images. Trying to multipurpose images like this creates an unnecessary burden on a workflow compared to managing many smaller, but appropriately sized images. This also creates extra work for the RIP (and not everyone uses a PDF workflow).

Also, Using common images like this opens the window of opportunity for an operator to create an unintended global change by editing the larger linked file.

Lastly, this allows for more efficient vending and processing of files to OSVs as the package contains instance-optimized images.

Just my 4 cents.

Like I’ve said, in my previous post on the other thread, the cropping part of it was left out because it didn’t behave correctly. I’m having trouble fixing it for the latest version and hadn’t time to figure this one out, so I ask my boss to pay for the zevrix plugin that do those things (and it crops the image to!) With all sorts of automation built in. It’s not cheap though, but well worth it IMHO. It’s called LinkOptimizer. Check it out.


Hi everybody,

First of all thank you very much for your answers.

I absolutely understand the objections from Mark and Jerome, but our case is more like the scenario described by BLUEFROG.

I already took a look at LinkOptimizer before, but we do not need a plugin, but a script solution for an Xserve.

Moreover we already have such an AppleScript for QuarkXPress and Photoshop, I just try to avoid to script everything myself when there are already excellent solutions available (so much to do, so little time).

@JeffLambert: Do you still have the snippet where you try to crop the image? I would really like to take a look at it :slight_smile:

Enjoy your weekend!


an older thread about Jeff’s code but with actual infos to work correctly in id cs3:;post=420408;page=3;sb=post_latest_reply;so=ASC;mh=15;

(I once used the basics from this code to make it work with Id cs2 and agfa’s intelliTune, who needs an xml-file with informations for cropping, adjusting … Thx to Jeff Lambert :slight_smile: )

I’m sure there are good reasons to do this, but I think in most situations today it is not as necessary as it was 5 or more years ago. A good place to start would be to look through this thread:

It was pretty active for a while and updated through CS3 and should handle the scaling and replacing of the images, though not the cropping.

To address the cropping I would scale the image first in PS then use a two step “cropping”. First resize the canvas using a bottom right anchor removing the top left offset of it’s placement in ID, then resize with a top left anchor the height and width of the picture box.

For some images you might see a slight shift when doing this since the when you crop you might trying to crop a fraction of a pixel off and PS will round up or down to the nearest pixel. For the same reason the cropped image might be slightly smaller than the picture frame, leaving a hairline to the right and/or bottom of the image. You could probably overcome this by checking the size and ensuring that you are always cropping off to the next whole pixel and calculating the offset accordingly.