linebender / linebender/resvg

Drop shadow with rgb color not working

Open
#727 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.1k
Forks
348
Avg merge
1d 14h
Merged PRs (30d)
3

Description

Hey, I'm trying to use a drop shadow in a style element like

```
filter: "drop-shadow(0 2px 2px rgb(0 0 0))",
```

or even better

```
filter: "drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",
```

But when converting from svg to png via resvg the shadows are lost

It should be reproduceable with
![image](https://private-user-images.githubusercontent.com/5943908/316333978-f9111a32-4b7b-45e0-8809-bb3cec54ee05.svg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEzNjA4MzgsIm5iZiI6MTcxMTM2MDUzOCwicGF0aCI6Ii81OTQzOTA4LzMxNjMzMzk3OC1mOTExMWEzMi00YjdiLTQ1ZTAtODgwOS1iYjNjZWM1NGVlMDUuc3ZnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDMyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAzMjVUMDk1NTM4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWE4YThkYmJjNjNlYWZlOGI5ZDk0ZmViNTU0M2RjNjI2NDQxY2M5N2ZiMDFjMDMxMWFmY2YwOTViMWU0MDlkZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.JyfJ4_xaLJd7bxbbd2cGa31cnBBplhm-4FDUvuItaNI)

https://github.com/yisibl/resvg-js/issues/317

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. Start by reproducing the provided SVG-to-PNG conversion with the rgb() drop-shadow examples, then trace resvg's SVG filter and color handling. Done means both shadow examples render in the PNG output, with regression coverage for the reported syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.