[go: nahoru, domu]

Jump to content

8-bit color: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
0x004d (talk | contribs)
→‎Usage: Added example of modern usage
m →‎Usage: grammar fix ("a" should be "an" before the word "18-bit" / "eighteen bit")
 
(32 intermediate revisions by 21 users not shown)
Line 1: Line 1:
{{Short description|Computer color depth}}
{{Color depth}}
{{Color depth}}
'''8-bit color''' graphics are a method of storing image information in a computer's memory or in an image file, so that each [[pixel]] is represented by one 8-bit [[byte]]. The maximum number of colors that can be displayed at any one time is 256 or 2<sup>8</sup>.<ref name="HIPR 8-bit Color Images">{{cite web |last1=Fisher |first1=Robert |last2=Perkins |first2=Simon |last3=Ashley |first3=Walker |last4=Wolfart |first4=Erik |title=8-bit Color Images |url=https://homepages.inf.ed.ac.uk/rbf/HIPR2/8bitcol.htm |website=Hypermedia Image Processing Reference |publisher=University of Edinburgh |accessdate=14 November 2019 |ref=1}}</ref>
'''8-bit color''' graphics are a method of storing image information in a computer's memory or in an image file, so that each [[pixel]] is represented by 8 bits (1 [[byte]]). The maximum number of colors that can be displayed at any one time is 256 per pixel or 2<sup>8</sup>.<ref name="HIPR 8-bit Color Images">{{cite web |last1=Fisher |first1=Robert |last2=Perkins |first2=Simon |last3=Ashley |first3=Walker |last4=Wolfart |first4=Erik |title=8-bit Color Images |url=https://homepages.inf.ed.ac.uk/rbf/HIPR2/8bitcol.htm |website=Hypermedia Image Processing Reference |publisher=University of Edinburgh |access-date=14 November 2019 |ref=1}}</ref>


==Color quantization==
==Color quantization==
[[File:256colour.png|frame|8-bit color, with three bits of red, three bits of green, and two bits of blue.]]
[[File:256colour.png|frame|8-bit color, with three bits of red, three bits of green, and two bits of blue.]]


