tags:

views:

329

answers:

3

Greetings,

I would like to place an image over a surfaceview. However I would like the image to be transparent so you can see the image and also the undlying surfaceview. Can anyone suggest how I could do this?

+1  A: 

The section "Manipulating Image Pixels" in the post Working with images in Android shows how to manipulate pixels. If you were to set the alpha channel of each pixel to 128, the image would be 50% transparent or opaque depending if you are a glass half empty or half full type of person.

Timothy Lee Russell
+2  A: 

This is how I do it before drawing my shapes.

Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
buffer.eraseColor(Color.TRANSPARENT);
Tughi
A: 

Another good source for image manipulation is: http://www.javalobby.org/articles/ultimate-image/

hcpl