We have a decision to make that I felt would make sense to put to a vote.
BitmapData.fromFile (and other methods) of loading image files currently set
bitmapData.transparent to true, always.
BitmapData allows transparency when you use
bitmapData.setPixels, but is more expensive.
We support premultiplied alpha, which means we may need to go through each pixel and multiply the RGB value by the alpha before we render it. This is important for proper blending, but wholly unneeded if the image is opaque. There may be other performance boosts when a
bitmapData.transparent is false.
We could set this to false when loading a JPEG, or (possibly) an opaque PNG image, but this is a breaking change if a user relies on being able to modify one of these files directly.
- Make every loaded BitmapData transparent
- Make every PNG transparent, and every JPEG opaque
- Make every opaque image opaque, regardless of format
- Do whatever Flash Player does
Thank you for your help