inDesign - scale liked images

Scale linked images (I can´t edit the topic…)

I have a document with 600+ images linked. Most of the images are palced smaller than 40% and I´m now manually finding all that are not, then I make a Photoshop-batch scaling down all the images not on my list to 120 dpi (300 x 0,4).

Would it be a hard thing for yu guys to make a script that checks the size of the images and scales down the images to the exact dpi the need.

One problem is that one image can be placed in different scale on differnet places, and if the script scales it down to 40% in one place, it will have a hard time scaling it up again if it´s placed in 100% later. Either that the script makes a to do-list before it starts scaling or that it creates a log with errors that I can correct after.

And it would be great while it´s at it to check that no image is placed unproportionaly (width: 64%, height: 62.6%).

Is it possible? Is there allready a script like this?

Oh, I use inDesign 3.0.2, Photoshop 8.0 and os x 10.3.9.

One more thing. It would be nice if it told me if an image is placed bigger than 120%.

/Pontus

I made a FaceSpan application for Quark about 6 years ago that did this, I would select the image and hit a button that would duplicate and scale the new image 66% or 33% and place the new image at an adjusted scale. It would also update a Cumulus database with the new image with comments back to the original. Back then about the only thing you could do with scripting PhotoShop was to open, close, and doscript (perform and action). Now everything that you are wanting to do can be done with those applications, you could even bypass PhotoShop and use OS X’s build it ImageEvents to scale the images.

The first thing to do is to see if you can simplify what you want it to do and how to build it. For example, since the images are placed in multiple locations in the document at different scaling, if you set a range that it would not scale the images at like 51%-119% no action needed. Then it would open the image, add a comment in the xml data refering to a new file and save, then duplicate the image and change the comment to refer back to the original file, scale the image and save it. This way if it came across the image again it could just read the metadata and relink and rescale only if needed and if it was OK in the new location it would leave it alone. A solution like this would mean duplicate files at different scales, but would minimize the number of those files duplicated.

Another solution would be to build a list of all files placed in the document. The from that build a list of duplicate files, and process the document. How much more complex it gets from here depends on how you want to deal with the files that are placed more than once. Also, if you want it to build a log or just display a dialog for errors.

All in all, what you want is not a simple script. If this is a one time thing, then it might be easier to do it by hand, if it is a reoccurring problem then I’m sure that it would save you a lot of time now and in the future to invest the time in creating one for this purpose.

An idea is to call a photoshop-macro, maby having 4 differnet depending on it´s scale. In this way you could add unsharp mask etc with different amount for each scale.

Since most images are placed only once an error-log would do just fine, 95% would be automatic and I will check it by hand anyway afterhand.

I don´t think I´m alone wanting this script, but I don´t have the know-how for building it my self, I can pay for a script like this but maby not for all the hours spent building it, but since I´m sure that it´s possible to sell again and again…

Anyone?

Take a look at this thread -

http://www.adobeforums.com/cgi-bin/webx?13@606.6vXmeaqMAm4.6@.3bb68509/9

If that link should fail, search the Adobe User to User Forums > Scripting Adobe Applications > InDesign Scripting for the post called “new version of resize images”.

Your solution may be closer than you thought. :wink:

Very nice. I will have a long look later.

We use .eps but we are thinking about changing to .tiff or maby .psd but we also use illustrater eps also, maby that´s a problem?

If anyone else is interested in a script like this please give some input on what it needs to do and how it needs to behave, user interaction, reporting and “flexability” required to make it an application worth your while.

This is the absolute basic-script where the user needs alot of instruction, meening it would be hard to sell, but would work fine for me:

The script goes through all links and opens all images, exept illustrator .eps and .ai, that are placed smaller than a set percent, for this document I did now it was 40%. It opens all of these images with photoshop using some sort of macro (great for changing settings) or by telling Photoshop to: scale the image down to 40% of it´s DPI (will not effect it´s cm-dimentions), adding unsharp mask and saving it. Then it must write in some sort of a log what it did, so that it can on opening next image see if it allready scaled this image and if it did so that it´s to small now, it would add this problem to an error-list in the log. I would then go through all the erros and manually fix the problems (like I did with all images now, meening that I will allways work on a copy)

