mirror of
https://github.com/androidx/media.git
synced 2025-05-18 13:09:56 +08:00
Use Color helper for packing in BitmapTestUtil.
PiperOrigin-RevId: 431451974
This commit is contained in:
parent
b4e05e00f2
commit
651efecf75
@ -86,7 +86,7 @@ public class BitmapTestUtil {
|
||||
int g = buffer.get(offset + 1) & 0xFF;
|
||||
int b = buffer.get(offset + 2) & 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user