I recently learned the Api documentation and opened Android. graphics. the Bitmap class has an internal class Bitmap. config class. In the Bitmap class, createBitmap (int width, int height, Bitmap. config config ).
Enumerated variable
Public static final Bitmap. Config ALPHA_8
Public static final Bitmap. Config ARGB_4444
Public static final Bitmap. Config ARGB_8888
Public static final Bitmap. Config RGB_565
It seems a bit blind. What is ALPHA_8, ARGB_4444, ARGB_8888, and RGB_565?
In fact, this is the color storage method: We know that ARGB refers to A color mode, in which A represents Alpha, R represents red, G Represents green, B Represents blue, in fact, all visible colors are composed of red, green, and blue on the right. Therefore, red, green, and blue are also called primary colors. Each primary color stores the information values of the displayed colors.
To put it bluntly, ALPHA_8 is an Alpha consisting of eight digits.
ARGB_4444 is composed of four digits, that is, 16 digits,
ARGB_8888 is composed of four eight digits, namely, 32 digits,
RGB_565 indicates that R is 5 bits, G is 6 bits, and B is 5 bits, a total of 16 bits
It can be seen that:
ALPHA_8 represents an 8-bit Alpha bitmap
ARGB_4444 represents a 16-bit ARGB bitmap
ARGB_8888 represents 32-bit ARGB bitmap
RGB_565 represents an 8-bit RGB bitmap.
The higher the number of Bitmap digits, the more color information it can store. Of course, the more vivid the image is.
From caikezhan