Skip to content

ope=changepic does not replace SVG, only the preview-bitmap #16

Open
@jorismak

Description

@jorismak

No clue, if this is the right place to mention issues, but here goes.

If I make an empty powerpoint, and I insert an image with SVG file as source, Powerpoint creates a bitmap-preview of that SVG and gives both resources for the same picture.

OpenTBS then replaces the 'main' image (the bitmap preview), but not the 'svg extra data'. When opening the presentation, you'll see the original SVG file because that data is untouched and used by office.

Original image in the input-powerpoint:

            <p:pic>
                <p:nvPicPr>
                    <p:cNvPr id="5" name="Graphic 4" descr="[flag;ope=changepic;tagpos=inside;]">
                        <a:extLst>
                            <a:ext uri="{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}">
                                <a16:creationId xmlns:a16="http://schemas.microsoft.com/office/drawing/2014/main" id="{C57ABE97-03D1-4C1A-87CD-E9EAF41007A4}" />
                            </a:ext>
                        </a:extLst>
                    </p:cNvPr>
                    <p:cNvPicPr>
                        <a:picLocks noChangeAspect="1" />
                    </p:cNvPicPr>
                    <p:nvPr />
                </p:nvPicPr>
                <p:blipFill>
                    <a:blip r:embed="rId2">
                        <a:extLst>
                            <a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
                                <a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0" />
                            </a:ext>
                            <a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}">
                                <asvg:svgBlip xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main" r:embed="rId3" />
                            </a:ext>
                        </a:extLst>
                    </a:blip>
                    <a:stretch>
                        <a:fillRect />
                    </a:stretch>
                </p:blipFill>
                <p:spPr>
                    <a:xfrm>
                        <a:off x="1809750" y="571500" />
                        <a:ext cx="8572500" cy="5715000" />
                    </a:xfrm>
                    <a:prstGeom prst="rect">
                        <a:avLst />
                    </a:prstGeom>
                </p:spPr>
            </p:pic>

And the output of that picture after OpenTBS:

            <p:pic>
                <p:nvPicPr>
                    <p:cNvPr id="5" name="Graphic 4" descr="">
                        <a:extLst>
                            <a:ext uri="{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}">
                                <a16:creationId xmlns:a16="http://schemas.microsoft.com/office/drawing/2014/main" id="{C57ABE97-03D1-4C1A-87CD-E9EAF41007A4}" />
                            </a:ext>
                        </a:extLst>
                    </p:cNvPr>
                    <p:cNvPicPr>
                        <a:picLocks noChangeAspect="1" />
                    </p:cNvPicPr>
                    <p:nvPr />
                </p:nvPicPr>
                <p:blipFill>
                    <a:blip r:embed="opentbs1">
                        <a:extLst>
                            <a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
                                <a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0" />
                            </a:ext>
                            <a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}">
                                <asvg:svgBlip xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main" r:embed="rId3" />
                            </a:ext>
                        </a:extLst>
                    </a:blip>
                    <a:stretch>
                        <a:fillRect />
                    </a:stretch>
                </p:blipFill>
                <p:spPr>
                    <a:xfrm>
                        <a:off x="1809750" y="571500" />
                        <a:ext cx="8572500" cy="5715000" />
                    </a:xfrm>
                    <a:prstGeom prst="rect">
                        <a:avLst />
                    </a:prstGeom>
                </p:spPr>
            </p:pic>

You'll notice that OpenTBS replaced the first reference, on the a:blip tag (the r:embed property is changed to the new picture).

But inside that tag, there is a asvg:svgBlip tag which still points to the same resource as before (r:embed="rId3").
If I edit that file to change the 2nd reference also to r:embed="opentbs1" , the edit actually works!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions