image.md 3.1 KB


source: https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/image/

downloaded: 2026-01-30T08:42:00.553Z

The element | MusicXML 4.0

MusicXML 4.0 >

MusicXML reference >
Elements >
image

The element

Parent element:

    <direction-type>

The element is used to include graphical images in a score.

Content

Always empty.

Attributes

Examples

This element is used in the following examples:

,

Name Type Required? Description
source anyURI Yes The URL for the image file.
type token Yes The MIME type for the image file format. Typical choices include application/postscript, image/gif, image/jpeg, image/png, and image/tiff.
default-x tenths No Changes the computation of the default horizontal position. The origin is changed relative to the left-hand side of the note or the musical position within the bar. Positive x is right and negative x is left.This attribute provides higher-resolution positioning data than the element. Applications reading a MusicXML file that can understand both features should generally rely on this attribute for its greater accuracy.
default-y tenths No Changes the computation of the default vertical position. The origin is changed relative to the top line of the staff. Positive y is up and negative y is down.This attribute provides higher-resolution positioning data than the placement attribute. Applications reading a MusicXML file that can understand both attributes should generally rely on this attribute for its greater accuracy.
halign left-center-right No Indicates horizontal alignment to the left, center, or right of the image. Default is implementation-dependent.
height tenths No Used to size and scale an image. The image should be scaled independently in X and Y if both height and width are specified. If only height is specified, the image should be scaled proportionally to fit in the specified Y dimension.
id ID No Specifies an ID that is unique to the entire document.
relative-x tenths No Changes the horizontal position relative to the default position, either as computed by the individual program, or as overridden by the default-x attribute. Positive x is right and negative x is left. It should be interpreted in the context of the element or directive attribute if those are present.
relative-y tenths No Changes the vertical position relative to the default position, either as computed by the individual program, or as overridden by the default-y attribute. Positive y is up and negative y is down. It should be interpreted in the context of the placement attribute if that is present.
valign valign-image No Indicates vertical alignment to the top, middle, or bottom of the image. The default is implementation-dependent.
width tenths No Used to size and scale an image. The image should be scaled independently in X and Y if both height and width are specified. If only width is specified, the image should be scaled proportionally to fit in the specified X dimension.