Share via


ImageData Class

Defines the ImageData Class.When the object is serialized out as xml, its qualified name is v:imagedata.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Vml.ImageData

Namespace:  DocumentFormat.OpenXml.Vml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class ImageData _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As ImageData
public class ImageData : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

14.1.2.11 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 (§14.1.2.10), the imagedata element shall 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>

DocumentFormat.OpenXml.Vml.ImageData-image001

end example]

Parent Elements

arc (§14.1.2.1); background (Part 1, §17.2.1); curve (§14.1.2.3); group (§14.1.2.7); image (§14.1.2.10); line (§14.1.2.12); object (Part 1, §17.3.3.19); oval (§14.1.2.13); pict (§9.2.2.2); pict (§9.5.1); polyline (§14.1.2.15); rect (§14.1.2.16); roundrect (§14.1.2.17); shape (§14.1.2.19); shapetype (§14.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 W3C 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>
DocumentFormat.OpenXml.Vml.ImageData-image002

end example]

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

blacklevel (Image Brightness)

Specifies the image brightness. Default is 0.

[Example:

<v:image … blacklevel="0.1" …>
</v:image>
DocumentFormat.OpenXml.Vml.ImageData-image003

end example]

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

chromakey (Image Transparency Color)

Specifies a color value that is 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 (§15.1.2.3).

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 can 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>
DocumentFormat.OpenXml.Vml.ImageData-image004

end example]

The possible values for this attribute are defined by the W3C 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 can 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>
DocumentFormat.OpenXml.Vml.ImageData-image005

end example]

The possible values for this attribute are defined by the W3C 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 can also be specified in 1/65536-ths if a trailing "f" is supplied. [Example: For example, a value of "52429f" represents 52429/65536 or 0.8. end example]

[Example:

<v:image … cropright="10%" …>
</v:image>
DocumentFormat.OpenXml.Vml.ImageData-image005

end example]

The possible values for this attribute are defined by the W3C 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 can also be specified in 1/65536-ths if a trailing "f" is supplied. [Example: For example, a value of "52429f" represents 52429/65536 or 0.8. end example]

[Example:

<v:image … croptop="10%" …>
</v:image>
DocumentFormat.OpenXml.Vml.ImageData-image005

end example]

The possible values for this attribute are defined by the W3C 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 (§15.1.2.5).

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 (§15.1.2.3).

gain (Image Intensity)

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

[Example:

<v:image … gain="0.5" …>
</v:image>
DocumentFormat.OpenXml.Vml.ImageData-image006

end example]

The possible values for this attribute are defined by the W3C 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>
DocumentFormat.OpenXml.Vml.ImageData-image007

end example]

The possible values for this attribute are defined by the W3C 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>
DocumentFormat.OpenXml.Vml.ImageData-image008

end example]

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

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 https://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 (Part 1, §22.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 W3C 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 https://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 (Part 1, §22.8.2.1).

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 W3C XML Schema string datatype.

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 W3C 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 W3C 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 https://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 (Part 1, §22.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>
DocumentFormat.OpenXml.Vml.ImageData-image009DocumentFormat.OpenXml.Vml.ImageData-image010

end example]

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

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 https://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 (Part 1, §22.8.2.1).

src (Image Source)

Specifies the URL of the image to use.

[Example:

<v:image … src="myimage.gif" …>
</v:image>
DocumentFormat.OpenXml.Vml.ImageData-image011

end example]

The possible values for this attribute are defined by the W3C 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 W3C XML Schema string datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_ImageData) is located in §A.6.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ImageData Members

DocumentFormat.OpenXml.Vml Namespace