BMP format in Android (alpha_8, argb_4444, argb_8888, rgb_565)
(19:39:03)
Reprinted
Android. Graphics. bitmap. config is an enumeration type, which defines four bitmap formats. At first it was a bit strange. I checked it online and probably specified the reason why the type name is strange.
We can see from the name:
Alpha_8: The number is 8, and the graphic parameter should be represented by one byte. It should be an 8-Bit Bitmap.
Argb_4444: 4 + 4 + 4 + 4 = 16. The graphic parameters should be represented by two bytes, which should be a 16-Bit Bitmap.
Argb_8888: 8 + 8 + 8 + 8 = 32. The graphic parameters should be represented by four bytes. They should be a 32-Bit Bitmap.
Rgb_565: 5 + 6 + 5 = 16. The graphic parameters should be represented by two bytes. It should be a 16-Bit Bitmap.
On the Internet, alpha_8, argb_4444, and argb_8888 are all transparent bitmaps, that is, the letters A represent transparent.
Argb_4444: indicates four parameters, namely A, R, G, and B. Each parameter is represented by 4 bits.
Likewise:
Argb_8888: indicates that there are four parameters, namely A, R, G, and B. Each parameter is represented by 8 bits.
Likewise:
Rgb_565: indicates that three parameters, R, G, and B, account for 5bit, 6bit, and 5bit respectively.
I think there must be other bmp files, but the sum of values of each parameter must be an integer multiple of 8.