liveBook · Manning

Bitmap image

As explained in Advanced Algorithms and Data Structures

An RGB bitmap image is a raster image whose pixels represent color through red, green, and blue channels.

An RGB bitmap image represents color as pixels. Each pixel stores red, green, and blue intensity values from 0 to 255, requiring three bytes when uncompressed. section 11.4.1

Representative RGB values include:

  • Red: (255, 0, 0); darker blue: (0, 0, 146); yellow: (255, 255, 0); black: (0, 0, 0); white: (255, 255, 255). section 11.4.1
  • A 1280 × 720 image requires more than 2 MB uncompressed, while 1920 × 1080 requires almost 6 MB. section 11.4.1

Reducing a color palette

For road-sign images, reduce each source pixel to the nearest color in a 256-color palette. An SS-tree indexes sampled RGB colors, and nearest-neighbor search assigns each pixel a palette index, reducing storage by a factor of three. section 11.4.1

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines channels, intensity ranges, memory costs, and palette reduction, but does not detail bitmap file-format internals.
Examples
Uses RGB tuples, HD and full-HD resolutions, road-sign images, and a 256-color palette.
What it assumes
Starts from individual pixels and teaches RGB channel intensities before applying color reduction.
What you can do after
Apply nearest-neighbor search to map RGB pixels onto a smaller sampled color palette.
How it connects
Connects pixels and RGB color spaces with nearest-neighbor search, color reduction, image compression, and machine learning.

Also explained in

Compare how 4 books explain bitmap image →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.