You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like this canvas is using Skia's premultiplied surface. I have an issue where if I try to get data from transparent canvas with globalAlpha=0.5 it actually multiplies the RGB values. if I set rgb(50, 50, 50) the pixel value would contain r=25, g=25, b=25, a=128 (in decimal). This resulted in my colors seeming darker when I got canvas data with canvas.data(). I wonder if there's a build in way to get non pre-multiplied pixel data.
It seems like this canvas is using Skia's premultiplied surface. I have an issue where if I try to get data from transparent canvas with
globalAlpha=0.5
it actually multiplies the RGB values. if I setrgb(50, 50, 50)
the pixel value would contain r=25, g=25, b=25, a=128 (in decimal). This resulted in my colors seeming darker when I got canvas data withcanvas.data()
. I wonder if there's a build in way to get non pre-multiplied pixel data.My current way is this:
The text was updated successfully, but these errors were encountered: