lovell/sharp

Multiply alpha channel (was: Imagemagick's dissolve option)

Open

#618 aberto em 2 de nov. de 2016

Ver no GitHub
 (14 comments) (0 reactions) (0 assignees)JavaScript (1.389 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (31.994 stars)
Métricas de merge de PR
 (Mesclagem média 4d 19h) (18 fundiu PRs em 30d)

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.

Guia do colaborador