• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

BitmapData compositing issue

Enthusiast ,
Aug 02, 2018 Aug 02, 2018

Copy link to clipboard

Copied

sample.png

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.

TOPICS
ActionScript

Views

357

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Aug 08, 2018 Aug 08, 2018

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.

Votes

Translate

Translate
Enthusiast ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines