An image can be abstracted as a function
Where
(non-negative reals) for grayscale images, each pixels represents only brightness and no color (combinations of 3 sets of non-negative reals), which is a color image with red/green/blue values for each pixel
Pixels
A pixel from a camera or scanner is a measurement of the average color of the image in the surrounding area near the pixel
If an image has
Note that because of the definition gave to a pixel the coordinate

pixel coordinates
So the domain of a
Pixel values
The value of a pixel depends on the precision and range of value needed, for example high dynamic range (HDR) images store floating-point numbers allowing a wide range of values, low dynamic range (LDR) images are instead stored with integers, the following pixel-values are used in a variety of applications
- 1-bit grayscale per pixel - images where intermediate grays are not needed e.g. text
- 8-bit grayscale per pixel - images with intermediate grays, it can store a total of 256 gray values e.g. a grayscale photo
- 8-bit red, green and blue (RGB), 24-bits per pixel - full color images that allow near 16 million possible values, e.g. consumer photographs, web and email applications
- 12- to 14-bit RGB, 36-42 bits per pixel - raw camera images for professional photography
- 16-bit half precision RGB, 48 bits per pixel - HDR images used in real time rendering
- 32-bit floating-point RGB, 96 bits per pixel - HDR images for software rendering