Commit 651efecf by hschlueter Committed by Ian Baker

Use Color helper for packing in BitmapTestUtil.

PiperOrigin-RevId: 431451974
parent b4e05e00
...@@ -86,7 +86,7 @@ public class BitmapTestUtil { ...@@ -86,7 +86,7 @@ public class BitmapTestUtil {
int g = buffer.get(offset + 1) & 0xFF; int g = buffer.get(offset + 1) & 0xFF;
int b = buffer.get(offset + 2) & 0xFF; int b = buffer.get(offset + 2) & 0xFF;
int a = buffer.get(offset + 3) & 0xFF; int a = buffer.get(offset + 3) & 0xFF;
colors[y * width + x] = (a << 24) + (r << 16) + (g << 8) + b; colors[y * width + x] = Color.argb(a, r, g, b);
} }
} }
return Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); return Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment