drawio: Export generates broken PNG
When I export a drawing on draw.io as PNG, and select “Include a copy of my diagram”, the mxGraphModel data is embedded in the PNG as zTXt chunk. Unfortunately the CRC checksum for this chunk is wrong, which prevents some image libraries from loading the image.
E.g. this happens when I try to load a draw.io via Python’s image library:
from PIL import Image
Image.open('draw-io-broken-image.png')
>>> IOError: cannot identify image file 'draw-io-broken-image.png'
You can also check via ImageMagick:
identify draw-io-broken-image.png
>>> draw-io-broken-image.png PNG 791x141 791x141+0+0 8-bit sRGB 5.15KB 0.000u 0:00.000
>>> identify: zTXt: CRC error `draw-io-broken-image.png' @ warning/png.c/MagickPNGWarningHandler/1656.
This is the image I used for testing:

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 15 (3 by maintainers)
Commits related to this issue
- Fix for bad CRC in PNG exports (issue #97) — committed to simon-edlund/drawio by simon-edlund 5 years ago
I’m changing approach on handling issues. Basically, I want PRs rather than reports. Issues without a PR in A reasonable time will be closed.
We spent some time trying to fix this, we were unable.
@mig281 “I’m not interested in fixing this. If you give me a fix, I’ll merge it in.” is correct. What it sounds like you’re telling me is I should work for free on whatever you deem important. Amazon is a big company, find a developer there to create a PR. To quote https://gist.github.com/richhickey/1563cddea1002958f96e7ba9519972d9:
“As a user of something open source you are not thereby entitled to anything at all. You are not entitled to contribute. You are not entitled to features. You are not entitled to the attention of others. You are not entitled to having value attached to your complaints. You are not entitled to this explanation.”
However, I’m happy to reopen so it’s understood that the issue is pending.