For drawing, does it make sense to embed the underlay?
On drawing export, currently a svg like ELEVATION_-_EAST.svg
will reference in an underlay like ELEVATION_-_EAST-underlay.png
Are there any drawbacks to just embed ELEVATION_-_EAST-underlay.png
into ELEVATION_-_EAST.svg
directly? That is, instead of linking, as it currently done?
The reason I ask, is that if the underlays were embedded, it would make it easier to share the svg with someone, verses having to share the svg, and the linked png.
Comments
Not sure in the particular context of Bonsai, but one general aspect to have in mind is that one will probably end up having a somewhat larger overall file size compared to a separate image.
Storing the binary image encoded in Base64 is less efficient. From my limited testing may end up taking roughly 130% of the storage space of the independent image file.
Not that it is very significant in this day and age, but the resulting SVG files may be slower to open or edit in editors like Inkscape, because of the increased file, and the overhead of decoding the embedded image.
Thanks @duarteframos for your perspective!
...
On another note, it seems if we embed everything, we wouldn't have to deal with rasterized pdf's
https://gitlab.com/inkscape/inbox/-/issues/2103
Or maybe there's a work around for this now.
Ryan, I have embedded hundreds of pngs in a single .svg without any issues. I have done a lot of collage art in this manner, applying clipping masks to PNG images in inkscape.. I have never had an issue with loading or navigating these files on a modern (to me that is a 5-6 year old ) machine. Importing traced/ converted vectors in Inkscape is where svg boggs down the most in my experience. if say I imported a pdf sheet from a structural set and the stroke of the vectors is traced during import.. it creates a ton of nodes. Embedded PNGs work great in my experience & I agree with duarteframos, the file size increase is inconsequential in today's world.