hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.02k stars 406 forks source link

Exported PNG has images replaced with black cross-marks #310

Open oliversalzburg opened 2 years ago

oliversalzburg commented 2 years ago

I have the following diagram:

<mxfile host="65bd71144e" pages="2">
    <diagram id="ca1SeDJ3oxLq72VwodAQ" name="Instance Deployment">
        <mxGraphModel dx="394" dy="779" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" background="#ffffff" math="0" shadow="0">
            <root>
                <mxCell id="pfbeJuhWmpejuF4j--AQ-0"/>
                <mxCell id="pfbeJuhWmpejuF4j--AQ-1" parent="pfbeJuhWmpejuF4j--AQ-0"/>
                <mxCell id="pfbeJuhWmpejuF4j--AQ-59" value="gitlab" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn4.iconfinder.com/data/icons/socialcones/508/Gitlab-128.png" parent="pfbeJuhWmpejuF4j--AQ-1" vertex="1">
                    <mxGeometry x="1276" y="406" width="128" height="128" as="geometry"/>
                </mxCell>
            </root>
        </mxGraphModel>
    </diagram>
</mxfile>

When I export it to PNG, instead of the GitLab logo, I get a black X. When I open the same diagram on diagrams.net and export there, the logo will be intact.

Looking at this diagram source code, I can already imagine why this is a problem and how to work around it. I figured I bring it up regardless.

pmunin commented 2 years ago

Confirm.

This happens only while using this vscode extension. If I open created drawio.png file in Draw.io desktop app and just re-save it - it will save it show embedded image correctly in the result file, but not during this extension

tschechniker commented 1 year ago

+1

This happens now with the latest desktop app too

jaimehrubiks commented 1 year ago

+1 I need to copy-paste all the time into the web version just to export any changes. Does anyone have a better solution for this while still using the extension?

jamiejackson commented 9 months ago

I thought I'd try the desktop application today (22.0.0 on Mac) so I just installed it a few minutes ago.

I've got one image in my diagram that has this behavior. Here's the repro case.

bad_export.drawio.remove_this_fake_extension.txt

bad_export drawio

In the meantime, back to the web app for me.

doreilly257 commented 6 months ago

Still happening with desktop app in December

TeaDove commented 2 months ago

Any news?