English ▼

Pixel

A pixel is the basic element of any computer, phone, or tablet display and, for color displays, is composed of the three primary colors of light: red, green, and blue. A computer image is composed of many thousands of pixels arranged in rows and columns. How these individual pixels have been stored within both computer or device memory and image files has evolved over the years, and we explain some of these methods below.

A pixel can be either monochrome, grayscale, or color, and depending on this, it has a direct effect on the amount of computer or device memory needed to store a single pixel.

Monochrome

On older computer systems, to reduce costs, they were typically supplied with monochrome screens capable of displaying either green or black pixels. Not only did this simplify the design requirements of the screen, but it also meant a pixel could be represented within the computer's memory as either a 0 or 1 (binary bit) which would minimize the memory needed to store images as you could store 8 pixels within a single byte of computer memory.

A full-color scene

A full-color scene

The same full-color scene is converted to monochrome black and white

The same full-color scene converted to black and white

A zoomed-in portion of the same black-and-white image

A zoomed-in portion of the same black-and-white image

Grayscale

A grayscale pixel is one that can typically have 256 levels of gray, including black and white. The 256 possible values are a result of a single memory byte being used to store the grayscale value. Ensuring a grayscale pixel needs only 1 byte of memory has many benefits. As well as reducing memory needed to store the image, it also makes it relatively straightforward for software developers to process these images.

A full-color scene

A full-color scene

The same full-color scene converted to grayscale

The same full-color scene converted to grayscale

The 256 levels of gray used in the image

The 256 levels of gray used in the image

Color

There are several methods that have been developed over the years for storing color pixels. Many of these have had nothing to do with any constraints of color screens but rather with the need to minimize the amount of, at the time, very expensive computer memory (RAM) needed to store a color image, as well as the limitations of the graphics hardware found in earlier computers.

Palettes

In the early days of computing, to ensure efficient memory use and to support the limitations of the graphics hardware, a color image could be specified with certain-sized color palettes. These palette sizes would often be 2, 4, 8, 16, and 256 colors in size. These colors would often be taken from a much larger pool of available colors. It was possible to use differing algorithms, such as Floyd–Steinberg dithering to take a full-color photo, often comprising thousands of colors, and reduce this down to fit within a 256-color palette and still maintain very good image quality. This is exactly the method used by older image formats, such as GIF.

A full-color scene

A full-color scene

The same full-color scene reduced to a 256-color palette

The same full-color scene reduced to a 256-color palette

The 256-color palette used

The 256-color palette used

Full Color

As time advanced and device memory both increased in capacity and reduced in price, along with consistent improvements with device hardware performance in general, the use of color palettes to reduce the amount of memory needed to store an image has become less important. This has led to pixels in modern image formats being stored in a high-color format of 1 byte for red, 1 byte for green, and 1 byte for the blue elements, giving a full-color pixel a range of roughly 16.7 million colors.

This improved device hardware capacity and performance, but removing the need for palettes didn't remove the need to reduce the amount of space needed to store the image. And so image formats that offer lossy and lossless compression options were created to reduce the image size without needing to resort to palettes.

© 2024 ImageToStl. Convert your PNG and JPG Files to 3D STL files.