blob: 4ba1d1ae8bc41b07b3250b5ded9f2d5f10b044c8 [file] [log] [blame]
<!-- Copyright 2008 Lubomir Bourdev and Hailin Jin
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<!--
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<TITLE>Generic Image Library: color_convert.hpp File Reference</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/>
<LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" style='width: 100%; margin: 0; padding: 0'><tr>
<td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'>
<div class="qindex"><a class="qindex" href="index.html">Modules</a>
| <a class="qindex" href="classes.html">Alphabetical List</a>
| <a class="qindex" href="annotated.html">Class List</a>
| <a class="qindex" href="dirs.html">Directories</a>
| <a class="qindex" href="files.html">File List</a>
| <a class="qindex" href="../index.html">GIL Home Page</a>
</div>
<!-- End Header -->
<!-- Generated by Doxygen 1.5.6 -->
<div class="navpath"><a class="el" href="g_i_l_0076.html">boost</a>&nbsp;&raquo&nbsp;<a class="el" href="g_i_l_0079.html">gil</a>
</div>
<div class="contents">
<h1>color_convert.hpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
GIL default color space conversions.
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Lubomir Bourdev and Hailin Jin <br>
Adobe Systems Incorporated </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>2005-2007 <br>
Last updated on January 30, 2007</dd></dl>
Support for fast and simple color conversion. Accurate color conversion using color profiles can be supplied separately in a dedicated module
<p>
<code>#include &lt;functional&gt;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0093.html">gil_config.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0015.html">channel_algorithm.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0241.html">pixel.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0095.html">gray.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="rgb_8hpp-source.html">rgb.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0258.html">rgba.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0065.html">cmyk.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0237.html">metafunctions.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0642.html">utilities.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0068.html">color_base_algorithm.hpp</a>&quot;</code><br>
<p>
<a href="g_i_l_0070.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost.html">boost</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil::detail</b></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0453.html">default_color_converter_impl</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Color Convertion function object. To be specialized for every src/dst color space. <a href="g_i_l_0453.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0457.html">default_color_converter_impl&lt; C, C &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">When the color space is the same, color convertion performs channel depth conversion. <a href="g_i_l_0457.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0519.html">rgb_to_luminance_fn</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">red * .3 + green * .59 + blue * .11 + .5 <a href="g_i_l_0519.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0465.html">default_color_converter_impl&lt; gray_t, rgb_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gray to RGB. <a href="g_i_l_0465.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0463.html">default_color_converter_impl&lt; gray_t, cmyk_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gray to CMYK. <a href="g_i_l_0463.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0469.html">default_color_converter_impl&lt; rgb_t, gray_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">RGB to Gray. <a href="g_i_l_0469.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0467.html">default_color_converter_impl&lt; rgb_t, cmyk_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">RGB to CMYK (not the fastest code in the world). <a href="g_i_l_0467.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0461.html">default_color_converter_impl&lt; cmyk_t, rgb_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">CMYK to RGB (not the fastest code in the world). <a href="g_i_l_0461.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0459.html">default_color_converter_impl&lt; cmyk_t, gray_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">CMYK to Gray. <a href="g_i_l_0459.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0455.html">default_color_converter_impl&lt; C1, rgba_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converting any <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> type to RGBA. Note: Supports homogeneous pixels only. <a href="g_i_l_0455.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0471.html">default_color_converter_impl&lt; rgba_t, C2 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converting RGBA to any <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> type. Note: Supports homogeneous pixels only. <a href="g_i_l_0471.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0473.html">default_color_converter_impl&lt; rgba_t, rgba_t &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unfortunately RGBA to RGBA must be explicitly provided - otherwise we get ambiguous specialization error. <a href="g_i_l_0473.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0452.html">default_color_converter</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">class for color-converting one <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> to another <a href="g_i_l_0452.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="7091bf5a78740fe1cadb3a6b7c1270f5"></a><!-- doxytag: member="color_convert.hpp::rgb_to_luminance" ref="7091bf5a78740fe1cadb3a6b7c1270f5" args="(const RedChannel &amp;red, const GreenChannel &amp;green, const BlueChannel &amp;blue)" -->
template&lt;typename GrayChannel, typename RedChannel, typename GreenChannel, typename BlueChannel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_traits&lt; GrayChannel &gt;<br>
::value_type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>rgb_to_luminance</b> (const RedChannel &amp;red, const GreenChannel &amp;green, const BlueChannel &amp;blue)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="63bda8ff6be4b28ab8c014ad63fa64e1"></a><!-- doxytag: member="color_convert.hpp::alpha_or_max_impl" ref="63bda8ff6be4b28ab8c014ad63fa64e1" args="(const Pixel &amp;p, mpl::true_)" -->
template&lt;typename Pixel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_type&lt; Pixel &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>alpha_or_max_impl</b> (const Pixel &amp;p, mpl::true_)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="5192bd327f7c162a36eed0c949976c3e"></a><!-- doxytag: member="color_convert.hpp::alpha_or_max_impl" ref="5192bd327f7c162a36eed0c949976c3e" args="(const Pixel &amp;, mpl::false_)" -->
template&lt;typename Pixel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_type&lt; Pixel &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>alpha_or_max_impl</b> (const Pixel &amp;, mpl::false_)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f6bdeaf08c7de96eb094869afbdda78d"></a><!-- doxytag: member="color_convert.hpp::alpha_or_max" ref="f6bdeaf08c7de96eb094869afbdda78d" args="(const Pixel &amp;p)" -->
template&lt;typename Pixel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_type&lt; Pixel &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>alpha_or_max</b> (const Pixel &amp;p)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gaa258d34eafbf9d9e34a2a2ad6131af2"></a><!-- doxytag: member="color_convert.hpp::color_convert" ref="gaa258d34eafbf9d9e34a2a2ad6131af2" args="(const SrcP &amp;src, DstP &amp;dst)" -->
template&lt;typename SrcP, typename DstP&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0178.html#gaa258d34eafbf9d9e34a2a2ad6131af2">color_convert</a> (const SrcP &amp;src, DstP &amp;dst)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">helper function for converting one <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> to another using GIL default color-converters where ScrP models <a class="el" href="g_i_l_0302.html" title="Homogeneous pixel concept.">HomogeneousPixelConcept</a> DstP models <a class="el" href="g_i_l_0304.html" title="Homogeneous pixel concept that is a Regular type.">HomogeneousPixelValueConcept</a> <br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:15 2009 for Generic Image Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>