When you learn the Xutils framework, you see a line of code in the sample code:
1 bitmaputils.configdefaultbitmapconfig (Bitmap.Config.RGB_565);
What does Bitmap.Config.RGB_565 mean?
Bitmap.config is an inner class within the Android.graphics.Bitmap class, in the Bitmap class CreateBitmap (int width, int height, bitmap.config Config) method will be used to open this class
Enumeration variables
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
Alpha_8, what is argb_4444,argb_8888,rgb_565?
In fact, this is the color of the storage method: We know that ARGB refers to a color model, where a for Alpha,r said Red,g said Green,b said Blue, in fact, all the visible color is the right red and green blue, so red and green blue is also called the three primary colors, Each primary color stores the information values of the colors represented
In plain alpha_8, Alpha is made up of 8 bits.
The argb_4444 is made up of 4 4-bit, or 16-bit,
The argb_8888 is made up of 4 8-bit, or 32-bit,
Rgb_565 is R is 5 bits, G is 6 bits, B is 5 bits total 16 bits
Thus:
Alpha_8 represents a 8-bit alpha bitmap
argb_4444 represents a 16-bit ARGB bitmap
argb_8888 represents a 32-bit ARGB bitmap
rgb_565 represents a 8-bit RGB bitmap
A higher number of bitmap bits means that the more color information they can store, the more realistic the image is.
The Bitmap.Config.RGB_565 of Android development