sure, it will copy alpha levels if it has any (png)
Sub CreateBitmapWithAlpha(myOriginalBitmap As Bitmap, newAlpha As Int) As Bitmap
Dim canvas1 As Canvas
Dim myNewBitmap As Bitmap
myNewBitmap.initializeMutable(myOriginalBitmap.Width,myOriginalBitmap.Height)
canvas1.initialize2(myNewBitmap)
Dim CanvJO As JavaObject = canvas1
CanvJO = CanvJO.GetField("canvas")
Dim J As JavaObject
J.initializeContext()
J.Runmethod("alphatize",Array(CanvJO,myOriginalBitmap,newAlpha))
Return(myNewBitmap)
End Sub
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
public void alphatize(Canvas mCanvas, Bitmap mBitmap, int mAlpha){
Paint paint =new Paint();
paint.setAlpha(mAlpha);
Rect mDstRect = new Rect(0,0,mBitmap.getWidth(),mBitmap.getHeight()); //We are assuming they are the same size
mCanvas.drawBitmap(mBitmap, null, mDstRect, paint);
}