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.
A placed image is a frame with a graphic element inside it: <Image> for pixels, <PDF> for a PDF page, <EPS> for PostScript. The graphic carries its own transform and a <Link> to its file.
In short The frame is an ordinary Rectangle, Oval or Polygon whose outline crops
the picture. Inside it, the graphic element has an ItemTransform that places the picture in
the frame, a GraphicBounds box in the picture's own units, and a <Link> whose
LinkResourceURI names the file. An embedded picture keeps its bytes in the graphic's
<Properties><Contents>, and its link says StoredState="Embedded". The frame's
<FrameFittingOption> records how the picture was fitted and cropped.
The shape of a graphic frame
A rectangle holding an Image at half scale. The Image's GraphicBounds is the picture's 600 x 400 pixel box; its Link names the file, which this package does not include.
Nothing on the frame's own element says "graphic frame": the child graphic does. A frame with no graphic child is an empty frame, or a coloured shape.
In the surveyed documents, <Image> sits in rectangles, ovals and polygons; <PDF> and <EPS>
in rectangles.
Two transforms
- The frame's
ItemTransformplaces the frame in its spread or group, as for any page item. - The graphic's
ItemTransformplaces the picture inside the frame: it maps the picture's own space into the frame's inner space. A scale of0.5shows the picture at half size; a translation moves it within the frame.
The picture lands where the two composed put it, and only the part inside the frame's outline shows. Cropping is therefore not a property of the picture: it is the frame's outline cutting off what the graphic's transform puts outside it.
<Image>
| Attribute · Image | Values | Paged | paged.set |
|---|---|---|---|
| ItemTransform | transform | read · written | imageContentTransform |
| Self | id | written | |
| EffectivePpi | number-list / text | read | |
| Space | $ID/RGB | read · written | |
| ActualPpi | number-list / text | read | |
| AppliedObjectStyle | ObjectStyle reference | not read | |
| GradientFillAngle | integer | not read | |
| GradientFillHiliteAngle | integer | not read | |
| GradientFillHiliteLength | integer | not read | |
| GradientFillLength | integer | not read |
ItemTransformplaces the picture in the frame (above).GraphicBounds, a typed<Properties>child withLeft,Top,RightandBottom, is the picture's own box: for a raster image,0 0to its width and height in pixels, one pixel to one unit. The transform maps that box into the frame. InDesign reads it that way: aGraphicBoundsset to the frame's box under a scaling transform puts a tiny picture in the wrong place.Space($ID/RGB,$ID/CMYK, …),ActualPpiandEffectivePpidescribe the picture as placed: its colour space, its own resolution and its resolution at the placed size, written as(x y)pairs. They are informational.ImageRenderingIntentand a<Profile>property record the colour handling of the picture; see colour management.
<Image> can also carry ClippingPathSettings, TextWrapPreference and a
TransparencySetting of its own. Clipping paths are covered on
formats & clipping.
<PDF> and <EPS>
A placed PDF page is a <PDF> element, a placed EPS file an <EPS> element; there is no
<EPSImage>. Both sit in the frame where an <Image> would, with the same ItemTransform,
GraphicBounds and <Link>. <PDF> adds a <PDFAttribute> child with the PageNumber
placed, the PDFCrop box and TransparentBackground, and a <GraphicLayerOption> for the
PDF's layers. Placed InDesign pages use <ImportedPage>; none of the surveyed documents has
one.
| Attribute · PDFAttribute | Values | Paged | paged.set |
|---|---|---|---|
| PageNumber | integer | not read | |
| PDFCrop | CropContentVisibleLayers | not read | |
| TransparentBackground | true | not read |
<Link>
| Attribute · Link | Values | Paged | paged.set |
|---|---|---|---|
| LinkResourceURI | ref | read · written | imageUri |
| AssetID | builtin | not read | |
| AssetURL | builtin | not read | |
| CanEmbed | true | written | |
| CanPackage | true | written | |
| CanUnembed | true | written | |
| ExportPolicy | NoAutoExport | written | |
| ImportPolicy | NoAutoImport | written | |
| LinkClassID | integer | written | |
| LinkClientID | integer | written |
LinkResourceURInames the file. InDesign writes an absolutefile:URI with a single slash and percent-encoded spaces:file:/Users/name/Links/photo.psdon a Mac,file:C:/Projects/Links/Logo%20grey.pdfon Windows. A relative URI resolves to nothing in InDesign: the frame keeps its geometry and shows a missing link.StoredStateisNormalfor a linked file andEmbeddedwhen the picture's bytes are inside the document. The surveyed files hold both in roughly equal numbers.LinkResourceFormatnames the file type, in InDesign's own words:$ID/JPEG,$ID/Photoshop,$ID/Portable Network Graphics (PNG),$ID/Adobe Portable Document Format (PDF),$ID/WEBP(with a trailing space).- The rest (
LinkResourceSize,LinkImportTime,LinkClassID,CanEmbed, …) is link management for InDesign's Links panel.
Embedded pictures
An embedded picture keeps its bytes in the graphic element as a typed <Properties> child,
<Contents>, holding the file base64-encoded. The <Link> stays, naming where the file
originally came from, with StoredState="Embedded". A reader should prefer the embedded bytes
when they are present. For an <EPS>, the contents are PostScript, not pixels.
Frame fitting
| Attribute · FrameFittingOption | Values | Paged | paged.set |
|---|---|---|---|
| BottomCrop | integer / real | read | |
| FittingOnEmptyFrame | None | Proportionally | FillProportionally | ContentToFrame | CenterContent | FrameToContent | read | frameFittingType |
| LeftCrop | integer / real | read | |
| RightCrop | integer / real | read | |
| TopCrop | integer / real | read | |
| FittingAlignment | TopLeftPoint | TopCenterPoint | TopRightPoint | CenterLeftPoint | CenterPoint | CenterRightPoint | BottomLeftPoint | BottomCenterPoint | BottomRightPoint | read | frameFittingReferencePoint |
| AutoFit | false | true | read | frameAutoFit |
<FrameFittingOption> on the frame records the fitting the user chose and the crop amounts:
LeftCrop, TopCrop, RightCrop and BottomCrop in points, negative where the picture
extends past the frame; FittingOnEmptyFrame for a picture placed into the frame later
(FillProportionally, Proportionally, FitContentToFrame or None);
FittingAlignment, the reference point; and AutoFit, which re-fits the picture when the
frame is resized. Where the picture sits now is given by the graphic's ItemTransform; the
fitting option is how that position came about.
In Paged: the graphic's transform, its link and its embedded
<Contents>are read; the embedded bytes win over the link. Linked files are found at render time by the host. A frame whose graphic has no transform is filled by the picture, less theFrameFittingOptioncrops. TheActualPpi,EffectivePpiandSpacemetadata are read for display in the editor. Supported · verified Supported · verified
Frequently asked questions
How does an IDML frame point at its image file?
Through the LinkResourceURI of the <Link> inside the graphic element. InDesign writes an
absolute file: URI.
What is GraphicBounds on an <Image>?
The picture's own box: for a raster image, zero to its pixel width and height. The image's
ItemTransform maps that box into the frame.
How can I tell an embedded image from a linked one?
The <Link> says StoredState="Embedded", and the graphic element carries the bytes as
base64 in <Properties><Contents>.
Is it <EPS> or <EPSImage>?
<EPS>. There is no <EPSImage> element.
Why does InDesign show a missing link for my generated file?
Usually because the URI is relative. InDesign resolves only absolute file: URIs; write the
full path, or embed the picture.
Images & graphics
In IDML a picture is always placed inside a frame; the frame crops it, the graphic element places it, and a link names the file that holds the pixels.
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.