Skip to content

setting the alpha of an image #42

@KhafraDev

Description

@KhafraDev

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions