mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Use Color helper for packing in BitmapTestUtil.
PiperOrigin-RevId: 431451974
This commit is contained in:
parent
68c310a94a
commit
da9aa4fded
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue