Unit content
Raster images, pixels and resolution
A raster image represents a rectangular field as a grid of samples called pixels. Each pixel stores one or more values describing the image at that location.
An image with width $W$ and height $H$ contains
$$N=WH$$
pixels. Its resolution is the grid size, while its aspect ratio is the ratio of width to height. Resolution says how many samples are stored; it does not by itself specify the physical size at which the image is displayed.
A pixel should not be thought of as a tiny geometric square in the original scene. It is a stored sample associated with a location or finite footprint on the image grid. When an image is enlarged, reduced or transformed, new pixel values must be reconstructed from the available samples.
Raster images map naturally to rectangular image buffers, but their fixed sampling grid means fine detail can be lost or aliased.