How to prevent Android's drawBitmap from only drawing black images? How to prevent Android's drawBitmap from only drawing black images? android android

How to prevent Android's drawBitmap from only drawing black images?


I commented in your last question, but here it is again.

The problem might be that you're drawing a 32-bit image (the original) onto an 8-bit image (the extracted shadowImage). If that's the case, do something like

Bitmap shadowImage32 = shadowImage.copy(ARGB_8888, true);

after the extractAlpha call, and draw onto that guy instead of the 8-bit shadowImage.


You have to draw both the shadow image and the original image. The shadow image only contains the alpha values of the original image, not the actual colored pixels.