Pictures and shapes sit inside runs. Modern ones are w:drawing elements in
DrawingML; older ones are w:pict in VML, which files keep alongside DrawingML
for compatibility. The picture’s bytes are a part of their own, usually in
word/media/, reached by a relationship.
A picture in DrawingML
<w:r>
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0">
<wp:extent cx="1828800" cy="1371600"/>
<wp:docPr id="1" name="Picture 1" descr="A chart of sales"/>
<a:graphic>
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic>
<pic:nvPicPr>
<pic:cNvPr id="0" name="image1.png"/>
<pic:cNvPicPr/>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId4"/>
<a:stretch><a:fillRect/></a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm><a:off x="0" y="0"/><a:ext cx="1828800" cy="1371600"/></a:xfrm>
<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>
</pic:spPr>
</pic:pic>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
</w:r>
| Element | Meaning |
|---|---|
wp:inline | The picture sits in the line of text, like a large character. |
wp:anchor | The picture floats, placed relative to the page, margin or paragraph: wp:positionH, wp:positionV, wrapping elements, behindDoc. |
wp:extent | The size: cx and cy in EMU, 914,400 to the inch. |
wp:docPr | Identity and alternative text: name, descr, title. |
a:blip | The image: r:embed for a part in the package, r:link for an external file. |
Common image parts are PNG, JPEG, GIF, TIFF and BMP. Word also writes EMF and WMF
pictures, and SVG with a PNG beside it as an extension of the blip. An r:link points outside
the file, and the viewer on this site never loads it.
VML
VML is the older drawing language, in the namespaces with prefixes v and
o. It appears in older documents, and in the fallback of
mc:AlternateContent.
<w:pict>
<v:shape style="width:144pt;height:108pt" type="#_x0000_t75">
<v:imagedata r:id="rId5" o:title="Picture"/>
</v:shape>
</w:pict>
Shapes, text boxes and charts
Word 2010 and later shapes use wps:wsp inside w:drawing, and
are usually in the Choice of an mc:AlternateContent with VML in the
Fallback. A text box holds w:txbxContent, whose children are ordinary
block-level content: paragraphs and tables. A chart has a
c:chart element whose relationship points to a chart part, normally in
word/charts/, which has an embedded workbook of its data. SmartArt uses
dgm:relIds and several diagram parts.
Embedded objects
w:object holds a preview picture in VML and an o:OLEObject
element whose ProgID names the program and whose r:id points to
the data, usually a part in word/embeddings/. Embedded Office documents are
whole files of their own: a .xlsx or .docx inside the package.
A .bin part holds other OLE objects.