So:

  1. Is this image an .eps, .tiff, .psd? If so:

  2. Is it smaller than 40%? If so:

  3. Have I scaled this image allready (checking the log)? If yes, make a note in the error-list. If no:

  4. Open the image and scale to 120 Dpi (40% of normal 300), ad Unsharp mask 90, 0.5, 0, save, close

  5. Make a note in the log.

Wish list:

  1. Adding more than one scale-limit, maby 3-5 differnet. (>10% 10-20% etc… using different amount of unsharp mask for each scale)

  2. Ad to error-list if the image is placed bigger than 130%
    or if the dimentions is off (x-12.5%, y-12.2%)
    or if it´s anoher format like .jpg
    or if it´s in RGB-mode (I´m looking at having inDesign making the mode-change when printing or making the pdf, but for now we let photoshop do it)

  3. Making a to do-list first, checking all the duplicates etc before altering the images at all, therefore not making any mistakes…

  4. Program it so that it can make coffee.

How do plan on charging?

Last question first, I wouldn’t charge development time, just a flat fee. Not sure what that would be rignt now, part of that would be up to you, what is it worth? I don’t think either of us can answer that right now, at least untill the paramiters are set.

Next, some of the items up your wish list I would consider a must: RGB conversion (you have the file open already, why not?), .jpg conversion, fixing unproportinate scaling (using the smaller of the 2 values).

I think I have a game plan on the duplicate files. I presume that you want to duplicate the file and make the alterations to the duplicate rather than the original. The Photoshop work should be able to be handled in the script as well, though I have not done this in scripting PS in the past.

Your scaling method is a bit odd to me, beut ing from a production and design background we keep everything at 300 dpi and adjust the scppercentage in the layout program. Say you scale a base photoshop file down 50% then you need to reimport it at twice the size that it was imported originally at. So if it was originally imported at 30% it is brought back in at 60%. With the dictionaries in PhotoShop CS it is entirely possible to get everything back to 100%, which might be preferable. The question then how to deal with the unsharpen mask filter? Set a range for 10-20%, 30-40%, and so on OR take a baseline of 2 scalings that you know and figure out math to give you the same ratio at any scale.

Next, on upscaling what is your threshold for “Find a new image” versus scaling it in PS?

All in all, I think that everything that you want in your wish list is possible. I have to think some on how I want to handle some of the settings, user interaction, preferences, etc.

Pushing further, what is your workflow? File open and run the sctipt, point to a folder to batch process a series of documents, Drag and Drop (I used to prefer this, but I think that scripts run faster when initiated by InDesign or are part of an AppleScript Studio applications)…

I will be thinking on this while while I give up the computer for a while to family…Your input is appreciated.

If you scale an image down by ajusting it´s pixels or cm (I´m from Sweden, we use dpi and cm) you have to remember what you did with the image and then make the same adjustment with scaling in inDesign. If you change it´s dpi, nothing happens in indesign, exept for having a lighter project. The downpart is that you loose controll on how big the image is (say you got a 72 dpi image from someone, you place it in 50% and scale it down to 36 pdi by mistake vs allways having then in 300% knowing that as long as you are under 100% your fine, ut it takes to steps and with 1500 links that takes time if you do it manually)

I start by linking up a document, from our server + images I get on cd etc (all RGB), then I do the Package thing, so I allways work on a duplicate.

About time, our next job like this would be late August, so there is time. I would say that we handle abou 6-10 documents bigger enough to be hard to handle. This document that I did now was a cataloge with about 600 images linked 1600 times. I hope to save 5-6 hours each time.

The script I have (a script that relinks all images in a document) works from the script-window in indesign, I would like the same here, if there´s not a much faster way. I package the document, open the new version wich is linked to all the images and I run the script from inDesign.

Now I have to prepare for my date.

Jerome and Pontusuggla,

Cary, and I and many others have contributed to the resize image script. I’d like to know what you don’t like about this script and what it doesn’t do that you’d like it to do in your workflow.

For rotation and cropping, I think you better leave them alone. Why? Because if you change your mind, you can always revert back. Also, it caused inconsistencies and the image where not placed at the right place or cropped properly in PS. So I removed those option that where in the original script by Cary.

I saw that there is still a bug with alpha channel that Robert mentionned in the user to user forum on Adobe’s site. I’ll probably look into that at some point.

Jerome, if you have the hability to help (for free!) I’d be very happy to work with more knowledgable people then I am.

Jeff