kieler / klighd-vscode

Eclipse Public License 2.0
8 stars 6 forks source link

PNG export option #117

Closed lhstrh closed 1 year ago

lhstrh commented 1 year ago

We've heard from users of the Lingua Franca VS Code extension that they miss the ability to export PNGs (currently, only SVG export is available). Is this something you might consider adding?

NiklasRentzCAU commented 1 year ago

No, we have not yet considered adding native PNG export yet and do not plan on adding it natively in the KLighD-VS Code extension. Contrary to using KLighD with Piccolo2D, KLighD in the VS Code extension does not connect to any native rendering library, but uses SVGs in their core, which will eventually be rendered by the Chromium browser inside VS Code. A native implementation may therefore need an integrated SVG renderer in the extension.

Currently the suggested way to export a PNG is to either take a screenshot of the diagram directly or to use the usual SVG export and rasterize that with an external tool such as Inkscape to PNG.

lhstrh commented 1 year ago

Thanks for answering, @NiklasRentzCAU. That makes sense. SVG is lossless, so it exports in other formats can be derived...