Copy link to clipboard
Copied
I am compositing (copyPixels) bitmaps with alpha into one bitmap... on the left I am compositing the two shapes onto a background bitmap that is solid gray and has no alpha.
On the right is the exact same two shapes, however I am compositing them onto a background image that is transparent..
Notice the aliasing on the yellow edge at upper right. I figure it must be due to pre-multiplied alpha... problem is I need my background to be transparent, but I'd really like smooth edges like on the left.
So, looked into this a little more and indeed it's due to using premultiplied alpha. It looks ok if I apply a little blur to the final result, or if I don't use full opacity but it's not ideal. Be great if copyPixels had a flag that allowed it to use straight alpha.
Copy link to clipboard
Copied
So, looked into this a little more and indeed it's due to using premultiplied alpha. It looks ok if I apply a little blur to the final result, or if I don't use full opacity but it's not ideal. Be great if copyPixels had a flag that allowed it to use straight alpha.