blob: 858d45c9e4eae7330c9b50a6cc7af2077d522c29 [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: channel_multiply</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="contents">
<h1>channel_multiply<br>
<small>
[<a class="el" href="g_i_l_0097.html">Algorithms and Utility Functions</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Multiplying unsigned channel values of the same type. Performs scaled multiplication result = a * b / max_value.
<p>
Example: <div class="fragment"><pre class="fragment">bits8 x=128;
bits8 y=128;
bits8 mul = <a class="code" href="g_i_l_0103.html#gf73b2a47a7877767534df0eee46dda17" title="A function multiplying two channels. result = a * b / max_value.">channel_multiply</a>(x,y);
assert(mul == 64); <span class="comment">// 64 = 128 * 128 / 255</span>
</pre></div>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></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_0422.html">channel_multiplier_unsigned</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the default implementation. Performance specializatons are provided. <a href="g_i_l_0422.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_0428.html">channel_multiplier_unsigned&lt; bits8 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for 8-bit unsigned channels. <a href="g_i_l_0428.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_0424.html">channel_multiplier_unsigned&lt; bits16 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for 16-bit unsigned channels. <a href="g_i_l_0424.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_0426.html">channel_multiplier_unsigned&lt; bits32f &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for float 0..1 channels. <a href="g_i_l_0426.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_0420.html">channel_multiplier</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function object to multiply two channels. result = a * b / max_value. <a href="g_i_l_0420.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="gf73b2a47a7877767534df0eee46dda17"></a><!-- doxytag: member="ChannelMultiplyAlgorithm::channel_multiply" ref="gf73b2a47a7877767534df0eee46dda17" args="(Channel a, Channel b)" -->
template&lt;typename Channel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_traits&lt; Channel &gt;<br>
::value_type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0103.html#gf73b2a47a7877767534df0eee46dda17">channel_multiply</a> (Channel a, Channel b)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function multiplying two channels. result = a * b / max_value. <br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:17 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>