How does <pic:pic><pic:blipFill><a:srcRect... work?

J

Jialiang Ge [MSFT]

Hello Dave,

From your post, my understanding on this issue is: you want to know the
meaning of "bounding box" and how the nodes such as <p:blipFill> work. If
I'm off base, please feel free to let me know.

The bounding box is represented by specifying an offset in x and y
(attributes x and y of a:eek:ff) and extents in x and y (attributes cx and cy
of a:ext, both of which must be greater than or equal to zero). The upper
left corner of the bounding box is located at the offset, and the lower
right corner of the bounding box is located at the offset plus extent. It
is an invisible box defining the edges of an item.
For instance, the following code defines a bounding box, whose width is
1200000emu, height is 1000000, at the position (3200400, 1600200).
<p:sp>
<p:spPr>
<a:xfrm>
<a:eek:ff x="3200400" y="1600200"/>
<a:ext cx="1200000" cy="1000000"/>
</a:xfrm>
</p:spPr>
</p:sp>

The nodes, such as <p:blipFill> are relative to its bounding box. They use
percentage-based position coordinates.

Please let me know if you have any other concerns, or need anything else.

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

That's how I read the spec too. But it is giving the wrong values. Here is
what I have. I inserted a picture that is 1.56" x 1.56" and set it to crop
L:0.1", R:0.3", T:0.2", B:0.4" and my document.xml has:

<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0">
<wp:extent cx="1060450" cy="881456"/>
<wp:effectExtent l="19050" t="0" r="6350" b="0"/>
<wp:docPr id="1" name="Picture 0" descr="bear.jpg"/>
<wp:cNvGraphicFramePr>
<a:graphicFrameLocks
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
noChangeAspect="1"/>
</wp:cNvGraphicFramePr>
<a:graphic
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData
uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic
xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="0" name="bear.jpg"/>
<pic:cNvPicPr/>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId4"/>
<a:srcRect l="6400" t="12800" r="19200" b="25600"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm>
<a:eek:ff x="0" y="0"/>
<a:ext cx="1060450" cy="881456"/>
</a:xfrm>

The srcRect values appear to be percentages of the original size of the
image, not of the final size.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,

Thank you for your patience. Based on my research, the percentages are
based on the actual blip dimensions (the original picture size). That
portion of the blip is then used to fill the bounding box of the shape
based on the EG_FillModeProperties. Hope it helps.

Please let me know if you have any other concerns, or need anything else.
Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top