Merge branch 'master' into add-hsv

This commit is contained in:
John Cupitt 2015-06-22 09:35:41 +01:00
commit bdc96844bd
3 changed files with 197 additions and 145 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,24 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819" width="744.09448819"
height="1052.3622047" height="1052.3622047"
id="svg1431" id="svg1431"
sodipodi:version="0.32" sodipodi:version="0.32"
inkscape:version="0.43" inkscape:version="0.91 r13725"
sodipodi:docbase="/home/john/CVS_DEVEL/vips-7.11/doc/src/figs"
sodipodi:docname="interconvert.svg" sodipodi:docname="interconvert.svg"
inkscape:export-filename="/home/john/CVS_DEVEL/vips-7.11/doc/src/figs/interconvert.png" inkscape:export-filename="/home/john/CVS_DEVEL/vips-7.11/doc/src/figs/interconvert.png"
inkscape:export-xdpi="90" inkscape:export-xdpi="90"
inkscape:export-ydpi="90"> inkscape:export-ydpi="90"
version="1.1">
<defs <defs
id="defs1433"> id="defs1433">
<marker <marker
@ -99,7 +100,7 @@
xlink:href="#linearGradient3766" xlink:href="#linearGradient3766"
id="linearGradient1533" id="linearGradient1533"
gradientUnits="userSpaceOnUse" gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.849266,0,0,0.598685,247.81,161.7982)" gradientTransform="matrix(0.849266,0,0,0.598685,270.69186,166.87573)"
x1="158.72054" x1="158.72054"
y1="0.55397713" y1="0.55397713"
x2="158.86745" x2="158.86745"
@ -174,6 +175,26 @@
y1="0.55397713" y1="0.55397713"
x2="158.86745" x2="158.86745"
y2="185.72389" /> y2="185.72389" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3766"
id="linearGradient3418"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.849266,0,0,0.598685,348.69186,166.87573)"
x1="158.72054"
y1="0.55397713"
x2="158.86745"
y2="185.72389" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3766"
id="linearGradient3436"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.849266,0,0,0.598685,408.69186,166.87573)"
x1="158.72054"
y1="0.55397713"
x2="158.86745"
y2="185.72389" />
</defs> </defs>
<sodipodi:namedview <sodipodi:namedview
id="base" id="base"
@ -182,15 +203,17 @@
borderopacity="1.0" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="1.3548828" inkscape:zoom="1.900852"
inkscape:cx="276.197" inkscape:cx="224.42228"
inkscape:cy="811.45446" inkscape:cy="860.87629"
inkscape:document-units="px" inkscape:document-units="px"
inkscape:current-layer="layer1" inkscape:current-layer="layer1"
inkscape:window-width="917" inkscape:window-width="1920"
inkscape:window-height="766" inkscape:window-height="1052"
inkscape:window-x="721" inkscape:window-x="0"
inkscape:window-y="190" /> inkscape:window-y="0"
showgrid="false"
inkscape:window-maximized="1" />
<metadata <metadata
id="metadata1436"> id="metadata1436">
<rdf:RDF> <rdf:RDF>
@ -279,28 +302,27 @@
style="fill:#ffffff;fill-opacity:1;stroke:none">LCh</tspan></text> style="fill:#ffffff;fill-opacity:1;stroke:none">LCh</tspan></text>
</g> </g>
<g <g
transform="translate(22.88186,5.077526)" id="g3405">
id="g1525">
<rect <rect
style="fill:url(#linearGradient1533);fill-opacity:1;stroke:#000000;stroke-width:2.30000234;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" style="fill:url(#linearGradient1533);fill-opacity:1;stroke:#000000;stroke-width:2.30000234;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1527" id="rect1527"
width="43.156143" width="43.156143"
height="41.603222" height="41.603222"
x="328.2677" x="351.14957"
y="195.32306" y="200.40059"
ry="20.801611" ry="20.801611"
rx="21.578072" /> rx="21.578072" />
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="349.58502" x="372.46689"
y="220.5983" y="225.67583"
id="text1529"><tspan id="text1529"><tspan
style="fill:#ffffff;fill-opacity:1;stroke:none" style="fill:#ffffff;fill-opacity:1;stroke:none"
id="tspan1531" id="tspan1531"
sodipodi:role="line" sodipodi:role="line"
x="349.58502" x="372.46689"
y="220.5983">disp</tspan></text> y="225.67583">scRGB</tspan></text>
</g> </g>
<g <g
id="g1535" id="g1535"
@ -422,70 +444,68 @@
style="fill:#ffffff;fill-opacity:1;stroke:none">ICC</tspan></text> style="fill:#ffffff;fill-opacity:1;stroke:none">ICC</tspan></text>
</g> </g>
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="M 141.55754,198.25776 L 181.4801,198.25776" d="m 140.40754,198.25776 42.22256,0"
id="path1639" id="path1639"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1495" inkscape:connection-start="#g1495"
inkscape:connection-end="#g1468" /> inkscape:connection-end="#g1468"
inkscape:connector-curvature="0" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend)"
d="M 181.76199,220.20937 L 141.27566,259.80364" d="m 189.04639,213.08547 -55.05513,53.84207"
id="path1645" id="path1645"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1468" inkscape:connection-start="#g1468"
inkscape:connection-end="#g1555" /> inkscape:connection-end="#g1555"
inkscape:connector-curvature="0" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="M 181.76199,176.30615 L 141.27566,136.71188" d="M 189.04639,183.43005 135.50974,127.78401"
id="path1647" id="path1647"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1468" /> inkscape:connection-start="#g1468"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="M 226.93624,216.42658 L 265.73981,247.44614" d="m 220.83339,211.54796 51.00927,40.7768"
id="path1685" id="path1685"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1468" inkscape:connection-start="#g1468"
inkscape:connection-end="#g1475" /> inkscape:connection-end="#g1475"
inkscape:connector-curvature="0" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="M 226.93624,180.08894 L 265.73981,149.06938" d="m 220.83339,184.96756 51.00927,-40.7768"
id="path1687" id="path1687"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1468" inkscape:connection-start="#g1468"
inkscape:connection-end="#g1505" /> inkscape:connection-end="#g1505"
inkscape:connector-curvature="0" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend)"
d="M 311.19595,130.90056 L 349.99956,130.90056" d="m 310.04595,130.90056 41.10361,0"
id="path1689" id="path1689"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1505" inkscape:connection-start="#g1505"
inkscape:connection-end="#g1545" /> inkscape:connection-end="#g1545"
inkscape:connector-curvature="0" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="M 311.19595,253.63514 L 349.99956,233.18201" d="m 307.41698,255.62702 45.97721,-24.95538"
id="path1691" id="path1691"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1475" inkscape:connector-curvature="0"
inkscape:connection-end="#g1525" /> sodipodi:nodetypes="cc" />
<path <path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.9;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);marker-mid:none;stroke-miterlimit:4;stroke-dasharray:none" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend)"
d="M 311.19595,277.99294 L 349.99956,299.12585" d="m 307.27147,275.85562 46.65257,25.40755"
id="path1693" id="path1693"
inkscape:connector-type="polyline" inkscape:connector-type="polyline"
inkscape:connection-start="#g1475" inkscape:connection-start="#g1475"
inkscape:connection-end="#g1535" /> inkscape:connection-end="#g1535"
<text inkscape:connector-curvature="0" />
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="408.81937"
y="224.40727"
id="text2764"><tspan
sodipodi:role="line"
id="tspan2766"
x="408.81937"
y="224.40727">Any VIPS RGB space</tspan></text>
<text <text
id="text2768" id="text2768"
y="326.40729" y="326.40729"
@ -501,5 +521,65 @@
x="94.858322" x="94.858322"
sodipodi:role="line" sodipodi:role="line"
id="tspan2772">an ICC profile</tspan></text> id="tspan2772">an ICC profile</tspan></text>
<g
id="g3423"
transform="translate(6,0)">
<rect
rx="21.578072"
ry="20.801611"
y="200.40059"
x="429.14957"
height="41.603222"
width="43.156143"
id="rect3412"
style="fill:url(#linearGradient3418);fill-opacity:1;stroke:#000000;stroke-width:2.30000234;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
id="text3414"
y="225.67583"
x="450.46689"
style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="225.67583"
x="450.46689"
sodipodi:role="line"
id="tspan3416"
style="fill:#ffffff;fill-opacity:1;stroke:none">sRGB</tspan></text>
</g>
<g
id="g3441"
transform="translate(30,0)">
<rect
style="fill:url(#linearGradient3436);fill-opacity:1;stroke:#000000;stroke-width:2.30000234;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3430"
width="43.156143"
height="41.603222"
x="489.14957"
y="200.40059"
ry="20.801611"
rx="21.578072" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="510.46689"
y="225.67583"
id="text3432"><tspan
style="fill:#ffffff;fill-opacity:1;stroke:none"
id="tspan3434"
sodipodi:role="line"
x="510.46689"
y="225.67583">HSV</tspan></text>
</g>
<path
inkscape:connector-curvature="0"
inkscape:connector-type="polyline"
id="path3446"
d="m 394.40754,222.25776 42.22256,0"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)"
d="m 478.40754,222.25776 42.22256,0"
id="path3448"
inkscape:connector-type="polyline"
inkscape:connector-curvature="0" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -57,19 +57,33 @@
* spaces, calculate colour differences, and move * spaces, calculate colour differences, and move
* to and from device spaces. * to and from device spaces.
* *
* All operations process colour from the first few bands and pass other bands
* through unaltered. This means you can operate on images with alpha channels
* safely. If you move to or from 16-bit RGB, any alpha channels are rescaled
* for you.
*
* Radiance images have four 8-bits bands and store 8 bits of R, G and B and * Radiance images have four 8-bits bands and store 8 bits of R, G and B and
* another 8 bits of exponent, common to all channels. They are widely used in * another 8 bits of exponent, common to all channels. They are widely used in
* the HDR imaging community. * the HDR imaging community.
* *
*
* The colour functions can be divided into three main groups. First, * The colour functions can be divided into three main groups. First,
* functions to transform images between the different colour spaces supported * functions to transform images between the different colour spaces supported
* by VIPS: <emphasis>RGB</emphasis>, <emphasis>sRGB</emphasis>, * by VIPS: #VIPS_INTERPRETATION_sRGB, #VIPS_INTERPRETATION_scRGB,
* <emphasis>XYZ</emphasis>, <emphasis>Yxy</emphasis>, * #VIPS_INTERPRETATION_B_W,
* <emphasis>Lab</emphasis>, <emphasis>LabQ</emphasis>, * #VIPS_INTERPRETATION_XYZ, #VIPS_INTERPRETATION_YXY,
* <emphasis>LabS</emphasis>, <emphasis>LCh</emphasis> and * #VIPS_INTERPRETATION_LAB,
* <emphasis>CMC</emphasis>). Use vips_colourspace() to move an image to a * #VIPS_INTERPRETATION_LCH, and
* #VIPS_INTERPRETATION_CMC.
*
* There are also a set of minor colourspaces which are one of the above in a
* slightly different format:
* #VIPS_INTERPRETATION_LAB, #VIPS_INTERPRETATION_LABQ,
* #VIPS_INTERPRETATION_LABS, #VIPS_INTERPRETATION_LCH,
* #VIPS_INTERPRETATION_RGB16, and #VIPS_INTERPRETATION_GREY16.
*
* Use vips_colourspace() to move an image to a
* target colourspace using the best sequence of colour transform operations. * target colourspace using the best sequence of colour transform operations.
*
* Secondly, there are a set of operations for * Secondly, there are a set of operations for
* calculating colour difference metrics. Finally, VIPS wraps LittleCMS and * calculating colour difference metrics. Finally, VIPS wraps LittleCMS and
* uses it to provide a set of operations for reading and writing images with * uses it to provide a set of operations for reading and writing images with
@ -77,105 +91,63 @@
* *
* This figure shows how the VIPS colour spaces interconvert: * This figure shows how the VIPS colour spaces interconvert:
* *
* <inlinegraphic fileref="interconvert.png" format="PNG" /> * <para>
* <inlinegraphic fileref="interconvert.png" format="PNG" />
* </para>
* *
* The colour spaces supported by VIPS are: * The colour spaces supported by VIPS are:
* *
* <itemizedlist> * * #VIPS_INTERPRETATION_LAB -- CIELAB '76 colourspace with a D65 white. This
* <listitem> * uses three floats for each band, and bands have the obvious range.
* <para>
* <emphasis><code>LabQ</code></emphasis>
* *
* This is the principal VIPS colorimetric storage format. * There are two
* LabQ images have four 8-bit bands and store 10 bits of L and 11 bits * variants, #VIPS_INTERPRETATION_LABQ and #VIPS_INTERPRETATION_LABS, which
* of a and b. * use ints to store values. These are less precise, but can be quicker to
* store and process.
* *
* You cannot perform calculations on <code>LabQ</code> images (they are * #VIPS_INTERPRETATION_LCH is the same, but with a*b* as polar coordinates.
* tagged with %VIPS_CODING_LABQ), though a few operations such as * Hue is expressed in degrees.
* vips_extract_area() will work directly with them.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>LabS</code></emphasis>
* *
* This format represents coordinates in CIELAB space as a * * #VIPS_INTERPRETATION_XYZ -- CIE XYZ. This uses three floats.
* three-band #VIPS_FORMAT_SHORT image, scaled to fit the full range of * See #VIPS_D75_X0 and friends for values for the ranges
* bits. It is the best format for computation, being relatively * under various illuminants.
* compact, quick, and accurate. Colour values expressed in this way
* are hard to visualise.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Lab</code></emphasis>
* *
* Lab colourspace represents CIELAB colour values with a three-band * #VIPS_INTERPRETATION_YXY is the same, but with little x and y.
* #VIPS_FORMAT_FLOAT image. This is the simplest format for general
* work: adding the constant 50 to the L channel, for example, has the
* expected result.
* *
* VIPS uses D65 LAB, but you can use other colour temperatures with a * * #VIPS_INTERPRETATION_scRGB -- a linear colourspace with the sRGB
* little effort, see vips_XYZ2Lab(). * primaries. This is useful if you need linear light and don't care
* </para> * much what the primaries are.
* </listitem>
* <listitem>
* <para>
* <emphasis><code>XYZ</code></emphasis>
* *
* CIE XYZ colour space represented as a three-band #VIPS_FORMAT_FLOAT * Linearization is performed with the usual sRGB equations, see below.
* image.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Yxy</code></emphasis>
* *
* CIE Yxy colour space represented as a three-band #VIPS_FORMAT_FLOAT * * #VIPS_INTERPRETATION_sRGB -- the standard sRGB colourspace, see:
* image. * [wikipedia sRGB](http://en.wikipedia.org/wiki/SRGB).
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>RGB</code> / <code>sRGB</code></emphasis>
* *
* VIPS converts XYZ to and from sRGB using the usual formula: * This uses three 8-bit values for each of RGB.
* *
* http://en.wikipedia.org/wiki/SRGB * #VIPS_INTERPRETATION_RGB16 is the same, but using three 16-bit values for
* RGB.
* *
* You can also use vips_icc_transform() and friends to go to and from * * #VIPS_INTERPRETATION_B_W -- a monochrome image, roughly G from sRGB.
* device space with a generic profile. * The grey value is
* </para> * calculated in #VIPS_INTERPRETATION_scRGB space with the usual 0.2, 0.7, 0.1
* </listitem> * RGB ratios.
* <listitem>
* <para>
* <emphasis><code>LCh</code></emphasis>
* *
* Like <code>Lab</code>, but rectangular <code>ab</code> coordinates * #VIPS_INTERPRETATION_GREY16 is the same, but using 16-bits.
* are replaced with
* polar <code>Ch</code> (Chroma and hue) coordinates.
* Hue angles are expressed in degrees.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>CMC</code></emphasis>
* *
* A colour space based on the CMC(1:1) colour difference measurement. * * #VIPS_INTERPRETATION_CMC -- a colour space based on the CMC(1:1)
* This is a highly uniform colour space, much better than CIELAB for * colour difference measurement. This is a highly uniform colour space,
* expressing small differences. * much better than CIELAB for expressing small differences.
* *
* The CMC colourspace is described in "Uniform Colour Space Based on the * The CMC colourspace is described in "Uniform Colour Space Based on the
* CMC(l:c) Colour-difference Formula", M R Luo and B Rigg, Journal of the * CMC(l:c) Colour-difference Formula", M R Luo and B Rigg, Journal of the
* Society of Dyers and Colourists, vol 102, 1986. Distances in this * Society of Dyers and Colourists, vol 102, 1986. Distances in this
* colourspace approximate, within 10% or so, differences in the CMC(l:c) * colourspace approximate, within 10% or so, differences in the CMC(l:c)
* colour difference formula. * colour difference formula.
* *
* You can calculate metrics like CMC(2:1) by scaling the spaces before * You can calculate metrics like CMC(2:1) by scaling the spaces before
* finding differences. * finding differences.
* </para> *
* </listitem>
* </itemizedlist>
*/ */
/* Areas under curves for Dxx. 2 degree observer. /* Areas under curves for Dxx. 2 degree observer.