I created an ARGB 8888 bitmap, and drawn some stuff to it using the
canvas. All is good. I can draw the bitmap to the screen, and it shows
the colors and alpha properly.

However, if I call getPixels on it (For example, so I can save the
content to a file), all pixels with an alpha other then 0xFF return
black as their color (R, G and B are all 0x00). It's as if getPixels
somehow assumed the bitmap was 1-bit alpha. But I can't find any
function that could be used to set the desired behaviour.

I thought to work around it, by first getting the alpha channel, then
setting it to 0xFF for all pixels before reading their color, but
while there is a way to extract only the alpha into another bitmap,
there seems to be no way to set only the alpha.

Any thoughts on how I could get the actual content of the bitmap ?

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to