Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve SVG conversion. #208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eckelmeckel
Copy link
Contributor

Fixes #207.

Improved SVG conversion:

  • Adapted and extended the convert-images.lua script to handle SVG conversions (including *.drawio.svg) with rsvg-convert, which is faster (and better!?) than using draw.io (which sometimes produces garbage: missing and skewed arrows and elements, wrong overlaps, etc.).

  • Added the package librsvg2-bin to the Dockerfile (for the tool rsvg-convert)

  • The string:hassuffix function is no longer case-sensitive.

  • Added support for image types jpeg and webp

  • Minor indentation fix in informative-quote-blocks.lua

* Adjusted and extended the ‘convert-images.lua’ script to handle SVG
conversions (including *.drawio.svg) with 'rsvg-convert', which is
faster (and better) than using drawio (produces garbage sometimes).

* Made the 'string:hassuffix' function case-insensitive, and added
'jpeg' and 'webp' images types.

* Added 'librsvg2-bin' package to Dockerfile (for 'rsvg-convert' tool).

* Minor indentation fix in 'informative-quote-blocks.lua'.

Signed-off-by: Michael Eckel <michael.eckel@sit.fraunhofer.de>
@chrisfenner
Copy link
Member

I'd be fine changing the tool used for converting regular svgs, but drawio svgs are special and should be rendered using drawio to ensure that the final document looks as drawio says it will.

I think drawio supports embedding the drawio metadata into a png, which could be a better experience. I'm planning to experiment with that and see if it works better.

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

Successfully merging this pull request may close these issues.

SVG conversion issues with draw.io
2 participants