question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export generates broken PNG

See original GitHub issue

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:

draw-io-broken-image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
davidjgraphcommented, Jan 20, 2018

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.

1reaction
davidjgraphcommented, Jul 23, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exporting to png creates corrupted png file. – Adobe Illustrator
I'm having an issue with corrupted png files that were exported from Illustrator. If I export from photoshop, it's fine.
Read more >
Cannot Quick Export as PNG in Photoshop CC
You can test this by click the Enter or Esc key after clicking on Quick Export as PNG. Enter will execute the save...
Read more >
adobe photoshop - PNG image from PSD seems to be broken
While you can probably get a much better export than that, I highly recommend just asking for the original source for that logo...
Read more >
PNG export is blank when document is large - Inkscape - GitLab
What should have happened? PNG export results in image from drawing. ... Large PNG exports seem to create corrupted PNGs. inbox #3783.
Read more >
[Help] Not able to export any files as PNG : r/Inkscape - Reddit
Hi, try exporting PNG, then in the right bottom corner check the folder and choose where to save and then click export, that's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found