sverweij / mscgen_js

text => sequence charts
https://mscgen.js.org
GNU General Public License v3.0
206 stars 25 forks source link

Exporting a graph with 2000+ signal to png fails #248

Closed Matjaz-B closed 7 years ago

Matjaz-B commented 7 years ago

Expected Behavior

Be able to export graph to PNG.

Current Behavior

Steps to Reproduce (for bugs)

  1. Open https://www.dropbox.com/s/a7oric0l7x55g8j/error_producer.msc?dl=1 (little less than 3000 signals)
  2. The preview will be shown and it will be correct (on online interpreter, and in atom)
  3. Export to SVG will work
  4. Export to PNG will fail

Context

I'm trying to generate a graph of actual communication between two nodes.

Your Environment

sverweij commented 7 years ago

Alternatives in the mean time:

Matjaz-B commented 7 years ago

Hello sverweij,

Thanks for quick response. I also think that issue must lie in some limits of export.

Currently this is more of annoyance to me, but not a problem - as SVG export works fine.

sverweij commented 7 years ago

The root cause is indeed restrictions on the canvas element in various browsers.

Next steps:

References:

sverweij commented 7 years ago

@Matjaz-B thanks for raising this issue! It's making mscgen_js a better product.

Matjaz-B commented 7 years ago

Great. I also think that your fix is sufficient.

I've been playing around with some SVG to PNG (or other bitmap formats) and none of them seems to work correctly. Some of them cannot generate bitmap image at all. SVG format is sufficiently supported and it makes sense to use it.

Thanks for fast analysis and fix.