I have the following code:
Bitmap bitmap = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_4444); for (int y = 0; y < HEIGHT; y++) { f