Back to 课程

Computer Science GCES EDEXCEL

0% Complete
0/0 Steps
  1. Decomposition And Abstraction Edexcel
    2 主题
  2. Algorithms Edexcel
    11 主题
  3. Truth Tables Edexcel
    3 主题
  4. Binary Edexcel
    6 主题
  5. Data Representation Edexcel
    4 主题
  6. Data Storage And Compression Edexcel
    2 主题
  7. Hardware Edexcel
    5 主题
  8. Software Edexcel
    3 主题
  9. Programming Languages Edexcel
    2 主题
  10. Networks Edexcel
    7 主题
  11. Network Security Edexcel
    2 主题
  12. Environmental Issues Edexcel
    1 主题
  13. Ethical And Legal Issues Edexcel
    3 主题
  14. Cybersecurity Edexcel
    2 主题
  15. Develop Code Edexcel
    6 主题
  16. Constructs Edexcel
    4 主题
  17. Data Types And Data Structures Edexcel
    5 主题
  18. Operators Edexcel
    1 主题
  19. Subprograms Edexcel
    2 主题
课 Progress
0% Complete

Exam code:1CP2

Bitmap Images

What is a bitmap?

  • A bitmap image is made up of squares called pixels

  • A pixel is the smallest element of a bitmap image

  • The size of an image is expressed as width x height in pixels

  • Each pixel is stored as a binary code

  • Binary codes are unique to the colour in each pixel

  • A typical example of a bitmap image is a photograph

humidity-sensor-photo
  • The more colours and more detail in the image, the higher the quality of the image and the more binary that needs to be stored

Resolution & Colour Depth

What is resolution?

  • Resolution is the physical size of an image when displayed on screen or in print

  • The resolution is measured in pixels per inch (ppi)

  • In general, the higher the resolution, the more pixels per inch, the better the image quality

  • A lower resolution has fewer pixels per inch and can become pixelated if stretched to fit into a larger space

What is colour depth?

  • Colour depth is the number of bits used to represent the colour of a pixel

  • The colour depth is dependent on the number of colours needed in the image

  • In general, the higher the colour depth the more detail in the image (higher quality)

  • In a black & white image the colour depth would be 1, meaning 1 bit is enough to create a unique binary code for each colour in the image (1=white, 0=black)

1-bit-bitmap-image
  • In an image with a colour depth of 2, you would have 00, 01, 10 & 11 available binary codes, so 4 colours

-2-bit-bitmap-image
  • As colour depth increases, so does the amount of colours available in an image

  • The amount of colours can be calculated as 2n (n = colour depth) 

Colour Depth

Amount of Colours

1 bit

2 (B&W)

2 bit

4

4 bit

16

8 bit

256

24 bit

16,777,216 (True Colour)

What is the impact of resolution and colour depth?

  • As the resolution and/or colour depth increases, the bigger the size of the file becomes on secondary storage

  • The higher the resolution, the more pixels are in the image, the more bits are stored

  • The higher the colour depth, the more bits per pixel are stored

  • Striking a balance between quality and file size is always a consideration

image-5---seesaw-image-of-balance-vs-quality-here

Metadata & Binary to Bitmap

How do you convert binary data into a bitmap image?

  • To convert binary data into a bitmap image:

    • Image metadata is read

    • Using this information binary data can be mapped to individual pixels

    • A bitmap image is created

What is metadata?

  • Metadata is data about data

  • Metadata is additional information stored with the image, it provides context and information

  • Examples of metadata that are stored are:

    • Resolution

    • Colour depth

    • Author – Who created the image?

    • Date/Time – When and what time was the image created/taken?

    • Location – Where was the image taken?

Example

  • A bitmap image with binary data:

Binary data

111111111110111011100010001100000001100000001110000011111000111111101111111111111

  • And metadata of:

    • Width: 9 pixels

    • Height: 9 pixels

    • Colour depth: 1 bit

  • 1 bit is a monochrome image (B&W), typically 1 = black and 0 = white

  • Every 9 pixels a new line is created

  • The resulting image would be:

A 9 by 9 table containing binary digits with the heading binary data
A 9 by 9 table with each cell coloured using the key, 0 = white and 1 = black displaying a pixel heart shape

Worked Example

1. Define the term Pixel [1]

2. If an image has a colour depth of 4 bits, how many colours can the image represent? [1]

3. Describe the impact of changing the bitmap image size from 500×500 pixels to 1000×1000 pixels [2]

Answers

  1. The smallest element of a bitmap image [1]

  2. 16

  3. The image quality would be higher [1] the file size would be larger [1]

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注