Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to share/enhance blockdiag diagrams #5

Closed
techtonik opened this issue May 13, 2017 · 4 comments
Closed

Make it easier to share/enhance blockdiag diagrams #5

techtonik opened this issue May 13, 2017 · 4 comments

Comments

@techtonik
Copy link

techtonik commented May 13, 2017

Blockdiag is a tool for creating diagrams, and it only allows to save SVG. GitHub and other sites have troubles with rendering SVG images, so it should be specially formatted for GitHub markup, but a more convenient way is to add an option to render as PNG.

https://bitbucket.org/blockdiag/blockdiag_interactive_shell/issues/4/save-as-png

@techtonik
Copy link
Author

See badges/shields#507 for example of embedding and optimizing SVG for GitHub.

Looks like Firefox 57.0 has troubles rendering that, or maybe something changed on GitHub side. Badges below should display logo at the left:

screenshot-2017-11-24 logos cleanup and appveyor by techtonik pull request 812 badges shields

@techtonik
Copy link
Author

Here is how to draw data URL to canvas: https://stackoverflow.com/questions/4773966/drawing-an-image-from-a-data-url-to-a-canvas

Note that if width/height is not set on <svg>element, then Firefox 57.0 renders canvas empty - see http://phrogz.net/SVG/svg_to_png.xhtml

image

A solution could be to copy svg and set them with DOM.

@abitrolly
Copy link
Member

abitrolly commented Apr 27, 2018

Some good tools that can help:

@abitrolly
Copy link
Member

Seems like the problems is solved with these tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants