Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { @Deprecated public static Bitmap setAlpha(Bitmap source, int number) { int[] argb = new int[source.getWidth() * source.getHeight()]; source.getPixels(argb, 0, source.getWidth(), 0, 0, source.getWidth(), source.getHeight()); number = number * 255 / 100; for (int i = 0; i < argb.length; i++) { argb[i] = (number << 24) | (argb[i] & 0x00FFFFFF); } return Bitmap.createBitmap(argb, source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); } }