lovell / lovell/sharp

Enhancement: expose vips_relational operation

Open
#1,015 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
JavaScript
Stars
32.7k
Forks
1.4k
Avg merge
1d 14h
Merged PRs (30d)
5

Description

I want to process my images such that only pixels that are a given color (eg: RGB(0,0,100)) will appear in the final image as black, the rest should be white.

Is there any way to add a custom filter/function that is called for each pixel before it is added to the output?

Contributor guide

Open the contributing guide

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 by locating sharp's API entry point for exposing libvips operations and reviewing the vips_relational operation in libvips. Confirm completion with an image where matching RGB(0,0,100) pixels are black and all others are white, and add or run the relevant operation tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-vision
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.