You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
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?
The text was updated successfully, but these errors were encountered: