Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support alternative (non-base64) url for image data #60

Open
PerBothner opened this issue Jun 20, 2016 · 1 comment
Open

support alternative (non-base64) url for image data #60

PerBothner opened this issue Jun 20, 2016 · 1 comment

Comments

@PerBothner
Copy link

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?

@eseifert
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants