`resvg` does not isolate background properly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
The following SVG:
```svg
```
Renders fine with default arguments:
but as soon as I add `--background white` I get the following:
I think this is because we just fill the pixmap with the white color and then render the SVG on top of it, with this white color as the initial backdrop. However, I think what should be done is that we render against a transparent backdrop first and then composite the final result onto the white pixmap. This usually doesn't matter for src-over compositing, but if you have SVGs with blending, it does matter in which order you apply the operations.
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 at the CLI handling for `--background` and reproduce the issue with the SVG in the report, comparing default rendering with `--background white`. Trace how the background is applied relative to SVG blending; done means the white background no longer changes the blended result unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100