Multiply alpha channel (was: Imagemagick's dissolve option)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 32.7k
- Forks
- 1.4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
Hi @lovell,
Does sharp support the option to dissolve a transparent image?
I was looking for something similar to imagemagick's dissolve option.
I took a look at the docs but could not find anything.
What i wanna achieve is to overlay a watermark, which works well but i would also like to dissolve it by ~35%.
```
return sharp(watermark)
.resize(width)
.toBuffer()
.then((outputBuffer) => {
return stream.overlayWith(outputBuffer);
});
```
> `stream` is the streamed base image and `watermark` is the watermark png file which i would like to dissolve.
Contributor guide
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 with the stream.overlayWith(outputBuffer) call and the sharp overlay API; the issue names no source file or test. Determine how watermark opacity should be exposed and verified so that the overlay is applied at approximately 35% strength.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100