BMP format in Android (alpha_8, argb_4444, argb_8888, rgb_565)

Source: Internet
Author: User
BMP format in Android (alpha_8, argb_4444, argb_8888, rgb_565)

(19:39:03)

Reprinted
Tags: 

It
 

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.