paged.IDML Reference
Images & graphics

Formats & clipping

Which file formats IDML graphic frames place, how the frame outline and a clipping path crop a picture, and what a reader can draw without the linked file.

Tier: IntermediateIntermediateIIexplanation

An IDML file names its pictures but rarely contains them; what a reader can draw depends on finding the files and decoding their formats. The frame outline, and optionally a clipping path, decides what part shows.

In short Pictures are usually linked: the package holds a URI, and the file lives elsewhere. Some are embedded as base64 inside the document. Real documents place JPEG most of all, then Photoshop files, PDF pages and PNG; EPS appears rarely. The frame's outline crops every picture. A <ClippingPathSettings> can add a second clip: a path drawn by hand, which the file carries, or a path or alpha channel stored inside the image, which it does not.

Finding the bytes

Placed images covers how a frame names its file. For a reader the consequences are:

  • Linked pictures are outside the package. The IDML holds only the LinkResourceURI. A reader needs the file itself, usually from a Links folder next to the document, matched by name. Without it, the frame still has its full geometry; only the picture is missing.
  • Embedded pictures are inside. Their bytes are base64 in the graphic's <Contents>, so they travel with the file. The link still names the original location.
  • A missing picture is not an error. InDesign opens the document, marks the link as missing and keeps the frame, its geometry and its crop.

Formats

By LinkResourceFormat, the links in the surveyed documents are mostly JPEG, then Photoshop files, PDF pages and PNG, with a few WebP. EPS is placed in 3 documents. The format is a property of the file, not of the IDML: the same <Image> element holds a JPEG, a TIFF or a Photoshop file alike. Only PDF pages and EPS files get their own elements, <PDF> and <EPS>, because they are page descriptions rather than pixels.

In Paged: PNG, JPEG (including CMYK JPEG with an embedded profile), WebP, TIFF, GIF and BMP decode, and SVG is rasterised; very large JPEGs are scaled down while decoding. Photoshop files need the paged.image plugin. Linked PDF and EPS files are recognised but not rasterised; an embedded <PDF> or <EPS> shows the frame's own fill with a marker and a diagnostic. A frame whose link the host cannot resolve gets the grey missing-image placeholder. Supported · verified Supported · verified Supported · verified Supported · verified

The frame outline crops the picture

The picture is placed by its own ItemTransform and then clipped to the frame's outline. Pixels outside the outline are not drawn. That is how a frame shows a slice of a wide photo or a square crop of a tall one, and how an Oval or a drawn Polygon gives a picture its silhouette: the clip is the frame's path, whatever its shape, rounded corners included.

In Paged: pictures are clipped to the frame's path, for rectangles, ovals and polygons.

Supported · verified

Clipping paths

A graphic element can carry <ClippingPathSettings>, a second clip inside the frame's:

Attribute · ClippingPathSettingsValuesPagedpaged.set
AppliedPathNamebuiltin / textread
ClippingTypeNoneread
IncludeInsideEdgesfalseread
InvertPathbooleanread
Indexintegernot read
InsetFrameintegernot read
RestrictToFramefalsenot read
Thresholdintegerread
Toleranceintegerread
UseHighResolutionImagetruenot read
The 10 attributes real documents use most. All 10 attributes of ClippingPathSettings →

ClippingType says where the path comes from:

ValuePath fromIn the IDML?
Noneno clipping path—
UserModifiedPatha path the user drew or editedyes, as a <PathGeometry> child
PhotoshopPatha path saved in the image file, named by AppliedPathNameno
AlphaChannelan alpha channel in the image file, named by AppliedPathNameno
DetectEdgesedges InDesign finds in the image, tuned by Threshold and Toleranceno

InvertPath swaps inside and outside. IncludeInsideEdges, RestrictToFrame, InsetFrame and UseHighResolutionImage refine how InDesign builds the path. In the surveyed files ClippingType is None almost everywhere; one document has a UserModifiedPath.

Only a UserModifiedPath can be reproduced from the XML alone. The other three need the image's own data, and InDesign's own edge detection for DetectEdges.

In Paged: a UserModifiedPath is applied as an extra clip on top of the frame's, and InvertPath is honoured. The other types fall back to the frame's outline with an informational diagnostic. Supported · verified

Frequently asked questions

Does an IDML file contain its images? Usually not. Linked images are named by URI and live outside the package; embedded ones are stored as base64 in the graphic's <Contents>.

Which image formats do IDML documents use? Whatever InDesign can place. In the surveyed files that is mostly JPEG, then Photoshop, PDF and PNG. PDF pages and EPS files have their own elements, <PDF> and <EPS>; everything else is an <Image>.

How is a placed picture cropped? By the frame's outline. The picture's transform places it; anything outside the frame's path is not drawn.

Can a reader apply a Photoshop clipping path from the IDML alone? No. A PhotoshopPath or AlphaChannel clip refers to data inside the image file. Only a UserModifiedPath is written into the IDML, as <PathGeometry>.

What should a reader draw when a linked file is missing? The frame, with its geometry, fill and stroke, and some sign that the picture is missing. InDesign keeps the frame and reports the link as missing.

On this page