简体   繁体   English

Word 2007 xml图像信息

[英]Word 2007 xml image information

I want to know the elements which store information regarding an image in a Word 2007 xml file. 我想知道在Word 2007 xml文件中存储有关图像信息的元素。 (such as height, width, visibility, etc.). (例如高度,宽度,可见性等)。 In Word 2003 xml I could find it is shown as follows within v : shape tag. 在Word 2003 xml中,我可以在v:shape标记中找到它,如下所示。

<v:shape id="Picture 0" o:spid="_x0000_i1025" type="#_x0000_t75" alt="31.jpg" style="width:2in;height:95.85pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="wordml://02000001.jpg" o:title="31"/>
</v:shape>

I couldn't find something similar in Word 2007 xml. 我在Word 2007 xml中找不到类似的内容。 Can someone tell me where I can find that? 有人可以告诉我在哪里可以找到吗?

The image size is stored where the graphic is being used (as you can use the same graphic multiple times at different sizes), in the a:graphic tag in line to where the image is being used. 图像大小存储在使用图形的位置(因为您可以多次使用同一图形以不同的大小),存储在与图像使用位置一致的a:graphic标签中。 Instead of the data being here, like earlier, this now points to a relationship ID. 现在,它不再像以前那样在这里指向数据,而是指向一个关系ID。

The list of relationships are in the top of the file, one of them you find will have a type of 'image'. 关系列表在文件的顶部,您会发现其中一种具有“图像”类型。 The attributes of the Relationship will be the name of the target (such as media/image1.jpeg). 关系的属性将是目标的名称(例如media / image1.jpeg)。 This is a link to the binary of your image, and will be located later on in a pkg:part/pkg:binaryData element. 这是图像二进制文件的链接,稍后将在pkg:part / pkg:binaryData元素中找到。

It looks a bit like this: 它看起来像这样:

<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
  <Relationship Id="rId8" Target="media/image1.jpeg" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" />
  .. other relationships
</Relationships>
.. lots more document

<pkg:part pkg:name="/word/media/image1.jpeg" pkg:contentType="image/jpeg"  pkg:compression="store">
    <pkg:binaryData>/9j/7QAsUGhvdG9zaG9wIDMuMAA....blah
</pkg:part>
.. lots more document

<w:drawing>
 <wp:inline distT="0" distB="0" distL="0" distR="0">
   <wp:extent cx="2266950" cy="1543050"/>
    <wp:effectExtent l="19050" t="0" r="0" b="0"/>
    <wp:cNvGraphicFramePr>
    <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
     <pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
       <a:blip r:embed="rId8" cstate="print"/>
       <a:ext cx="2266950" cy="1543050"/>
       .. lots more document

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM