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

Generate the PNG from SVG programmatically #452

Open
dpordomingo opened this issue Jan 9, 2019 · 1 comment
Open

Generate the PNG from SVG programmatically #452

dpordomingo opened this issue Jan 9, 2019 · 1 comment
Labels
documentation Something related to project documentation feature-idea

Comments

@dpordomingo
Copy link
Contributor

Caused by #447 (comment)

It is needed to decide how to create PNG versions of SVG to be used in docs (because GitBook does not support SVG).

Currently it is done with a screenshot from mermaid view, but it does not scale and can not be integrated in the CI.

@dpordomingo dpordomingo added enhancement New feature or request documentation Something related to project documentation labels Jan 9, 2019
@dpordomingo
Copy link
Contributor Author

alternatives from #447 (comment)

ImageMagick

convert \
    docs/assets/lookout-sdk-seq-diagram.svg
    lookout-sdk-seq-diagram.png

@carlosms said at #447 (comment)

(this way) they look worse, the text typography or kerning makes it harder to read.

There are some other alternatives, that render better PNGs (specially CairoSVG), but we should find the better options to do it.

svgexport

$ svgexport docs/assets/lookout-sdk-seq-diagram.svg \
    docs/assets/lookout-sdk-seq-diagram.png \
    "svg{background:white;}"

Inkscape

$ inkscape -z -e docs/assets/lookout-sdk-seq-diagram.png \
    --export-background white \
    docs/assets/lookout-sdk-seq-diagram.svg

CairoSVG

$ cairosvg -f png --output-width 900 \
    --output docs/assets/lookout-sdk-seq-diagram.png \
    docs/assets/lookout-sdk-seq-diagram.svg

@dpordomingo dpordomingo changed the title Find a way to programmatically generate the PNG from SVG Generate the PNG from SVG programmatically Jan 9, 2019
@dpordomingo dpordomingo added the help needed Further information is requested label Jan 11, 2019
@dpordomingo dpordomingo added feature-idea and removed enhancement New feature or request help needed Further information is requested labels Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Something related to project documentation feature-idea
Projects
None yet
Development

No branches or pull requests

1 participant