Use luminance of one raster as alpha of another during alpha blending

26 views
Skip to first unread message

Lennert Schneider

unread,
Nov 8, 2022, 4:36:28 AM11/8/22
to Paper.js
Hi,
I'm new to PaperJS and I'm trying to draw a Raster image using alpha blending (i.e. use the alpha channel as opacity map of that Raster image). The catch is that its alpha values aren't stored in that image, but instead as a second greyscale Raster. Now the question is, if I can somehow use the greyscale Raster as alpha-source directly during blending of my image or if there is a way to copy the greyscale luminance of the greyscale Raster into the alpha channel of the image Raster I want to blend ?
I hope somebody can help me out here as I couldn't find this information on the internet so far, unfortunately.
Thank you.
Reply all
Reply to author
Forward
0 new messages