Pictures are kept in the Pictures stream, as a run of Office Art
blip records from [MS-ODRAW]. The
picture store in the document lists
them, and a picture shape names one by number.
0xF007OfficeArtFBSE in the document’s picture store: the picture’s offset in the streamone per picturePicturesa sequence of blips, each a record with one picturestream
OfficeArtFBSE
Type 0xF007. recVer 2, and recInstance holds the blip type.
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 8 | 1 | btWin32 | The kind of picture for Windows. |
| 9 | 1 | btMacOS | The kind for the Mac. |
| 10 | 16 | rgbUid | An MD4 digest of the picture. |
| 26 | 2 | tag | A tag. |
| 28 | 4 | size | The size of the blip in the stream. |
| 32 | 4 | cRef | How many shapes use it. |
| 36 | 4 | foDelay | The blip’s offset in the Pictures stream. |
| 40 | 1 | unused1 | |
| 41 | 1 | cbName | The length of the name that follows, in bytes. |
| 42 | 2 | unused2, unused3 | |
| 44 | cbName | nameData | The picture’s name in UTF-16. |
A picture stored inside the FBSE record, after the name, is also allowed. PowerPoint uses the delayed form, in the Pictures stream.
Blips
Every blip is a record. Its type names the image format. Its recInstance says which format it is and how many identifiers it has; the low bit set means two 16-byte identifiers instead of one.
| Type | Format | recInstance (1 or 2 identifiers) |
|---|---|---|
| 0xF01A | EMF | 0x3D4, 0x3D5 |
| 0xF01B | WMF | 0x216, 0x217 |
| 0xF01C | PICT | 0x542, 0x543 |
| 0xF01D, 0xF02A | JPEG (0xF02A CMYK) | 0x46A, 0x46B; 0x6E2, 0x6E3 CMYK |
| 0xF01E | PNG | 0x6E0, 0x6E1 |
| 0xF01F | DIB (a Windows bitmap without a file header) | 0x7A8, 0x7A9 |
| 0xF029 | TIFF | 0x6E4, 0x6E5 |
0rh RecordHeader8 bytes8rgbUid1 an MD4 digest of the picture16 bytesrgbUid2 a second digest, if the low bit of recInstance is set16 bytestag one byte (JPEG, PNG, DIB, TIFF); or the 34-byte metafile header (EMF, WMF, PICT)1 or 34 bytesBLIPFileData the imagethe rest
The metafile header
EMF, WMF and PICT blips have this 34-byte header before their data.
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | cbSize | The size of the metafile once decompressed. |
| 4 | 16 | rcBounds | The bounds of the drawing, a RECT. |
| 20 | 8 | ptSize | The size to show it at, in EMUs. |
| 28 | 4 | cbSave | The size of the data as stored. |
| 32 | 1 | compression | 0x00 DEFLATE; 0xFE not compressed. |
| 33 | 1 | filter | 0xFE. |
Metafile data
With compression 0x00, the data after the header is a zlib stream (RFC 1950) of the
metafile. Inflate it to get cbSize bytes. The result is an EMF or WMF file;
a WMF has no placeable header, so a program that needs one must add it from the
rcBounds and size fields.
PICT is a Macintosh format. The explorer draws EMF and WMF pictures itself, replaying their records, and shows JPEG and PNG as they are; a DIB is converted so it can be shown. PICT and TIFF are listed but not drawn, because browsers cannot show them.
Reference
- [MS-ODRAW] – Microsoft’s specification of Office Art, including the blips