[Table of Contents] [docx version]

VML Reference Material - VML

imagedata (Image Data)

This element is used to draw an image that has been loaded from an external source. There is an implied rectangle that is the same size as the image. Any stroke or fill is applied to this implied rectangle.  The stroke is drawn on top of the image.  The fill is behind the image and therefore only visible through transparent areas of the image. Image transparency is either encoded in the file or defined via a color value using the chromakey attribute. Unlike the image element (§6.1.2.10), the imagedata element must have a parent element.

[Example:

<v:shape style="position:relative;top:1;left:1;width:50;height:50"

path="m 0,0 l 1000,0 1000,1000 0,1000 x e" fillcolor="blue">

<v:imagedata src="myimage.gif"/>

</v:shape>

end example]

Parent Elements

arc6.1.2.1); background2.2.1); curve6.1.2.3); group6.1.2.7); image6.1.2.10); line6.1.2.12); object2.3.3.19); oval6.1.2.13); pict2.3.3.21); pict2.9.23); polyline6.1.2.15); rect6.1.2.16); roundrect6.1.2.17); shape6.1.2.19); shapetype6.1.2.20)

 

Attributes

Description

althref (Alternate Image Reference)

 

Namespace: urn:schemas-microsoft-com:office:office

Defines an alternate reference for an image in Macintosh PICT format.

 

