top of page
Transform Images to 100%

The script is intended to resize of raster images of InDesign-Document  to 100% scaling while maintaining necessary and importance of Effective Resolution. It also transforms the image according to the Rotation and Skew Angles.

Script Options:
(script options are stored in the file "Images100pc.txt", which is created at first start)
1) "Search Range:" - choose the Range for processing files:
• Document - all raster images of the .indd document,
• Аctive Spread - raster images of the current spread,
• Аctive Page - raster images of the current page,
• Selection - raster images from selection:
"Selected Graphic Files: " - names of the images in selection are showing in the dropdowns list;
2)  "Save As:" - the choice of format for save of the transformed files:
• IS - to transform a copy of the file (stored in original format)
• PSD - save in the format of Photoshop Document,
• TIFF - save in the format TIFF,
• EPS - save in the format Photoshop EPS;
(Flatten Image - while maintaining the format Photoshop EPS merge visible layers of the original image);
3) "Merge Visible Layers" - convert "visible layers" of images in a single layer,
• "Flatten Image" - to convert all layers of the image in one - Background, excluding the "invisible";
4) "Convert Layers to Smart Objects" - conversion of all layers of the image, except Background, in Smart Objects;

5) "Resampling" - when the option is executed resampling to 100% images, in the unset condition: for all selected image with an absolute Scale - 100% transformation is carried out only in accordance with the values of the angles of rotation and Shear X;
• "Output Resolution, (pixels / inch)" - the resulting image resolution, dpi (from 36 to 2540);
• "Effective Resolution Range" (pixels / inch) - the images with an effective resolution outside the set range are not processed, and when the option "Copy Ignored Files to Folder Excludes" - are copied into the folder "Excludes" (const exclFolderName = " Excludes ");
• "Step resizing factor, (%)" - step-by-step rate change authorization;

• "Select Resample Method" (the choice of resample image algorithm) -
the importance of "Off" used automatic choice Resample Method:
BICUBIC SMOOTHER - increases image resolution,
BICUBIC SHARPER - reduction;
at the "On" is one of the selected methods for resample images;
6) "Crop Image" - crop the image:
"Picture Box Bleed, (mm)" - the value of symmetrical bleed beyond the image frame;
7) "Relink to transformed files" - relink images to transformed files
performed script in InDesign, the image applies:
• Rotation and Shear X Angle - 0 °,
• Vertical and Horizontal Scale  - 100%;
• Center Content - picture frame positioned at the center if active adjustment "Crop Image",
• Return Clipping Path Settings - the return of baseline settings for Clipping Path
(saved only for Photoshop Path, for the rest: Alpha Channel, 
User-Modified Path and Detect Edges set to"None");
8) "Create a copy of the document" - create a copy of the document 
to replace the images transformed files(a copy created in the document folder, name formed from the name of the document and index "_100pc.indd");
9) "Relink Step Mode" - step-by-step mode replacement the images for each documents;
10) TIFF Save Encoding: const outTiffSaveEncoding - the type of encryption while maintaining the format TIFF:
JPEG, NONE, TIFFLZW, TIFFZIP (by default - "NONE");
11) EPS Save Encoding: const outEpsSaveEncoding - the type of encryption while maintaining the format
of Photoshop EPS:
ASCII, BINARY, JPEGHIGH, JPEGLOW, JPEGMAXIMUM, JPEGMEDIUM (by default - "JPEGMAXIMUM");
12) Photoshop Dialog Modes: const phpDialogModes - displaying Adobe Photoshop program dialogs in the performance of the script:
• DialogModes.ERROR - displayed only error messages,
• DialogModes.ALL - shows all the dialogs,
• DialogModes.NO - dialogs are not displayed (by default);
13) const remColorProfile - when "true" transformed files are stored without the built-profile
(ignored while preserving images in the original document format - "Save As Is", by default - "false");
14) const outFolderName = "Links" - the name of the Output Folder for processed files;
15) const outFileIndex = "" - index in the names of processed files.

Script supports versions of Adobe Photoshop: CS 2-6, CC 2014-2019:

Transformed images stored in a folder named «Links_XXXppi» or «Links_Crop», which was created in the directory of the .indd document.

Transforming all Channels, Layers and Paths of Images.

For all Layers of the Images (including groups - Layer Sets) execute commands Unlink and Unlocked.

For the transformation Effects, applied to the Layers, realized Convert Layers to Smart Objects. 

When processing bias layers of images in accordance with the value of the Shear X angle is performed rasterizing of the text layers and layers of type "SMARTOBJECT".
 
The files with similar names (without extension) are assigned indexes: outFileIndex and duplicates are incremented from 1.
 
Folder name and the const outFileIndex can be edited to change the initialization file:

const outFolderName = "Links"; const outFileIndex = ""; (default values).

 

When is operation Relink to processed images in the document is executed unlocking position for frames of images.
 
With the transformation of images in Adobe Photoshop selected "white" for Background and Foreground Colors (RGB: 255, 255, 255). This value are stored in the file "Images100pc.txt": const BkFrgColor = [255, 255, 255].

When disabled options resample (Resampling) and cropping images (Crop Images) occurs resave found images in the selected document format.

For files in Photoshop EPS in InDesign CS4 is not determined by the effective resolution, to work correctly the script must resave the files in another format (. tif or. psd).


When off resample (Resampling) cropping (Crop Images) executed only for images with angles (rotation and shear) - 0 degrees.


Working with Photoshop Actions:
before running the script with the implementation of Photoshop Actions (before saving the image) must enter or select the names of the "Action" and "Set" in the sequence of these actions on open document. This mechanism is implemented with a dialog that appears when you click "Select / Add" or the beginning of the script with the selected option "Execute Photoshop Actions Before Saving":

If the name "Action" or "Set" does not match loaded in the panel "Actions" in Adobe Photoshop, will generate a runtime error this Action.

Test Mode.
This option cancels the script command "close" for the processed files after saving. In the Adobe Photoshop Panel "History" can track the activities that occur over the image.

The script will skip over and not process: 
1) Missing, Modified, Embedded Links, embedded images saved in folder "Embedded Images";
2) Files with vector data (AI, PDF, EPS(Ai)...);
3) CompuServe GIF files - mode "Save As Is" (native resolution only 72 Ppi).

 

The transfer and run script in Photoshop and back to InDesign (Relink) functions performed by BridgeTalk.

bottom of page