I work with Android, and I really need a quick way to get a bitmap of a given size, which should be filled with a predefined color.
The following code does not work for me,
Bitmap Insert - Resizable Bitmap
int old = input.getPixel(0, 0); Canvas c = new Canvas(input); Rect rect = c.getClipBounds();
Be sure that the βoldβ value and the value (a | r | g | b) are different, but βpaintedβ the color using the canvas with my variable bitmap on the bottom, the bitmap retains its previous value.
I would be pleased with any method that takes a bitmap and color value and returns a bitmap filled with that color.
android bitmap fill
gav
source share