Don't rasterize linked SVG with <image>

Bug #171795 reported by Mleplatre
90
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Wishlist
Unassigned

Bug Description

SVG images linked in the document with the <image> tag are rasterized,
which is annoying for PDF export.

Including the following tag in the document :
<image xlink:href="file.svg"/>
will rasterize file.svg, and thus make the exported PDF extremely huge.

It would be very nice to "virtually" embed this file.svg before exporting
to PDF, so that everything remains vectorial.

Thanks guyz !

Revision history for this message
Horkana-users (horkana-users) wrote :

Originator: NO

cool, didn't realise support for importing SVG files using image tags had
been (sort of) fixed already
[ 1573020 ] Use the <image> tag to import another SVG file
https://sourceforge.net/tracker/index.php?func=detail&aid=1573020&group_id=93438&atid=604309

Revision history for this message
Tom Davidson (tjd-mit) wrote :

the bug Horkana refers to above is now at bug 171544 in launchpad.

Revision history for this message
Tom Davidson (tjd-mit) wrote :

As a side note, the rasterization seems to be at 90dpi of the *source* svg (i.e. the file that is being imported).

Tom Davidson (tjd-mit)
Changed in inkscape:
importance: Medium → Wishlist
status: New → Confirmed
su_v (suv-lp)
tags: added: svg
Revision history for this message
su_v (suv-lp) wrote :

As far as I can tell, Inkscape (stable and trunk) does not use its internal renderer for the content of an <image> tag linking to an SVG file, but librsvg:

For a test, create a small file with a short flowed text, and link it in a second file via <image> tag: the flowed text will be rendered as black box (because it is an unsupported feature in any other SVG renderer except Inkscape).

Related reports:
Bug #168244 “[win32] image tag does not find SVG source”:
<https://bugs.launchpad.net/inkscape/+bug/168244>
Bug #461842 “Image filter effect using path has low resolution”:
<https://bugs.launchpad.net/inkscape/+bug/461842>

Revision history for this message
Brylie Christopher Oxley (brylie) wrote :

This appears to be added in Inkscape 0.48. E.g. I was able to import an Inkscape SVG into another document and edit the SVG sub-elements separately.

Revision history for this message
gpothier (gpothier) wrote :

Brylie: what you did was importing the document, not linking it: in your case the contents of an svg file is embedded in another).
The problem is not fixed in 0.48.

su_v (suv-lp)
tags: removed: import-export
Revision history for this message
Andres Gomez (Tanty) (tanty) wrote :

This is happening with any way of using another SVG document from the main SVG document.

For example, consider this example:
https://rawgit.com/tanty/design-hodgepodge/master/svg/filter/igalia-feblend-feimage-explicit.svg

On it, we define another embedded SVG document in the "defs" part of the main document to use as graphic source for a filter.

Opening with Inkscape we can see how the embedded SVG has been rasterized :(

Revision history for this message
William Cain (billctrcain) wrote :

This bug is marked as a duplicate of bug #168244. This problem is still happening, and is a big problem for me (Trying to link to an external svg file causes the message in Inkscape "Link not found") - is there any new info I could provide to get work started to fix this. I am using Inkscape ver 0.92 on a windows 7 machine.

Revision history for this message
Hachmann (marenhachmann) wrote :

When I tried it just now, in Inkscape master, I got no error message, but it embedded a masked raster version with a black background instead of transparency (hence the mask) of the SVG into the pdf.

Revision history for this message
Dion-f (dion-f) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/2103
Closed by: https://gitlab.com/dionmoult

tags: added: bug-migration
Revision history for this message
Dion-f (dion-f) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/2103
Closed by: https://gitlab.com/dionmoult

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.