Louis Poinsot: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Jm34harvey
Undid revision 494303983 by Jm34harvey (talk) Oops! s/b John Poinsot
 
No edit summary
Line 1: Line 1:
Greetings. Let me start by telling you the writer's name - Phebe. My working day job is a meter reader. North Dakota is her birth location but she will have to transfer one day or another. One of the things he enjoys most is ice skating but he is having difficulties to find time for it.<br><br>my website :: [http://Tekbizlive.net/dietmeals23439 tekbizlive.net]
{{lowercase|title=sRGB}}
[[Image:Cie Chart with sRGB gamut by spigget.png|250px|right|thumb|CIE 1931 xy [[chromaticity diagram]] showing the [[gamut]] of the sRGB color space and location of the primaries. The D65 [[white point]] is shown in the center. The Planckian locus is shown with color temperatures labeled in [[kelvin]]. The outer curved boundary is the spectral (or monochromatic) locus, with wavelengths shown in nanometers (labeled in blue). Note that the colors in this displayed file are being specified using sRGB. Areas outside the triangle cannot be accurately colored because they are out of the gamut of sRGB therefore they have been interpreted. Also note how the D65 label is not an ideal 6500-kelvin [[blackbody]] because it is based on atmospheric filtered daylight.]]
 
[[Image:SRGB gamma.svg|thumb|250px|right|Plot of the sRGB intensities versus sRGB numerical values (red), and this function's slope in log-log space (blue) which is the effective gamma at each point. Below a compressed value of 0.04045 or a linear intensity of 0.00313, the curve is linear so the gamma is 1. Behind the red curve is a dashed black curve showing an exact gamma = 2.2 power law.]]
 
'''sRGB''' is a standard [[RGB color space]] created cooperatively by [[Hewlett-Packard|HP]] and [[Microsoft]] in 1996 for use on monitors, printers and the [[Internet]].
 
sRGB uses the [[Rec. 709|ITU-R BT.709]] primaries, the same as are used in studio monitors and [[HDTV]],<ref>{{cite book | title = Digital Video and HDTV: Algorithms and Interfaces | author = Charles A. Poynton | publisher = Morgan Kaufmann | year = 2003 | isbn = 1-55860-792-7 | url = http://books.google.com/books?id=ra1lcAwgvq4C&pg=RA1-PA239&dq=rec+709+smpte }}</ref> and a transfer function ([[gamma correction|gamma curve]]) typical of [[Cathode ray tube|CRTs]]. This specification allowed sRGB to be directly displayed on typical CRT monitors of the time, a factor which greatly aided its acceptance.
 
Unlike most other [[RGB color space]]s, the sRGB [[Gamma correction|gamma]] cannot be expressed as a single numerical value. The overall gamma is approximately 2.2, consisting of a linear (gamma 1.0) section near black, and a non-linear section elsewhere involving a 2.4 exponent and a gamma (slope of log output versus log input) changing from 1.0 through about 2.3.
 
==Background==
 
The sRGB color space has been endorsed by the [[World Wide Web Consortium|W3C]], [[Exif]], [[Intel]], [[Pantone]], [[Corel]], and many other industry players. It is used in proprietary and open [[graphics file format]]s, such as [[Scalable Vector Graphics|SVG]].
 
The sRGB color space is well specified and is designed to match  typical home and office viewing conditions, rather than the darker environment typically used for commercial color matching.
 
Much software is now designed with the assumption that an 8-bit-per-channel image file placed unchanged onto an 8-bit-per-channel display will appear much as the sRGB specification recommends. [[LCD]]s, [[Digital photography|digital cameras]], printers, and scanners all follow the sRGB standard. Devices which do not naturally follow sRGB (like older CRT monitors did) include compensating circuitry or software so that, in the end, they also obey this standard. For this reason, one can generally assume, in the absence of embedded profiles or any other information, that any 8-bit-per-channel image file or any 8-bit-per-channel image [[Application programming interface|API]] or device interface can be treated as being in the sRGB color space. However, when the correct displaying of an RGB color space is needed, [[color management]] usually must be employed.
 
==The sRGB gamut==
 
sRGB defines the chromaticities of the red, green, and blue [[primary color|primaries]], the colors where one of the three channels is nonzero and the other two are zero.  The [[gamut]] of chromaticities that can be represented in sRGB is the [[color triangle]] defined by these primaries. As with any [[RGB color space]], for non-negative values of R, G, and B it is not possible to represent colors outside this triangle, which is well inside the range of colors visible to a human.
 
{| class="wikitable" align="left"
|-
! [[CIE 1931 color space#The CIE xy chromaticity diagram|Chromaticity]]
! Red
! Green
! Blue
! White point
|-
| ''x''
| 0.6400
| 0.3000
| 0.1500
| 0.3127
|-
| ''y''
| 0.3300
| 0.6000
| 0.0600
| 0.3290
|-
| ''Y''
| 0.2126
| 0.7153
| 0.0721
| 1.0000
|}
 
[[Image:srgbnonlinearity.png|frame|right|104px|On an sRGB display, each solid bar should look as bright as the surrounding striped dither. (Note: must be viewed at original, 100% size)]]
 
sRGB also defines a nonlinear transformation between the intensity of these primaries and the actual number stored. The curve is similar to the gamma response of a CRT display. It is more important to replicate this curve than the primaries to get correct display of an sRGB image. This nonlinear conversion means that sRGB is a reasonably efficient use of the values in an integer-based image file to display human-discernible light levels.
 
sRGB is sometimes avoided by high-end print publishing professionals because its color gamut is not big enough, especially in the blue-green colors, to include all the colors that can be reproduced in [[CMYK]] printing.
 
== Specification of the transformation ==
===The forward transformation (CIE xyY or CIE XYZ to sRGB)===
The first step in the calculation of sRGB tristimulus values from the [[CIE 1931 color space|CIE XYZ]] tristimulus values is a linear transformation, which may be carried out by a matrix multiplication.  The numerical values below match those in the official sRGB specification (IEC 61966-2-1:1999) and differ slightly from those in a publication by sRGB's creators.<ref name=orig_pub>{{cite web | url = http://www.w3.org/Graphics/Color/sRGB <!-- ALTERNATIVE URL: http://www.color.org/sRGB.xalter --> | title = A Standard Default Color Space for the Internet – sRGB, Version 1.10 | author = Michael Stokes, Matthew Anderson, Srinivasan Chandrasekar, Ricardo Motta | date = November 5, 1996}}</ref> Note that these linear values are ''not''&nbsp;the final result.
 
:<math>
\begin{bmatrix}
R_\mathrm{linear}\\G_\mathrm{linear}\\B_\mathrm{linear}\end{bmatrix}=
\begin{bmatrix}
3.2406&-1.5372&-0.4986\\
-0.9689&1.8758&0.0415\\
0.0557&-0.2040&1.0570
\end{bmatrix}
\begin{bmatrix}
X \\
Y \\
Z \end{bmatrix}
</math>
 
Note also, that if the [[CIE xyY]] color space values are given (where ''x'', ''y'' are the chromaticity coordinates and ''Y'' is the [[luminance]]), they must first be transformed to CIE XYZ tristimulus values by:
 
:<math>X = Y  x / y,\,</math>
:<math>Z = Y  (1- x - y)/y\,</math>
 
The intermediate parameters <math>R_\mathrm{linear}</math>, <math>G_\mathrm{linear}</math> and <math>B_\mathrm{linear}</math> for in-gamut colors are defined to be in the range [0,1], which means that the initial ''X'', ''Y'', and ''Z'' values need to be similarly scaled (if you start with XYZ values going to 100 or so, divide them by 100 first, or apply the matrix and then scale by a constant factor to the [0,1] range).  The linear RGB values are usually clipped to that range, with display white represented as (1,1,1); the corresponding original XYZ values are such that white is [[CIE Standard Illuminant D65|D65]] with unit luminance (''X'',''Y'',''Z'' = 0.9505, 1.0000, 1.0890). Calculations assume the 2° [[standard colorimetric observer]].<ref name=orig_pub/>
 
sRGB was designed to reflect a typical real-world monitor with a gamma of 2.2, and the following formula transforms the linear values into sRGB. Let <math>C_\mathrm{linear}</math> be <math>R_\mathrm{linear}</math>, <math>G_\mathrm{linear}</math>, or <math>B_\mathrm{linear}</math>, and <math>C_\mathrm{srgb}</math> be <math>R_\mathrm{srgb}</math>, <math>G_\mathrm{srgb}</math> or <math>B_\mathrm{srgb}</math>:
 
:<math>C_\mathrm{srgb}=\begin{cases}
12.92C_\mathrm{linear}, & C_\mathrm{linear} \le 0.0031308\\
(1+a)C_\mathrm{linear}^{1/2.4}-a, & C_\mathrm{linear} > 0.0031308
\end{cases}
</math>
*where <math>a = 0.055</math>
These gamma-corrected values are in the range 0 to 1. If values in the range 0 to 255 are required, e.g. for video display or 8-bit graphics, the usual technique is to multiply by 255 and round to an integer.
 
===The reverse transformation===
Again the sRGB component values <math>R_\mathrm{srgb}</math>, <math>G_\mathrm{srgb}</math>, <math>B_\mathrm{srgb}</math> are in the range 0 to 1. (A range of 0 to 255 can simply be divided by 255).
:<math>C_\mathrm{linear}=
\begin{cases}\frac{C_\mathrm{srgb}}{12.92}, & C_\mathrm{srgb}\le0.04045\\
\left(\frac{C_\mathrm{srgb}+a}{1+a}\right)^{2.4}, & C_\mathrm{srgb}>0.04045
\end{cases}
</math>
 
(where <math>C</math> is <math>R</math>, <math>G</math>, or <math>B</math>). Followed by a matrix multiplication of the linear values to get XYZ:
 
:<math>
\begin{bmatrix}
X\\Y\\Z\end{bmatrix}=
\begin{bmatrix}
0.4124&0.3576&0.1805\\
0.2126&0.7152&0.0722\\
0.0193&0.1192&0.9502
\end{bmatrix}
\begin{bmatrix}
R_\mathrm{linear}\\
G_\mathrm{linear}\\
B_\mathrm{linear}\end{bmatrix}
</math>
 
== Theory of the transformation ==
 
It is often casually stated that the [[gamma correction|decoding gamma]] for sRGB data is 2.2, yet the above transform shows an exponent of 2.4. This is because the net effect of the piecewise decomposition is necessarily a changing instantaneous gamma at each point in the range: it goes from gamma = 1 at zero to a gamma of 2.4 at maximum intensity with a median value being close to 2.2. The transformation was designed to approximate a gamma of about 2.2, but with a linear portion near zero to avoid having an infinite slope at ''K''&nbsp;= 0, which can cause numerical problems. The continuity condition for the curve <math>C_\mathrm{linear}</math> which is defined above as a piecewise function of <math>C_\mathrm{srgb}</math>, is
 
:<math>\left(\frac{K_0+a}{1+a}\right)^\gamma=\frac{K_0}{\phi}.</math>
 
Solving with <math>\gamma = 2.4</math> and the standard value <math>\phi=12.92</math> yields two solutions, <math>K_0</math> ≈ <math>0.0381548</math> or <math>K_0</math> ≈ <math>0.0404482</math>. The IEC 61966-2-1 standard uses the rounded value <math>K_0=0.04045</math>. However, if we impose the condition that the slopes match as well then we must have
 
:<math>\gamma\left(\frac{K_0+a}{1+a}\right)^{\gamma-1}\left(\frac{1}{1+a}\right)=\frac{1}{\phi}.</math>
 
We now have two equations. If we take the two unknowns to be <math>K_0</math> and <math>\phi</math> then we can solve to give
 
:<math>K_0=\frac{a}{\gamma-1},\ \ \ \phi=\frac{(1+a)^\gamma(\gamma-1)^{\gamma-1}}{(a^{\gamma-1})(\gamma^\gamma)}.</math>
 
Substituting <math>a=0.055</math> and <math>\gamma=2.4</math> gives <math>K_0</math> ≈ <math>0.0392857</math> and <math>\phi</math> ≈ <math>12.9232102</math>, with the corresponding linear-domain threshold at <math>K_0 / \phi</math> ≈ <math>0.00303993</math>. These values, rounded to <math>K_0=0.03928</math>, <math>\phi=12.92321</math>, and <math>K_0/\phi=0.00304</math>, are sometimes used to describe sRGB conversion.<ref>{{cite book | title = Colour Engineering: Achieving Device Independent Colour | author = Phil Green and Lindsay W. MacDonald | publisher = John Wiley and Sons| url = http://books.google.com/books?id=tn09voxr6agC&pg=PA350&dq=srgb+0.03928+date:0-2002 | year = 2002 | isbn = 0-471-48688-4 }}</ref> Publications by sRGB's creators<ref name=orig_pub/> rounded to <math>K_0=0.03928</math> and <math>\phi=12.92</math>, resulting in a small discontinuity in the curve. Some authors adopted these values in spite of the discontinuity.<ref>{{cite book | title = Acquisition and Reproduction of Color Images: Colorimetric and Multispectral Approaches | author = Jon Y. Hardeberg | url = http://books.google.com/books?id=e2umTIdI2u4C&pg=PA40&dq=srgb+0.00304+date:0-2002 | publisher = Universal-Publishers.com | year = 2001 | isbn = 1-58112-135-0 }}</ref> For the standard, the rounded value <math>\phi=12.92</math> was kept and the <math>K_0</math> value was recomputed to make the resulting curve continuous, as described above, resulting in a slope discontinuity from 12.92 below the intersection to 12.70 above.
 
== Viewing environment ==
 
{| class="wikitable"
|-
! Parameter
! Value
|-
| Luminance level
| 80&nbsp;cd/m<sup>2</sup>
|-
| Illuminant white point
| ''x'' = 0.3127, ''y'' = 0.3291 (D65)
|-
| Image surround reflectance
| 20% (~medium gray)
|-
| Encoding ambient illuminance level
| 64 lux
|-
| Encoding ambient white point
| ''x'' = 0.3457, ''y'' = 0.3585 (D50)
|-
| Encoding viewing flare
| 1.0%
|-
| Typical ambient illuminance level
| 200 lux
|-
| Typical ambient white point
| ''x'' = 0.3457, ''y'' = 0.3585 (D50)
|-
| Typical viewing flare
| 5.0%
|}
The sRGB specification assumes a dimly lit encoding (creation) environment with an ambient correlated color temperature (CCT) of 5000 K. It is interesting to note that this differs from the CCT of the illuminant (D65). Using D50 for both would have made the white point of most photographic paper appear excessively blue.<ref>{{cite book|url=http://books.google.com/books?id=jFl-3v9sSEUC&pg=PA121&lpg=PA121&dq=%22My+suggestion+is+to+calibrate+to+a+D65+white+point.%22|first=Andrew|last=Rodney|publisher=Focal Press|year=2005|isbn=978-0-240-80649-5|title=Color Management for Photographers|page=121|quote=[http://www.xrite.com/product_overview.aspx?ID=592&Action=Support&SupportID=3349 Why Calibrate Monitor to D65 When Light Booth is D50]}}</ref> The other parameters, such as the luminance level, are representative of a typical CRT monitor.
 
For optimal results, the [[International Color Consortium|ICC]] recommends using the encoding viewing environment (i.e., dim, diffuse lighting) rather than the less-stringent typical viewing environment.<ref name=orig_pub/>
 
==Usage==
{{Refimprove section|date=July 2010}}
Due to the standardization of sRGB on the Internet, on computers, and on printers, many low- to medium-end consumer [[digital camera]]s and [[Image scanner|scanners]] use sRGB as the [[Default (computer science)|default]] (or only available) working color space. As the sRGB gamut meets or exceeds the gamut of a low-end [[inkjet printer]], an sRGB image is often regarded as satisfactory for home use. However, consumer-level [[Charge-coupled device|CCDs]] are typically uncalibrated, meaning that even though the image is being labeled as sRGB, one can't conclude that the image is color-accurate sRGB.
 
If the color space of an image is unknown and it is an 8- to 16-bit image format, assuming it is in the sRGB color space is a safe choice. This allows a program to identify a color space for all images, which may be much easier and more reliable than trying to track the "unknown" color space. An [[ICC profile]] may be used; the ICC distributes three such profiles:<ref>[http://color.org/srgbprofiles.xalter sRGB profiles], ICC</ref> a profile conforming to version 4 of the ICC specification, which they recommend, and two profiles conforming to version 2, which is still commonly used.
 
Images intended for professional printing via a fully color-managed workflow, e.g. [[prepress]] output, sometimes use another color space such as [[Adobe RGB color space|Adobe RGB (1998)]], which allows for a wider gamut. If such images are to be used on the Internet they may be converted to sRGB using [[color management]] tools that are usually included with software that works in these other color spaces.
 
The two dominant programming interfaces for 3D graphics, [[OpenGL]] and [[Microsoft Direct3D|Direct3D]], have both incorporated half part support for the sRGB color space by using sRGB's gamma curve.
OpenGL supports the [[Texture mapping|textures]] with sRGB gamma encoded color components (first introduced with [http://www.opengl.org/registry/specs/EXT/texture_sRGB.txt EXT_texture_sRGB extension], added to the core in OpenGL 2.1) and rendering into sRGB gamma encoded [[framebuffer]]s (first introduced with [http://www.opengl.org/registry/specs/EXT/framebuffer_sRGB.txt EXT_framebuffer_sRGB extension], added to the core in OpenGL 3.0). Direct3D supports sRGB gamma textures and rendering into sRGB gamma surfaces starting with DirectX 9. Correct [[mipmap]]ping and [[interpolation]] of sRGB gamma textures has direct hardware support in texturing units of most modern [[GPU]]s (for example nVidia GeForce 8 performs conversion from 8-bit texture to linear values before interpolating those values), and do not have any performance penalty.<ref>GPU Gems 3, section 24.4.1, http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html</ref>
 
==See also==
*[[RGB color space]]
*[[scRGB]]
 
==References==
 
<references/>
 
===Standards===
 
*  IEC 61966-2-1:1999 is the official specification of sRGB.  It provides viewing environment, encoding, and [[colorimetric]] details.
* Amendment A1:2003 to IEC 61966-2-1:1999 describes an analogous sYCC encoding for [[YCbCr]] color spaces, an extended-[[gamut]] RGB encoding, and a [[CIELAB]] transformation.
* sRGB on [http://www.color.org/chardata/rgb/srgb.xalter www.color.org]
* The fourth working draft of IEC 61966-2-1 is available online, but is not the complete standard. It can be downloaded from [http://www2.units.it/ipl/students_area/imm2/files/Colore1/sRGB.pdf www2.units.it].
 
==External links==
* [http://www.color.org/ International Color Consortium]
* [http://web.archive.org/web/20030124233043/http://www.srgb.com/ Archive copy of http://www.srgb.com], now unavailable, containing much information on the design, principles and use of sRGB
* [http://www.w3.org/Graphics/Color/sRGB A Standard Default Color Space for the Internet – sRGB] at [[World Wide Web Consortium|w3.org]]
* [http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_sRGB.txt OpenGL extension for sRGB gamma textures] at [[Silicon Graphics International|sgi.com]]
* [http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html Conversion matrices for RGB vs. XYZ conversion]
* [http://ninedegreesbelow.com/photography/srgb-profile-comparison.html Will the Real sRGB Profile Please Stand Up?]
 
{{Color space}}
 
[[Category:Color space]]
[[Category:Film and video technology]]

Revision as of 01:38, 1 January 2014

Template:Lowercase

CIE 1931 xy chromaticity diagram showing the gamut of the sRGB color space and location of the primaries. The D65 white point is shown in the center. The Planckian locus is shown with color temperatures labeled in kelvin. The outer curved boundary is the spectral (or monochromatic) locus, with wavelengths shown in nanometers (labeled in blue). Note that the colors in this displayed file are being specified using sRGB. Areas outside the triangle cannot be accurately colored because they are out of the gamut of sRGB therefore they have been interpreted. Also note how the D65 label is not an ideal 6500-kelvin blackbody because it is based on atmospheric filtered daylight.
Plot of the sRGB intensities versus sRGB numerical values (red), and this function's slope in log-log space (blue) which is the effective gamma at each point. Below a compressed value of 0.04045 or a linear intensity of 0.00313, the curve is linear so the gamma is 1. Behind the red curve is a dashed black curve showing an exact gamma = 2.2 power law.

sRGB is a standard RGB color space created cooperatively by HP and Microsoft in 1996 for use on monitors, printers and the Internet.

sRGB uses the ITU-R BT.709 primaries, the same as are used in studio monitors and HDTV,[1] and a transfer function (gamma curve) typical of CRTs. This specification allowed sRGB to be directly displayed on typical CRT monitors of the time, a factor which greatly aided its acceptance.

Unlike most other RGB color spaces, the sRGB gamma cannot be expressed as a single numerical value. The overall gamma is approximately 2.2, consisting of a linear (gamma 1.0) section near black, and a non-linear section elsewhere involving a 2.4 exponent and a gamma (slope of log output versus log input) changing from 1.0 through about 2.3.

Background

The sRGB color space has been endorsed by the W3C, Exif, Intel, Pantone, Corel, and many other industry players. It is used in proprietary and open graphics file formats, such as SVG.

The sRGB color space is well specified and is designed to match typical home and office viewing conditions, rather than the darker environment typically used for commercial color matching.

Much software is now designed with the assumption that an 8-bit-per-channel image file placed unchanged onto an 8-bit-per-channel display will appear much as the sRGB specification recommends. LCDs, digital cameras, printers, and scanners all follow the sRGB standard. Devices which do not naturally follow sRGB (like older CRT monitors did) include compensating circuitry or software so that, in the end, they also obey this standard. For this reason, one can generally assume, in the absence of embedded profiles or any other information, that any 8-bit-per-channel image file or any 8-bit-per-channel image API or device interface can be treated as being in the sRGB color space. However, when the correct displaying of an RGB color space is needed, color management usually must be employed.

The sRGB gamut

sRGB defines the chromaticities of the red, green, and blue primaries, the colors where one of the three channels is nonzero and the other two are zero. The gamut of chromaticities that can be represented in sRGB is the color triangle defined by these primaries. As with any RGB color space, for non-negative values of R, G, and B it is not possible to represent colors outside this triangle, which is well inside the range of colors visible to a human.

Chromaticity Red Green Blue White point
x 0.6400 0.3000 0.1500 0.3127
y 0.3300 0.6000 0.0600 0.3290
Y 0.2126 0.7153 0.0721 1.0000
On an sRGB display, each solid bar should look as bright as the surrounding striped dither. (Note: must be viewed at original, 100% size)

sRGB also defines a nonlinear transformation between the intensity of these primaries and the actual number stored. The curve is similar to the gamma response of a CRT display. It is more important to replicate this curve than the primaries to get correct display of an sRGB image. This nonlinear conversion means that sRGB is a reasonably efficient use of the values in an integer-based image file to display human-discernible light levels.

sRGB is sometimes avoided by high-end print publishing professionals because its color gamut is not big enough, especially in the blue-green colors, to include all the colors that can be reproduced in CMYK printing.

Specification of the transformation

The forward transformation (CIE xyY or CIE XYZ to sRGB)

The first step in the calculation of sRGB tristimulus values from the CIE XYZ tristimulus values is a linear transformation, which may be carried out by a matrix multiplication. The numerical values below match those in the official sRGB specification (IEC 61966-2-1:1999) and differ slightly from those in a publication by sRGB's creators.[2] Note that these linear values are not the final result.

Note also, that if the CIE xyY color space values are given (where x, y are the chromaticity coordinates and Y is the luminance), they must first be transformed to CIE XYZ tristimulus values by:

The intermediate parameters , and for in-gamut colors are defined to be in the range [0,1], which means that the initial X, Y, and Z values need to be similarly scaled (if you start with XYZ values going to 100 or so, divide them by 100 first, or apply the matrix and then scale by a constant factor to the [0,1] range). The linear RGB values are usually clipped to that range, with display white represented as (1,1,1); the corresponding original XYZ values are such that white is D65 with unit luminance (X,Y,Z = 0.9505, 1.0000, 1.0890). Calculations assume the 2° standard colorimetric observer.[2]

sRGB was designed to reflect a typical real-world monitor with a gamma of 2.2, and the following formula transforms the linear values into sRGB. Let be , , or , and be , or :

These gamma-corrected values are in the range 0 to 1. If values in the range 0 to 255 are required, e.g. for video display or 8-bit graphics, the usual technique is to multiply by 255 and round to an integer.

The reverse transformation

Again the sRGB component values , , are in the range 0 to 1. (A range of 0 to 255 can simply be divided by 255).

(where is , , or ). Followed by a matrix multiplication of the linear values to get XYZ:

Theory of the transformation

It is often casually stated that the decoding gamma for sRGB data is 2.2, yet the above transform shows an exponent of 2.4. This is because the net effect of the piecewise decomposition is necessarily a changing instantaneous gamma at each point in the range: it goes from gamma = 1 at zero to a gamma of 2.4 at maximum intensity with a median value being close to 2.2. The transformation was designed to approximate a gamma of about 2.2, but with a linear portion near zero to avoid having an infinite slope at K = 0, which can cause numerical problems. The continuity condition for the curve which is defined above as a piecewise function of , is

Solving with and the standard value yields two solutions, or . The IEC 61966-2-1 standard uses the rounded value . However, if we impose the condition that the slopes match as well then we must have

We now have two equations. If we take the two unknowns to be and then we can solve to give

Substituting and gives and , with the corresponding linear-domain threshold at . These values, rounded to , , and , are sometimes used to describe sRGB conversion.[3] Publications by sRGB's creators[2] rounded to and , resulting in a small discontinuity in the curve. Some authors adopted these values in spite of the discontinuity.[4] For the standard, the rounded value was kept and the value was recomputed to make the resulting curve continuous, as described above, resulting in a slope discontinuity from 12.92 below the intersection to 12.70 above.

Viewing environment

Parameter Value
Luminance level 80 cd/m2
Illuminant white point x = 0.3127, y = 0.3291 (D65)
Image surround reflectance 20% (~medium gray)
Encoding ambient illuminance level 64 lux
Encoding ambient white point x = 0.3457, y = 0.3585 (D50)
Encoding viewing flare 1.0%
Typical ambient illuminance level 200 lux
Typical ambient white point x = 0.3457, y = 0.3585 (D50)
Typical viewing flare 5.0%

The sRGB specification assumes a dimly lit encoding (creation) environment with an ambient correlated color temperature (CCT) of 5000 K. It is interesting to note that this differs from the CCT of the illuminant (D65). Using D50 for both would have made the white point of most photographic paper appear excessively blue.[5] The other parameters, such as the luminance level, are representative of a typical CRT monitor.

For optimal results, the ICC recommends using the encoding viewing environment (i.e., dim, diffuse lighting) rather than the less-stringent typical viewing environment.[2]

Usage

Template:Refimprove section Due to the standardization of sRGB on the Internet, on computers, and on printers, many low- to medium-end consumer digital cameras and scanners use sRGB as the default (or only available) working color space. As the sRGB gamut meets or exceeds the gamut of a low-end inkjet printer, an sRGB image is often regarded as satisfactory for home use. However, consumer-level CCDs are typically uncalibrated, meaning that even though the image is being labeled as sRGB, one can't conclude that the image is color-accurate sRGB.

If the color space of an image is unknown and it is an 8- to 16-bit image format, assuming it is in the sRGB color space is a safe choice. This allows a program to identify a color space for all images, which may be much easier and more reliable than trying to track the "unknown" color space. An ICC profile may be used; the ICC distributes three such profiles:[6] a profile conforming to version 4 of the ICC specification, which they recommend, and two profiles conforming to version 2, which is still commonly used.

Images intended for professional printing via a fully color-managed workflow, e.g. prepress output, sometimes use another color space such as Adobe RGB (1998), which allows for a wider gamut. If such images are to be used on the Internet they may be converted to sRGB using color management tools that are usually included with software that works in these other color spaces.

The two dominant programming interfaces for 3D graphics, OpenGL and Direct3D, have both incorporated half part support for the sRGB color space by using sRGB's gamma curve. OpenGL supports the textures with sRGB gamma encoded color components (first introduced with EXT_texture_sRGB extension, added to the core in OpenGL 2.1) and rendering into sRGB gamma encoded framebuffers (first introduced with EXT_framebuffer_sRGB extension, added to the core in OpenGL 3.0). Direct3D supports sRGB gamma textures and rendering into sRGB gamma surfaces starting with DirectX 9. Correct mipmapping and interpolation of sRGB gamma textures has direct hardware support in texturing units of most modern GPUs (for example nVidia GeForce 8 performs conversion from 8-bit texture to linear values before interpolating those values), and do not have any performance penalty.[7]

See also

References

  1. 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  2. 2.0 2.1 2.2 2.3 Template:Cite web
  3. 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  4. 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  5. 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  6. sRGB profiles, ICC
  7. GPU Gems 3, section 24.4.1, http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html

Standards

  • IEC 61966-2-1:1999 is the official specification of sRGB. It provides viewing environment, encoding, and colorimetric details.
  • Amendment A1:2003 to IEC 61966-2-1:1999 describes an analogous sYCC encoding for YCbCr color spaces, an extended-gamut RGB encoding, and a CIELAB transformation.
  • sRGB on www.color.org
  • The fourth working draft of IEC 61966-2-1 is available online, but is not the complete standard. It can be downloaded from www2.units.it.

External links

Template:Color space