Oh, I just noticed that if I try to do it the other way, that is, extract the pixels form the image and applying my own blending algorithm, another problem arises. There seems to be a bug in the Bitmap.getPixels() implementation, that causes any pixel that has a non 0xFF alpha, to automatically lose all its color and become black. So if the image has a pixel with a full red colour of 0xFFFF0000, it stays red, but if it is a semi-transparent red color such as 0x7FFF0000, it is returned as the color 0x7F000000, with both the getPixels() and the getPixel() methods.
On 5 Apr, 18:02, hanni <[EMAIL PROTECTED]> wrote: > Hi, my application makes heavy use of semi-transparent .png's for > interesting graphics. I'm used to this, developing J2ME applications. > The alpha blending algorithm in Android, however, seems to be less > than adequate. Everything that is semi-transparent is restricted to > very few shades of color, and that goes for everything behind a semi- > transparent image aswell. > > Does anyone know of a setting to enable a more accurate alpha blending > algortihm, even if it might require more CPU power? Currently, when I > really need something to look accurate, I would have to create an > array from that image and run my own blending algortim on it, > converting it back to an image afterwards. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

