linebender / linebender/resvg

Add a route to apply filters to existing `Pixmap`

Open
#1,094 7 comments 1 reaction 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

In Takumi, when we tries to rasterize filters on a pixmap, we need to go through extra unpremultiply -> encode png -> resvg decodes png -> premultiply which is very inefficient.

Source: https://github.com/kane50613/takumi/blob/9eb4a7521bbca03f1812e6446cdb0f05341e2fee/takumi-core/src/resources/image.rs#L723

I'm willing to contribute to it if needed.

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

Start with the referenced takumi-core/src/resources/image.rs line 723 and trace how filters are currently rasterized through resvg. Then inspect resvg's existing Pixmap and filter entry points to determine the appropriate direct route and its expected behavior. Done means the route is specified clearly and covered by tests showing filters can be applied without the PNG round trip.

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
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.