Brooooooklyn / Image

Image processing library.

Home Page:https://image.napi.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setting the alpha of an image

KhafraDev opened this issue · comments

commented

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Being able to set an image's alpha value (to make it partially transparent) would make it easier to create gifs on my end.

It could be used to create frames that fade out, overlap 2 images on top of each other without hiding the bottom image, etc.

Solution

with getrawpixels I could manually do it, but I have problems creating an image from a raw pixel buffer

Alternatives

with @napi-rs/canvas I can set the alpha and draw an image that way, and mix it with a package like @skyra/gifenc to create gifs.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

(my rust isn't good enough, sorry)