Inkscape.org
Beginners' Questions Is it possible to view linked vector files as bitmaps in inscape (to help performance), but use the original vector file
  1. #1
    joelostblom joelostblom @joelostblom

    I am using inkscape to design figures for academic publications. Specifically, I create plots programmatically outside inkscape and save these as individual svg files ranging from a few hundred KB to 2-3 MB depending on the amount of data points in the figure. I import these plots into inkscape and use the arrange and align tools to design the figure layout.

    My issue is that performance suffers if I embed the svgs to the point where inkscape becomes unusable (I have tried the performance tips mentioned on the inkscape website, including using hidden layers, outline view, and simplifying paths, but performance is still subpar). Inserting a bitmap with a link to the original file is working much better performance-wise and also reduces the svg file size. However, when exporting (via "save a copy") documents with linked files, inkscape uses the bitmap rendition rather than the svg file the link is pointing to, which means that the resolution of the exported file is not as good as it could be and the file size becomes much bigger since I need to use around 400-500 DPI on the bitmaps for reasonable resolution.

    It would be great if there was an option to link a file and use the bitmap rendition to layout object inside inkscape for best performance, and then when exporting to vector formats use the vector files that the links are pointing to for small file sizes and great resolution. Is this currently possible in inkscape and I am just missing how to do it? Or is there an obvious hurdles to why this will not work? Otherwise I might suggest it as a feature request on GitLab.

    Related, is there a way to change the bitmap DPI after importing/linking an svg, or do I need to reimport the file?
     

  2. #2
    Tyler Durden Tyler Durden @TylerDurden
    joelostblom

    Related, is there a way to change the bitmap DPI after importing/linking an svg, or do I need to reimport the file?

    If a bitmap is linked in the active svg file, a lower/higher rez bitmap with the same filename & location can be substituted. Is that what you are asking, or something more complex?

     

    joelostblom

    It would be great if there was an option to link a file and use the bitmap rendition to layout object inside inkscape for best performance, and then when exporting to vector formats use the vector files that the links are pointing to for small file sizes and great resolution. Is this currently possible in inkscape and I am just missing how to do it?

    Seems possible, I would need to try it to see if it can work similar to above.

  3. #3
    Aero Aero @Aero◻️
    *
    joelostblom

    Related, is there a way to change the bitmap DPI after importing/linking an svg

    Yes, in Object properties.

     

    Screenshot 24
  4. #4
    joelostblom joelostblom @joelostblom

    Thanks both for the replies!

    Aero

    Yes, in Object properties.

    Great, thank you @Aero I missed that somehow. This gives me hope I have also missed a way to achieve the rest of my question! Do you know if there it is possible to change in batch somehow? When I select multiple linked svgs/images, the Object properties are all greyed out.

    TylerDurden

    If a bitmap is linked in the active svg file, a lower/higher rez bitmap with the same filename & location can be substituted. Is that what you are asking, or something more complex?

    @TylerDurden I was referring to what Aero mentioned above.

    TylerDurden

    Seems possible, I would need to try it to see if it can work similar to above.

    Encouraging, this would be really great! Let me know what you find!

  5. #5
    joelostblom joelostblom @joelostblom
    *
    joelostblom

    Do you know if there it is possible to change in batch somehow? When I select multiple linked svgs/images, the Object properties are all greyed out.

    For this I figured out that I can just use a text-editor to search and replace in the svg file, which works great.

    For my main question, I want to add that I would also be interested in a programmatic solution. For example, I could imagine a script that parses the svg file and replaces each <image> tag with the embed content of the svg file it links to. Then I could use make to automate the parsing of the svgs when exporting. I would still very much appreciate if there was a simpler solution, like enabling a command like flag when exporting, something like inkscape --embed-linked-files --export-type=pdf myfile.svg.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Is it possible to view linked vector files as bitmaps in inscape (to help performance), but use the original vector file