liveBook · Manning

Pixel

As explained in Advanced Algorithms and Data Structures

A pixel is the smallest addressable element of a raster image, carrying a color or intensity representation.

A pixel is a tiny, addressable point in a raster image. In an RGB bitmap, each pixel stores red, green, and blue intensity values from 0 to 255, such as (255, 0, 0) for red or (0, 0, 146) for dark blue. section 11.4.1

Working with pixels exposes practical storage and processing trade-offs:

  • Stores three uncompressed bytes per pixel; a 1280 × 720 image therefore exceeds 2 MB, while 1920 × 1080 approaches 6 MB. section 11.4.1
  • Reduces storage by compressing images or mapping each pixel to a smaller color palette, such as 256 colors. section 11.4.1

Mapping pixels to a reduced palette

Build a nearest-neighbor search structure over sampled colors, inspect each source pixel's (r, g, b) values, find the nearest sampled color, and store that color's index in the destination image. section 11.4.1

Figure 11.9 RGB bitmap format. An image is made of tiny points, its pixels, and for each of them its color is determined by the combination of three primary colors: red, green, and blue, each of which can have an intensity between 0 and 255.

Visualizes how combining three intensity-controlled primary-color channels determines each pixel's color. section 11.4.1

How Advanced Algorithms and Data Structures covers it

How deep it goes
Explains RGB channel values, memory requirements, and palette remapping, without developing image compression internals.
Examples
Uses RGB color tuples, HD and full-HD memory calculations, and nearest-neighbor palette mapping.
What it assumes
Defines RGB channels and intensity values directly, requiring no stated image-processing background.
What you can do after
Apply nearest-neighbor search to map source pixels onto a reduced color palette.
How it connects
Connects pixels with RGB bitmaps, color reduction, image compression, and nearest-neighbor search.

Also explained in

Compare how 10 books explain pixel →

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.