[android-developers] Re: Bitmap.getPixels and alpha

2009-01-13 Thread Patrick
Posting my solution here in case anyone runs into the same problem,. You can set the alpha to 0xFF using the DST_ATOP mode. Here's my code to extract the alpha and colors properly : // HACK : We need to force the alpha to 0xFF, or getPixels will return us black for the RGB

[android-developers] Re: Bitmap.getPixels()

2008-12-11 Thread jman
I'll manage to trim down the software a little bit later so that we can just focus on the issue or the thing I did something wrong on. Before I do that, imagine you use the Finger Paint example in ApiDemos. Before your canvas draw the path, you draw a background Bitmap bgBitmap first.

[android-developers] Re: Bitmap.getPixels()

2008-12-05 Thread Mike Reed
The color seems fine. Can you enclose a code-snippet, for the draw and the getPixels() call? thanks On Thu, Dec 4, 2008 at 5:55 PM, jman [EMAIL PROTECTED] wrote: It's 50% transparent, i.e. alpha channel is 0x80, paint color is 0x8000ff00 On Dec 4, 8:52 am, Robert Green [EMAIL PROTECTED]

[android-developers] Re: Bitmap.getPixels()

2008-12-04 Thread Robert Green
Did you mean partially transparent green or fully transparent? On Dec 4, 1:21 am, jman [EMAIL PROTECTED] wrote: I painted a transparent green curve on top of a background bitmap. When I use Bitmap.getPixels() to get the result into byte array, I always get a black curve.  The curve position

[android-developers] Re: Bitmap.getPixels()

2008-12-04 Thread jman
It's 50% transparent, i.e. alpha channel is 0x80, paint color is 0x8000ff00 On Dec 4, 8:52 am, Robert Green [EMAIL PROTECTED] wrote: Did you mean partially transparent green or fully transparent? On Dec 4, 1:21 am, jman [EMAIL PROTECTED] wrote: I painted a transparent green curve on top