-
-
Notifications
You must be signed in to change notification settings - Fork 319
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 org.w3c.dom.Document input to SVGImageReader #722
Conversation
imageio/imageio-batik/src/main/java/com/twelvemonkeys/imageio/plugins/svg/SVGImageReader.java
Outdated
Show resolved
Hide resolved
Just noticed there's a previous #452. It is slightly different from my suggestion here – it appears to perform some unnecessary hoops for |
Allow reading an SVG source once, and tweak its content in memory like changing viewBox, colors, and styles to produce multiple image variants in succession. See "DynamicSvgOffscreen - Rendering a dynamic SVG document to an offscreen buffer" (Batik HowTos) <https://cwiki.apache.org/confluence/display/XMLGRAPHICSBATIK/DynamicSvgOffscreen>
Handle DOM exceptions to signal IIOException. Avoid unexpected unchecked exception popping up.
Thanks! I'll look into the changes as soon as I find the time! |
Declare SVG_ROOT QName instead of just the namespace.
Extract SVGImageReaderSpi DOM tests into separate class/suite.
Replace unintended DocumentBuilderFactory.newDefaultInstance() (Java 9+) usage -> DocumentBuilderFactory.newInstance(), in tests.
(cherry picked from commit ba1f754)
@haraldk, I'm not looking into this anymore. Please close it at your discretion. |
Use case: Allow reading an SVG source once, and tweaking its content in memory like changing viewBox, colors, and styles to produce multiple image variants in succession.
Similar to: DynamicSvgOffscreen - Rendering a dynamic SVG document to an offscreen buffer (Batik HowTos)