script for embedding raster images
As Bulia suggested, I've written a Perl script that takes an svg file that links to bitmapped images, and embeds the images into it. The script is here: http://www.lightandmatter.com/embed_raster_in_svg It can be tested using these two files: http://www.lightandmatter.com/beer.svg http://www.lightandmatter.com/beer.jpg Download all three files, then run the script like this: embed_raster_in_svg beer.svg It copies the original version of beer.svg to beer.svg.bak, and then embeds the raster images into a new version of beer.svg.
The output looks reasonable to me, but I'm having a hard time figuring out if it's valid Inkscape svg or not. Bulia said the latest version of Inkscape could handle embedded raster images, so I checked out a copy from cvs, compiled it on my machine, and used it to open the version of beer.svg with the image embedded. However, it showed up as a broken link, just like in older versions of inkscape. Can anyone try this and tell me if they understand what's going on?
participants (2)
-
Ben Crowell
-
bulia byak