小编Nik*_*iuk的帖子

将 draw.io 图渲染为 png

我正在尝试渲染draw.io保存的 (SaveAs->Device) .xml 图表。

使用作为输入示例的保存图:

<mxGraphModel dx="1426" dy="720" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" background="#ffffff" math="0" shadow="0">
  <root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <mxCell id="2" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="180" y="200" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
      <mxGeometry x="360" y="180" width="80" height="80" as="geometry"/>
    </mxCell>
    <mxCell id="4" value="" style="endArrow=classic;html=1;exitX=0.025;exitY=0.638;exitPerimeter=0;" edge="1" parent="1" source="3" target="2">
      <mxGeometry width="50" height="50" relative="1" as="geometry">
        <mxPoint x="180" y="430" as="sourcePoint"/>
        <mxPoint x="230" y="380" as="targetPoint"/>
      </mxGeometry>
    </mxCell>
  </root> …
Run Code Online (Sandbox Code Playgroud)

javascript c# rendering mxgraph draw.io

6
推荐指数
1
解决办法
2797
查看次数

如何在 Python 3 中将 QImage(QPixmap) 转换为 PIL Image?

我想将图像从 QImage 或 Qpixmap 类转换为 PIL Image。我发现了这个:Convert PyQt to PIL image

但它似乎在 Python3 中不起作用。是否存在将其实现到 Pyhton3 或更简单地使用新方法的方法?

python pyqt pyqt4 python-imaging-library pyqt5

2
推荐指数
1
解决办法
3454
查看次数