[Example:

 

<v:imagedata ... althref="myimage.pcz" ... >

</v:imagedata>

 

end example

 

The possible values for this attribute are defined by the XML Schema string datatype.

bilevel (Image Bilevel Toggle)

Specifies that all colors in the picture shall be converted to either 0 or full intensity component values. This converts a color bitmap to 8 colors and a grayscale bitmap to black and white. Default is false.

 

[Example:

 

<v:image ... bilevel="true" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.1.3.14).

blacklevel (Image Brightness)

Specifies the image brightness. Default is 0.

 

[Example:

 

<v:image ... blacklevel="0.1" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

chromakey (Image Transparency Color)

Specifies a color value that will be transparent and show anything behind the shape. Default is no value.

 

[Example:

 

<v:image ... chromakey="white" ...>

</v:image>

 

end example]

 

The possible values for this attribute are defined by the ST_ColorType simple type (§6.1.3.1).

cropbottom (Image Bottom Crop)

Specifies the how much to crop the image from the bottom up as a fraction of picture size. Default is 0. This numeric value may also be specified in 1/65536-ths if a trailing "f" is supplied. For example, a value of "52429f" represents 52429/65536 or 0.8.

 

[Example:

 

<v:image ... cropbottom="10%" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

cropleft (Image Left Crop)

Specifies how much to crop the image from the left in as a fraction of picture size. Default is 0. This numeric value may also be specified in 1/65536-ths if a trailing "f" is supplied. For example, a value of "52429f" represents 52429/65536 or 0.8.

 

[Example:

 

<v:image ... cropleft="10%" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

cropright (Image Right Crop)

Specifies how much to crop the image from the right in as a fraction of picture size. Default is 0. This numeric value may also be specified in 1/65536-ths if a trailing "f" is supplied. For example, a value of "52429f" represents 52429/65536 or 0.8.

 

[Example:

 

<v:image ... cropright="10%" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

croptop (Image Top Crop)

Specifies how much to crop the image from the top down as a fraction of picture size. Default is 0. This numeric value may also be specified in 1/65536-ths if a trailing "f" is supplied. For example, a value of "52429f" represents 52429/65536 or 0.8.

 

[Example:

 

<v:image ... croptop="10%" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

detectmouseclick (Detect Mouse Click)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies whether a mouse click is detected on the fill of a shape.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

embosscolor (Embossed Color)

Specifies the color to use to create an embossed effect in the image. Default is no value. This can be set to a percentage of the shadow color to create an embossed picture effect.

 

The possible values for this attribute are defined by the ST_ColorType simple type (§6.1.3.1).

gain (Image Intensity)

Specifies an adjustment for the intensity of all colors. Essentially sets how bright white will be. Default is 1.

 

[Example:

 

<v:image ... gain="0.5" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

gamma (Image Gamma Correction)

Specifies the gamma correction. Default is 1.

 

Gamma correction is a factor by which the intended target display gamma differs from the sRGB profile. It can be used to correct for images not prepared for sRGB displays and to adjust overall image contrast.  Decreasing it below 1 gives a higher contrast image.

 

[Example:

 

<v:image ... gamma="0.5" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

grayscale (Image Grayscale Toggle)

Specifies to display the image in grayscale. Default is false.

 

[Example:

 

<v:image ... gamma="0.5" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.1.3.14).

href (Explicit Relationship to Hyperlink Target)

 

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID of the relationship to the hyperlink used for this VML object. The specified relationship shall be of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/image or the document shall be considered non-conformant.

 

[Example: The markup specifies the associated relationship part with relationship ID rId10 contains the corresponding relationship information for the image data:

 

< ... r:href="rId5" />

 

end example]

 

The possible values for this attribute are defined by the ST_RelationshipId simple type (§7.8.2.1).

href (Original Image Reference)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies the URL to the original image file. Used only if the picture has been linked and embedded. Default is no value.

 

[Example:

 

<v:fill ... o:href="myimage.gif" ... >

</v:fill>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

id (Unique Identifier)

Specifies a unique identifier that can be used to reference a VML object.

 

Default is no value.

 

[Example:

 

<v:shape ... id="myShape" ... >

</v:shape>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

id (Explicit Relationship to Image Data)

 

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID of the relationship to the image used for this VML object. The specified relationship shall be of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/image or the document shall be considered non-conformant.

 

[Example: The markup specifies the associated relationship part with relationship ID rId10 contains the corresponding relationship information for the image data:

 

< ... r:id="rId10" />

 

end example]

 

The possible values for this attribute are defined by the ST_RelationshipId simple type (§7.8.2.1).

movie (Movie Reference)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies a pointer to a movie image. This is a data block that contains a pointer to a pointer to movie data.

 

[Example:

 

<v:imagedata ... o:movie="1434" ...>

</v:imagedata>

 

end example]

 

The possible values for this attribute are defined by the XML Schema float datatype.

oleid (Image Embedded Object ID)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies the embedded object ID of an image.

 

The possible values for this attribute are defined by the XML Schema float datatype.

pict (Explicit Relationship to Alternate Image Data)

 

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID of the relationship to an alternate format image used for this VML object. The specified relationship shall be of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/image or the document shall be considered non-conformant.

 

If this attribute is specified, the application should attempt to display the image defined by the relationship. If the application cannot display the format of that image, the r:id attribute is used.

 

[Example: The markup specifies the associated relationship part with relationship ID rId7 contains the corresponding relationship information for the image data. The relationship part with relationship ID rId10 is used if the application cannot display the image referenced by rId7.:

 

< ... r:id="rId10" r:pict="rId7"/>

 

end example]

 

The possible values for this attribute are defined by the ST_RelationshipId simple type (§7.8.2.1).

recolortarget (Black Recoloring Color)

Specifies the color to which black should be recolored.

 

[Example:

 

<v:imagedata r:id="rId4" recolortarget="red">

</v:imagedata>

 

no recolor

recolortarget="red"

 

end example]

 

The possible values for this attribute are defined by the ST_ColorType simple type (§6.1.3.1).

relid (Relationship to Part)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies the relationship ID of the relationship to the image. The specified relationship shall be of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/image or the document shall be considered non-conformant.

 

[Example: The markup specifies the associated relationship part with relationship ID rId10 contains the corresponding relationship information:

 

<v:imagedata ... o:relid="rId10" ...>

</v:imagedata>

 

end example]

 

The possible values for this attribute are defined by the ST_RelationshipId simple type (§6.2.3.20).

src (Image Source)

Specifies the URL of the image to use.

 

[Example:

 

<v:image ... src="myimage.gif" ...>

</v:image>

 

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

title (Image Data Title)

 

Namespace: urn:schemas-microsoft-com:office:office

Specifies the title of an embedded image. This is typically set to the comment property of the image, which is often blank.

 

[Example:

 

<v:fill ... o:title="alt text" ... >

</v:fill>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_ImageData">

   <attributeGroup ref="AG_Id"/>

   <attributeGroup ref="AG_ImageAttributes"/>

   <attributeGroup ref="AG_Chromakey"/>

   <attribute name="embosscolor" type="ST_ColorType" use="optional"/>

   <attribute name="recolortarget" type="ST_ColorType"/>

   <attribute ref="o:href"/>

   <attribute ref="o:althref"/>

   <attribute ref="o:title"/>

   <attribute ref="o:oleid"/>

   <attribute ref="o:detectmouseclick"/>

   <attribute ref="o:movie"/>

   <attribute ref="o:relid"/>

   <attribute ref="r:id"/>

   <attribute ref="r:pict"/>

   <attribute ref="r:href"/>

</complexType>