lovell / lovell/sharp

Feature request: expose libvips maplut operation to map pixel values (for e.g. colour grading)

Open
#1,441 15 comments 3 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'm interested in being able to apply 3D LUTs to images on the fly, eg. .cube files. I think vips_maplut() is the right function under the hood for this, perhaps I'll need to figure out how to generate LUT images from those files first though.

I've been trying to use some node libraries to do this, extracting the pixels as an ndarray, applying the LUT, then saving the modified pixels back to an image buffer but it's super slow and error prone (truncated image data etc).

If it's not something that makes sense for sharp no worries, hopefully I can find info on transforming an image as a readableStream assuming that's doable :)

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 reviewing sharp's existing image-operation API and the libvips vips_maplut operation, using .cube LUT files as the input case. Define how LUT data should be represented and exposed through sharp; done means a practical API for applying a 3D LUT without manual pixel extraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend, computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.