Putting PNG image inside svg/svgz file

Post about projects that involve using Inkscape and GIMP.
Inkscaper_

Putting PNG image inside svg/svgz file

Postby Inkscaper_ » Sun Jun 29, 2008 8:13 pm

I noticed that all bitmap files I use when working with Inkscape are not stored in SVG file directly, but staticly linked. As I tend to move files around, it often happens that links break. I know SVG is not bitmap file format, but could it be possible to put those PNG somehow in it? SVGZ maybe?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Putting PNG image inside svg/svgz file

Postby microUgly » Sun Jun 29, 2008 8:24 pm

Quote from the Inkscape Guide
By default bitmap images are not stored inside the Inkscape SVG file. Only references are stored. If you move your bitmap files, the references will be broken. You can embed the images inside the SVG file by using the Embed Images effect. See the section called “Embed All Images” in Chapter 19, Effects .

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: Putting PNG image inside svg/svgz file

Postby aho » Sun Jun 29, 2008 8:49 pm

To clarify this a bit... Effects->Images->Embed All Images...

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Putting PNG image inside svg/svgz file

Postby llogg » Sun Jun 29, 2008 10:10 pm

It's also relatively easy to replace the image location in a text editor or using Inkscape's own xml editor.

Eldonb46

Re: Putting PNG image inside svg/svgz file

Postby Eldonb46 » Sun Jun 29, 2008 10:59 pm

I tend to build folders to include all necessary files for a each project. So far I have always used the XML editor to change the "Absolute PATH" of the image to a "relative PATH" (i.e., it starts with "./") so that the project can be move without loosing the image. Editing the XML is a pain, but a trick I found; is to select the image before editing, so that it is also selected in the XML ( and therefore easy to find).

I wish there was a "user option" that would automatically use relative paths for any included image that shares the same directory path as the "named" or stored svg ( I know that would mean that you have to save your svg file before including an image, but that is easily done).

Eldonb46

Inkscaper_

Re: Putting PNG image inside svg/svgz file

Postby Inkscaper_ » Sun Jun 29, 2008 11:09 pm

Thanks for a really fast reply :)


Return to “Inkscape & GIMP”