export svg embedded bitmap images in native format

Asked by Darko Veberic

often i use inkscape to extract plots from pdf files. if a plot happens to be an embedded bitmap image, it is impossible to get it out from svg in the native dimensions/dpi/format. the export bitmap | selection will always rediscretize the original image unless the right dpi settings are "guessed" correctly. it would be nice if inkscape would in case of embedded images support native export.

currently i just search for the appropriate embedded image tag with my text editor opening the svg file. embedded images are stored in base64 encoded strings with some small, easily removable preamble. the remaining huge base64 string i save into a file and then pass through a web service offering online base64 string decoding. a bit awkward but this is the only way i know i will get exactly the same image back out from the svg...

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

Inkscape includes an extension to extract a selected bitmap image:
'Extensions > Images > Extract Image…'

When extracting an image with the extension, make sure to have the image itself selected (sometimes, images from PDF/EPS/PS file are imported as patterns of a rectangular path or as masked bitmaps, or a combination of clipped and masked groups around the scaled image). You can use the 'Edit > XML Editor…' to inspect the structure of the imported file (it differs from SVG because the intended use of PDF and Postscript-based files is different - they are output formats not structured for editing, with focus on the appearance (portable, identical output on different systems/printers/displays)).

See also:
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Extensions-Images.html>

Revision history for this message
su_v (suv-lp) said :
#2

> often i use inkscape to extract plots from pdf files. if a plot
> happens to be an embedded bitmap image, it is impossible
> to get it out from svg in the native dimensions/dpi/format.

Forgot to mention another option in my earlier answer: the PDF import dialog allows to optionally *not* embed bitmap images: Did you try to uncheck the setting '[x] Embed images' when opening the PDF file in Inkscape?

Depending on your OS/platform and the way Inkscape has been launched, the location of the extracted and externally linked images might differ. You can see the location of externally linked images by selecting the image in Inkscape, and choose 'Image Properties…' from the context menu.

Can you help with this problem?

Provide an answer of your own, or ask Darko Veberic for more information if necessary.

To post a message you must log in.