Render SVG which has `<image>` with `xlink:href="data:image/png;base64,/9j/"` (aka not matching mime type vs what image data is there)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
Hi
First off: This is an impressive library/application for rendering svg to png (performance and quality-wise)
I have a situation where I embed images like the title says (mime type: image/png, but the encoded image is actually a jpeg (base64 starting with "/9j/" tells it).
Can I tell resvg somehow that it should ignore the mime type an render what's actually there (trying the most common mime types it knows) or tell it what mime types it should try?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the handling for SVG elements with data:image/png;base64 content and how the embedded bytes are interpreted. Check whether the MIME type or the encoded data determines decoding, then define completion as correctly rendering the JPEG bytes despite the declared PNG type, with coverage for the reported data URI case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100