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.
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 aLinksfolder 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 · ClippingPathSettings | Values | Paged | paged.set |
|---|---|---|---|
| AppliedPathName | builtin / text | read | |
| ClippingType | None | read | |
| IncludeInsideEdges | false | read | |
| InvertPath | boolean | read | |
| Index | integer | not read | |
| InsetFrame | integer | not read | |
| RestrictToFrame | false | not read | |
| Threshold | integer | read | |
| Tolerance | integer | read | |
| UseHighResolutionImage | true | not read |
ClippingType says where the path comes from:
| Value | Path from | In the IDML? |
|---|---|---|
None | no clipping path | — |
UserModifiedPath | a path the user drew or edited | yes, as a <PathGeometry> child |
PhotoshopPath | a path saved in the image file, named by AppliedPathName | no |
AlphaChannel | an alpha channel in the image file, named by AppliedPathName | no |
DetectEdges | edges InDesign finds in the image, tuned by Threshold and Tolerance | no |
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
UserModifiedPathis applied as an extra clip on top of the frame's, andInvertPathis 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.
Placed images
How an IDML graphic frame holds an Image, PDF or EPS element with its own ItemTransform, GraphicBounds and a Link that names the file or marks it embedded.
Effects & transparency
How IDML stores opacity, blend modes, shadows, glows and feathers on a page item, in a TransparencySetting with one child per effect.