FAQ n.136269

How to find and extract the images embedded in the OOXML flat file?

Answer

Automated approach

In the EASA XML export files, images (binary files) are stored in a Base64 ASCII string encoded format, following OpenXML standards. When programmatically accessing the file, Base64 is simple to convert back to binary, e.g.: 
automated

But how do you locate the data? An example:
Here is a screenshot of a sample eRules XML export, opened in Word:
sample

And here is the XML, in pkg:part pkg:name="/word/document.xml":
package
The “rId18” value in the <a:blip> element refers to this relation in pkg:part pkg:name="/word/_rels/document.xml.rels":
rId18
And this finally gives you the location of the Base64 encoded data:
finally

Manual approach

For a very simple manual approach:

  1. Open the XML-file in Word
  2. Select the image you want to extract
  3. RightClick the image and select “Save as picture”:

manual

 

Last updated
28/06/2022

Was this helpful?