ImageProcessing

Welcome

 Welcome to Michèle’s ImageProcessing plugin, designed to add meaning full information to the top of pages: page number, current chapter and last section header.

Return to plugins section. Return to the Home page.

General information

Plugin name: ImageProcessing
Version: 1.0.0 – 8/18/26
Fee: Year subscription US$69,99 – Includes minor and major releases.
Availability: Adobe Marketplace
Status: Not yet published
Source code in book:  Adobe InDesign Automation of Nonfiction Books via JavaScript

Requirements

The author embeds images into his/her manuscript; he/she must then: name the images, peg down the image’s position, define a caption to place under the image, and add at least one cross-reference to the image somewhere inside the manuscript. These requirements are fulfilled via <IMG> image and <FIG> cross-reference tags.

  • Name images – Embedded images in Word may be named via the image’s Alt Text property. While in Word, select the image, right click, and look for Alt Text down in the choices offered. InDesign, upon importing the manuscript, places the image in a Rectangle Frame which has an Object Export Options property; InDesign automatically transfers the image’s name to it; it serves as a link between the image and the <IMG> tag, next paragraph.
  • Image tags <IMG>imgName[A]imgCaption</IMG> enable matching tags with images. They also enable the author to define where images should be placed. The algorithm uses the second part of the tag to create a caption.
  • Image cross-references – The author inserts images for a purpose; he/she wants to cross-reference them. This is done via the <FIG>imgName</FIG> tag inserted anywhere in the manuscript. The plugin creates an identifier which gets added to the image’s name, the result being something like Fig. 12.7 – IDPages pane page 77.
  • The only requirement is that the author should understand how to use <FIG> and <IMG> image tags and that the InDesign professional should understand how to use <GRP> tags to position images.

What it does

The ImageProcessing plugin’s objective consists in transforming raw images as provided in the author’s manuscript into a pleasing, informative, meaningful image which enhances the author’s narrative. Once processed, images must respond to the following objectives:

  1. Position – They must be positioned as near as possible relative to the author’s intent, defined by the <IMG> tag.
  2. Identifier – The algorithm creates identifiers, ex. Fig. 12.7: chapter twelve, seventh image. They should be identifiable according to the chapter they are located in and their sequence in the chapter,
  3. Captions – Images should have a caption under them. These should be placed and grouped under the corresponding images so that the InDesign professional could move them as a single unit.
  4. Cross-referencing – Images should have at least one cross-reference pointing to it somewhere in the manuscript, the result being something like Fig. 12.7 – IDPages pane page 77. The author inserts <FIG> cross-reference tags wherever he/she want to cross-reference an image.
  5. Resolution – Print books require that image resolutions be at least 300 DPI. The InDesign professional or an AI agent resets all images to their proper size and resolution via a list which details image heights and widths. Amazon KDP automatically adjusts resolution to 72 DPI for ePub (Kindle) documents. The PostProcess plugin relinks images to 300 DPI ones.

The five objectives above may be achieved via HTML-like tags and appropriate JavaScript programming, as follows:

  • Removing image anchors  – Images embedded in the Word manuscript are anchored to text and overlay it. The only solution to releasing anchors lies in cutting/pasting them. Since images occupy a great deal of text real-estate, whatever an algorithm does to the document which causes text to reflow, images are a drag to reflow and impact processing time negatively. The solution lies in cutting images and pasting them to page 1 out of the manuscript’s location.  Moving images to their intended destination should be undertaken when all other automation task (indexes, cross-references, etc.) have completed their work.
  • Identifiers – When looking at an image or at an image cross-reference, the reader should see something like Fig. 12.7; this is an identifier. The algorithm determines which chapter images are located in and their sequence within the chapter to create an identifier such as Fig. 12.7. These are inserted on the beginning of captions and cross-references.
  • Captions – The ImageProcessing plugin creates text frames into which it inserts the caption obtained from the <IMG> tag after adding the image’s identifier to it. It positions the captions thus created under the corresponding images and groups them with the images.
  • Move images to their destination page – The image/caption groups located in page 1 get moved to their destination pages, i.e. the pages the <IMG> tags are located in. Please note that the algorithm sizes the caption’s height according to the caption’s content. After moving the image/caption groups to their destination page, the algorithm converts the image <IMG> tag into a group tag as follows: <GRP>imgName[A]identifier – Please remove</GRP>.
  • Image positioning – The InDesign user fine tunes image positioning via the location of <GRP> tags. Once positioned satisfactorily, the InDesign user removes the tag. This process is undertaken image by image downwards into the document when there is no risk that the document might undergo changes which may cause the document to reflow.
  • Resolution – Print requires that images have a 300 DPI resolution which poses somewhat of a challenge. The author gets his/her images from somewhere, most probably by snipping them from the screen. They are large; I call these raw images; their resolution is 72 or 96 DPI. The author imports them into his/her manuscript and downsizes them as he/she sees fit. They now have a new size; their resolution can be anything. When the document is ready to publish, the InDesign professional needs to redefine a set of 300 DPI images, same width and height, and relink them to the InDesign document. The ImageProcessing plugin generates a list of images along with their width and height in the ImageProcessing.txt file to enable images to be set to 300 DPI yet maintain their dimensions. I used Claude to generate images with the correct resolution and size. A JavaScript script I created enables relinking images in no time; its code is available in my InDesign automation book.

Please note that a dialog box displays the HOMEDIR full path to enable the plugin user find the ImageProcessingReadme.txt file.

For more information

You will find source code in my InDesign automation book so that you could roll your own ImageProcessing plugin.
Return to the InDesign plugins page.