This is an excerpt from The Design and Implementation of Multimedia Software by Prof. David Bernstein.
The sampling of static visual content involves the sampling of both the color spectrum and space (usually in that order). The two are similar in that they both involve the discretization of continuous information. They are different in their dimensionality.
Such processes are sometimes called quantization schemes. The result of color sampling (i.e., the discrete set of colors) is often referred to as a palette, though one has to be somewhat careful because this term is sometimes used to describe the set of actual samples and other times is used to describe the set of all possible samples.
Though there are many ways to perform spatial sampling, this book limits its attention to the plane and, in particular, with spatial sampling schemes that involve the use of a finite grid with cells of equal size. In essence, one places a regular grid on a planar surface and assigns a single color to each cell in the grid.
The result of color sampling and spatial sampling is a matrix of picture elements (or pixels), each of which contains a single color in the palette. Such a matrix is often called a raster representation. One example is illustrated in the following Figure. In practice, sampled static visual content is usually created in one of two ways. In some cases, it is created using a scanner that samples from a source of some kind (e.g., a drawing or painting). In other cases, it is created on a computer by a person (who selects colors from a discrete set) using a pointing device of some kind (e.g., a mouse or a pen on a graphics tablet) that performs the spatial sampling. Two common examples of sampled static visual content are bitmapped images and bitmapped fonts.