Android Beginner Tutorial Picture information

Source: Internet
Author: User

General information about the picture to understand its nature. The concept of picture size, pixels, bitmaps, etc. is summarized as follows:

  • The size of the picture in the computer
  • The total size of the picture = total pixels of the picture * the size of each pixel (the total pixels of the picture = pixel size, which is the resolution, such as setting 800*400) (the size of each pixel is different), which causes the total size of the picture to be different.
  • Monochrome bitmap: can only represent 2 colors
    • Use two numbers: 0 and 1
    • Using a binary number with a length of 1 can represent the
    • 1/8 bytes per pixel
    • Total size = Total pixels of picture * size per pixel =320000/8=40000 bytes (view picture information with basic match)
  • 16-color bitmap: Capable of representing 16 colors
    • Requires 16 numbers: 0-15,0000-1111
    • Using a binary array of length 4 can represent the
    • Consumes 4/8=1/2 bytes per pixel
    • Total size = Total pixels of the picture * the size of each pixel occupies =320000/2=160000 bytes
  • 256-color bitmap: Capable of representing 256 colors
    • Requires 256 numbers: 0-255,0000 0000-1111 1111
    • Use a binary number of length 8
    • Consumes 8/8=1 bytes per pixel
    • Total size = Total pixels of the picture * the size of each pixel occupies =320000*1=320000 bytes
  • 24-bit bitmap:
      • Each pixel occupies 24 bits, which is "3 bytes", so it is called a 24-bit bitmap.
      • Total size = Total pixels of the picture * the size of each pixel occupies =320000*3=960000 bytes
  • Another way of understanding:
    • r:0-255, requires a binary digit length of 8, takes 1 bytes
    • g:0-255, requires a binary digit length of 8, takes 1 bytes
    • b:0-255, requires a binary digit length of 8, takes 1 bytes

Android Beginner Tutorial Picture information

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.