linebender / resvg

An SVG rendering library.
Mozilla Public License 2.0
2.79k stars 225 forks source link

feat: add raw image to allow flexible resolvers #799

Closed amhndu closed 2 months ago

amhndu commented 2 months ago

Adds a RawImage image kind to usvg and a transparent decode_raster implementation in resvg. This allows writing flexible ImageHrefResolver that can support additional image formats. Another use case would be to allow alternate implementations, but with zunejpeg merged, I find it less important.

Closes #772

I'm unsure about the xml writer implementation, but I've added a hack for now

RazrFalcon commented 2 months ago

Sorry, but this is not how raster data is intended to be used. #772 would require much more work than that.

amhndu commented 2 months ago

I'm happy to refactor and follow whatever approach you have in mind