support alternative (non-base64) url for image data
The way drawImage translates an mage to SVG is to base-64-encode it and include it as literal data. Which is often fine, but often you would want use some real http or file url, eiher because that is where the Image originally came from, or because you want to bundle the images with the svn as a bundle. There isn't any way to do that.
The attached diff show one partial solution: src_link-diff1.txt This assumes the original Image is a RendedImage with a SRC_LINK property. This works, but it's expensive if the original image isn't a Bufferedmage, because VectorGraphics2D ends up copying the Raster, and then not making use of it. It's also hard to associate properties with Images unless you have use the BufferedImage constructor or have a custom RenderedImage class.
Another idea might be to have some kind of call-back hook that the caller sets up, to map Images to paths.
Ideas?
Thanks for your sugestion @PerBothner. This is definitely something we would like to provide. We won't tackle it in the next release, but maybe in the release after that.