In order to turn a 24-bit image into an 8-bit image, the image must go through a process called color quantization. Color quantization is the process of creating a color map for a less color dense image from a more dense image.<ref name="HIPR Color Quantization">{{cite web |last1=Fisher |first1=Robert |last2=Perkins |first2=Simon |last3=Walker |first3=Ashley |last4=Wolfart |first4=Erik |title=Color Quantization |url=https://homepages.inf.ed.ac.uk/rbf/HIPR2/quantize.htm |website=Hypermedia Image Processing Reference |publisher=University of Edinburgh |accessdate=14 November 2019 |ref=2}}</ref> The simplest form of quantization frequently called 8-bit truecolor is to simply assign 3 bits to red, 3 to green and 2 to blue (the human eye is less sensitive to blue light) to create a 3-3-2
In order to turn a [[Color_depth#True_color_(24-bit)|true color 24-bit]] image into an 8-bit image, the image must go through a process called color quantization. Color quantization is the process of creating a color map for a less color dense image from a more dense image.<ref name="HIPR Color Quantization">{{cite web |last1=Fisher |first1=Robert |last2=Perkins |first2=Simon |last3=Walker |first3=Ashley |last4=Wolfart |first4=Erik |title=Color Quantization |url=https://homepages.inf.ed.ac.uk/rbf/HIPR2/quantize.htm |website=Hypermedia Image Processing Reference |publisher=University of Edinburgh |access-date=14 November 2019 |ref=2}}</ref>
The simplest form of quantization is to simply assign 3 bits to red, 3 bits to green and 2 bits to blue, as the human eye is less sensitive to blue light. This creates a so called '''3-3-2''' 8-bit color image, arranged like on the following table:
<pre>Bit 7 6 5 4 3 2 1 0
<pre>Bit 7 6 5 4 3 2 1 0
Data R R R G G G B B</pre>
Data R R R G G G B B</pre>

8-bit color image, but this process is sub optimal. There could be different groupings of colors that make evenly spreading the colors out inefficient and likely to misrepresent the actual image. Because the color map doesn't need to have every color in it and just needs to accurately represent the more color dense image, an arbitrary color can be assigned to each of the 256 available color 'slots' on the map. Popular approaches for creating these maps include the ''popularity algorithm'' which chooses the 256 most common colors and creates a map from them. The more accurate ''median-cut'' algorithm resorts and divides colors to find the median of different color groups resulting in a more accurate final color map.<ref name="Interactive Quantization">{{cite web |last1=Spring |first1=Kenneth R. |last2=Russ |first2=John C. |title=Color Reduction and Image Dithering |url=https://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/colorreduction/index.html |website=Molecular Expressions Optical Microscopy Primer Digital Image Processing |publisher=Michael W. Davidson and The Florida State University |accessdate=14 November 2019}}</ref>
This process is sub optimal. There could be different groupings of colors that make evenly spreading the colors out inefficient and likely to misrepresent the actual image.
An alternative approach is to use a [[Palette (computing)|palette]], with each of the 256 possible [[Indexed color|indexes]] pointing towards a larger color space (ex: 256 colors chosen from 4096).
Because the color map doesn't need to have every color in it and just needs to accurately represent the more color dense image, an arbitrary color can be assigned to each of the 256 available color indexes on the map.

Popular approaches for creating these maps (also known as palettes) include the ''[[Sorting_algorithm#Popular_sorting_algorithms|popularity algorithm]]'' which chooses the 256 most common colors and creates a map from them. The more accurate ''[[median cut]]'' algorithm resorts and divides colors to find the median of different color groups resulting in a more accurate final color map.<ref name="Interactive Quantization">{{cite web |last1=Spring |first1=Kenneth R. |last2=Russ |first2=John C. |title=Color Reduction and Image Dithering |url=https://www.micro.magnet.fsu.edu/primer/java/digitalimaging/processing/colorreduction/index.html |website=Molecular Expressions Optical Microscopy Primer Digital Image Processing |publisher=Michael W. Davidson and The Florida State University |access-date=14 November 2019 |archive-date=2 December 2020 |archive-url=https://web.archive.org/web/20201202200608/https://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/colorreduction/index.html |url-status=dead }}</ref>


==Usage==
==Usage==
Because of the low amount of memory and resultant higher speeds of 8-bit color images, 8-bit color was a common ground among computer graphics development until more memory and higher CPU speeds became readily available to consumers. 8-bit color was used in many different applications including<ref>{{cite web |title=Monochrome and RGB pallettes |url=https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_palettes#8-bit_Grayscale |website=Wikipedia |accessdate=14 November 2019}}</ref>{{Circular reference|date=November 2019}}:
Because of the low amount of memory and resultant higher speeds of 8-bit color images, 8-bit color was a common ground among computer graphics development until more memory and higher CPU speeds became readily available to consumers. 8-bit color was used in many different applications including:<ref>{{Cite web|title=When Atari Ruled the World|url=https://www.pcmag.com/opinions/when-atari-ruled-the-world|access-date=2021-09-17|website=PCMAG|language=en}}</ref>{{failed verification|date=September 2021}}
*The MSX2 series of personal computer
*The [[MSX2]] series of personal computer
*The Uzebox gaming console
*The [[Uzebox]] gaming console
*The Atari Falcon
*The [[Atari Falcon]]
*The NTSC version of the Atari GITA
*The NTSC version of the Atari [[GTIA]]
*The Tiki 100 personal computer (limited to 16 simultaneous color display)
*The [[Tiki 100]] personal computer (limited to 16 simultaneous color display)
*The [[Research Machines 380Z]] computer equipped with a High Resolution Graphics board.
*Wearable OS smartwatches with ambient displays
*Wearable OS smartwatches with ambient displays
*Many scanners use an 8-bit grey scale as their standard
*Many scanners use an 8-bit grey scale as their standard


The [[Video Graphics Array|VGA]] standard for graphical interface used a redefinable 256 color (8-bit) color palette, although these were selected from an [[Color depth#18-bit|18-bit]] (6-bit per RGB channel, 262,144 colors) gamut.<ref name=":1">{{Cite patent|number=US5574478A|title=VGA color system for personal computers|gdate=1996-11-12|invent1=Bril|invent2=Pett|inventor1-first=Vlad|inventor2-first=Boyd G.|url=https://patents.google.com/patent/US5574478/en}}</ref><ref name=":2">{{Cite web |date=2017-12-26 |title=Reading and writing 18-bit RGB VGA Palette (pal) files with C# |url=https://www.cyotek.com/blog/reading-and-writing-18-bit-rgb-vga-palette-pal-files-with-csharp |access-date=2023-03-27 |website=The Cyotek Blog |language=en}}</ref><ref name=":3">{{Cite web |title=VGA/SVGA Video Programming--Color Regsters |url=http://www.osdever.net/FreeVGA/vga/colorreg.htm |access-date=2023-03-27 |website=www.osdever.net}}</ref><ref name=":4">{{Cite web |title=VGA Palette Conversion \ VOGONS |url=https://www.vogons.org/viewtopic.php?t=38713 |access-date=2023-03-27 |website=www.vogons.org}}</ref> Developed in 1987 by IBM, the VGA interface supported a maximum resolution of 640x480 pixels. Due to this legacy, some image types such as [[GIF]] and [[TIFF]] use an 8-bit color palette system to store data.
Most notably, the [[Video Graphics Array|VGA]] standard for graphical interface uses a 8-bit color. Developed in 1987 by IBM, the VGA interface supported a maximum resolution of 640x480 pixels. Many different image types such as GIF and TIFF use an 8-bit color system to store data.


Even though it is now outdated for most consumer applications, 8-bit color encoding can still be useful in imaging systems with limited data bandwidth or memory capacity. For example, both [[Mars Exploration Rover|Mars Exploration Rovers]] used an 8-bit grayscale format for navigation imaging. <ref> {{cite report|authors=A. Kiely and M. Klimesh|title=The ICER Progressive Wavelet Image Compressor|url=https://ipnpr.jpl.nasa.gov/progress_report/42-155/155J.pdf}} </ref>
Even though it is now outdated for most consumer applications, 8-bit color encoding can still be useful in imaging systems with limited data bandwidth or memory capacity. For example, both [[Mars Exploration Rover]]s used an 8-bit grayscale format for navigation imaging.<ref>{{cite report|author1=A. Kiely |author2=M. Klimesh|title=The ICER Progressive Wavelet Image Compressor|url=https://ipnpr.jpl.nasa.gov/progress_report/42-155/155J.pdf}}</ref>


==Issues==
==Issues==
Due to the nature of the 8-bit system, most images have different color maps. Since an 8-bit color display can't display two images with different color maps at the same time, it is usually impossible to display two different 8-bit images on the same such display at the same time. In practice, in order to avoid this problem, most images don't use the full range of 256 colors. Another problem comes when doing image processing: whenever two images with different color maps are added to each other, the resulting image has to have a new color map created, meaning another quantization operation has to occur, making the resulting image an imperfect version of the expected result.<ref name="HIPR 8-bit Color Images" />
Due to the nature of the 8-bit system, most images have different color maps. Since an 8-bit color display can not display two images with different color maps at the same time, it is usually impossible to display two different 8-bit images on the same such display at the same time. In practice, in order to avoid this problem, most images do not use the full range of 256 colors. Another problem comes when doing image processing: whenever two images with different color maps are added to each other, the resulting image has to have a new color map created, meaning another quantization operation has to occur, making the resulting image an imperfect version of the expected result.<ref name="HIPR 8-bit Color Images" />


==8-bit color today==
==8-bit color today==
Currently, most graphics hardware runs in 24-bit truecolor or 32-bit truecolor (24-bit truecolor and an 8-bit [[alpha channel]]). However, some remote desktop software ([[Virtual Network Computing]], [[Remote Desktop Protocol]]) can switch to 8-bit color to conserve [[Bandwidth (computing)|bandwidth]]. With the comparative low cost and high speeds of modern computers, some image editing is even done in a [[Raw image format|raw]] format with anywhere form 12-14 bits from each of the camera's [[image sensor]] [[pixel|pixels]] in order to avoid image quality reduction while editing.<ref name="Benefits of 16-bit Images">{{cite web |last1=Patterson |first1=Steve |title=The Benefits Of Working With 16-Bit Images In Photoshop |url=https://www.photoshopessentials.com/essentials/16-bit/ |website=Photoshop Essentials |publisher=Photoshop Essentials |accessdate=14 November 2019}}</ref>
Currently, most graphics hardware runs in 24-bit truecolor or 32-bit truecolor (24-bit truecolor and an 8-bit [[alpha channel]]). However, some remote desktop software ([[Virtual Network Computing]], [[Remote Desktop Protocol]]) can switch to 8-bit color to conserve [[Bandwidth (computing)|bandwidth]]. With the comparative low cost and high speeds of modern computers, some image editing is even done in a [[Raw image format|raw]] format with anywhere from 12 to 14 bits from each of the camera's [[image sensor]] [[pixel]]s in order to avoid image quality reduction while editing.<ref name="Benefits of 16-bit Images">{{cite web |last1=Patterson |first1=Steve |title=The Benefits Of Working With 16-Bit Images In Photoshop |url=https://www.photoshopessentials.com/essentials/16-bit/ |website=Photoshop Essentials |publisher=Photoshop Essentials |access-date=14 November 2019}}</ref>


==See also==
==See also==
Line 38: Line 47:
*[[Color depth]]
*[[Color depth]]
*[[List of palettes]]
*[[List of palettes]]
*[[Indexed color]]


==References==
==References==
Line 44: Line 54:
{{DEFAULTSORT:8-Bit Color}}
{{DEFAULTSORT:8-Bit Color}}
[[Category:Color depths]]
[[Category:Color depths]]

{{Color-stub}}
{{Compu-graphics-stub}}

Latest revision as of 17:41, 2 June 2024

8-bit color graphics are a method of storing image information in a computer's memory or in an image file, so that each pixel is represented by 8 bits (1 byte). The maximum number of colors that can be displayed at any one time is 256 per pixel or 28.[1]

Color quantization[edit]

8-bit color, with three bits of red, three bits of green, and two bits of blue.

In order to turn a true color 24-bit image into an 8-bit image, the image must go through a process called color quantization. Color quantization is the process of creating a color map for a less color dense image from a more dense image.[2]

The simplest form of quantization is to simply assign 3 bits to red, 3 bits to green and 2 bits to blue, as the human eye is less sensitive to blue light. This creates a so called 3-3-2 8-bit color image, arranged like on the following table:

Bit    7  6  5  4  3  2  1  0
Data   R  R  R  G  G  G  B  B

This process is sub optimal. There could be different groupings of colors that make evenly spreading the colors out inefficient and likely to misrepresent the actual image. An alternative approach is to use a palette, with each of the 256 possible indexes pointing towards a larger color space (ex: 256 colors chosen from 4096). Because the color map doesn't need to have every color in it and just needs to accurately represent the more color dense image, an arbitrary color can be assigned to each of the 256 available color indexes on the map.

Popular approaches for creating these maps (also known as palettes) include the popularity algorithm which chooses the 256 most common colors and creates a map from them. The more accurate median cut algorithm resorts and divides colors to find the median of different color groups resulting in a more accurate final color map.[3]

Usage[edit]

Because of the low amount of memory and resultant higher speeds of 8-bit color images, 8-bit color was a common ground among computer graphics development until more memory and higher CPU speeds became readily available to consumers. 8-bit color was used in many different applications including:[4][failed verification]

  • The MSX2 series of personal computer
  • The Uzebox gaming console
  • The Atari Falcon
  • The NTSC version of the Atari GTIA
  • The Tiki 100 personal computer (limited to 16 simultaneous color display)
  • The Research Machines 380Z computer equipped with a High Resolution Graphics board.
  • Wearable OS smartwatches with ambient displays
  • Many scanners use an 8-bit grey scale as their standard

The VGA standard for graphical interface used a redefinable 256 color (8-bit) color palette, although these were selected from an 18-bit (6-bit per RGB channel, 262,144 colors) gamut.[5][6][7][8] Developed in 1987 by IBM, the VGA interface supported a maximum resolution of 640x480 pixels. Due to this legacy, some image types such as GIF and TIFF use an 8-bit color palette system to store data.

Even though it is now outdated for most consumer applications, 8-bit color encoding can still be useful in imaging systems with limited data bandwidth or memory capacity. For example, both Mars Exploration Rovers used an 8-bit grayscale format for navigation imaging.[9]

Issues[edit]

Due to the nature of the 8-bit system, most images have different color maps. Since an 8-bit color display can not display two images with different color maps at the same time, it is usually impossible to display two different 8-bit images on the same such display at the same time. In practice, in order to avoid this problem, most images do not use the full range of 256 colors. Another problem comes when doing image processing: whenever two images with different color maps are added to each other, the resulting image has to have a new color map created, meaning another quantization operation has to occur, making the resulting image an imperfect version of the expected result.[1]

8-bit color today[edit]

Currently, most graphics hardware runs in 24-bit truecolor or 32-bit truecolor (24-bit truecolor and an 8-bit alpha channel). However, some remote desktop software (Virtual Network Computing, Remote Desktop Protocol) can switch to 8-bit color to conserve bandwidth. With the comparative low cost and high speeds of modern computers, some image editing is even done in a raw format with anywhere from 12 to 14 bits from each of the camera's image sensor pixels in order to avoid image quality reduction while editing.[10]

See also[edit]

References[edit]

  1. ^ a b Fisher, Robert; Perkins, Simon; Ashley, Walker; Wolfart, Erik. "8-bit Color Images". Hypermedia Image Processing Reference. University of Edinburgh. Retrieved 14 November 2019.
  2. ^ Fisher, Robert; Perkins, Simon; Walker, Ashley; Wolfart, Erik. "Color Quantization". Hypermedia Image Processing Reference. University of Edinburgh. Retrieved 14 November 2019.
  3. ^ Spring, Kenneth R.; Russ, John C. "Color Reduction and Image Dithering". Molecular Expressions Optical Microscopy Primer Digital Image Processing. Michael W. Davidson and The Florida State University. Archived from the original on 2 December 2020. Retrieved 14 November 2019.
  4. ^ "When Atari Ruled the World". PCMAG. Retrieved 2021-09-17.
  5. ^ US5574478A, Bril, Vlad & Pett, Boyd G., "VGA color system for personal computers", issued 1996-11-12 
  6. ^ "Reading and writing 18-bit RGB VGA Palette (pal) files with C#". The Cyotek Blog. 2017-12-26. Retrieved 2023-03-27.
  7. ^ "VGA/SVGA Video Programming--Color Regsters". www.osdever.net. Retrieved 2023-03-27.
  8. ^ "VGA Palette Conversion \ VOGONS". www.vogons.org. Retrieved 2023-03-27.
  9. ^ A. Kiely; M. Klimesh. The ICER Progressive Wavelet Image Compressor (PDF) (Report).
  10. ^ Patterson, Steve. "The Benefits Of Working With 16-Bit Images In Photoshop". Photoshop Essentials. Photoshop Essentials. Retrieved 14 November 2019.