2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-28 19:22:11 +00:00
Files
gil/doc/html/reference/group___pixel_model_non_aligned_pixel.html
2019-05-07 01:46:31 -04:00

70 lines
5.6 KiB
HTML

<!-- HTML header for doxygen 1.8.13-->
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Generic Image Library: bit_aligned_pixel_reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="boost-header">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
<tr>
<td valign="top" width="300">
<h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
</td>
<td ><h1 align="center"><a href="../index.html"></a></h1></td>
<td></td>
</tr>
</table>
</div>
<hr/>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">bit_aligned_pixel_reference<div class="ingroups"><a class="el" href="group___pixel.html">Pixel</a> &raquo; <a class="el" href="group___pixel_model.html">Models</a><a class="el" href="group___color_base.html">ColorBase</a> &raquo; <a class="el" href="group___color_base_model.html">Models</a> &raquo; &#124; <a class="el" href="group___color_base_model_non_aligned_pixel.html">bit_aligned_pixel_reference</a><a class="el" href="group___pixel_based.html">PixelBased</a> &raquo; &#124; <a class="el" href="group___pixel_based_model.html">Models</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>A heterogeneous pixel reference used to represent non-byte-aligned pixels. Models <a class="el" href="structboost_1_1gil_1_1_pixel_concept.html" title="Pixel concept - A color base whose elements are channels. ">PixelConcept</a>.
<a href="#details">More...</a></p>
<p>A heterogeneous pixel reference used to represent non-byte-aligned pixels. Models <a class="el" href="structboost_1_1gil_1_1_pixel_concept.html" title="Pixel concept - A color base whose elements are channels. ">PixelConcept</a>. </p>
<p>Example: </p><div class="fragment"><div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data=0;</div><div class="line"></div><div class="line"><span class="comment">// A mutable reference to a 6-bit BGR pixel in &quot;123&quot; format (1 bit for red, 2 bits for green, 3 bits for blue)</span></div><div class="line"><span class="keyword">using</span> rgb123_ref_t = bit_aligned_pixel_reference&lt;unsigned char, mpl::vector3_c&lt;int,1,2,3&gt;, rgb_layout_t, <span class="keyword">true</span>&gt; <span class="keyword">const</span>;</div><div class="line"></div><div class="line"><span class="comment">// create the pixel reference at bit offset 2</span></div><div class="line"><span class="comment">// (i.e. red = [2], green = [3,4], blue = [5,6,7] bits)</span></div><div class="line">rgb123_ref_t ref(&amp;data, 2);</div><div class="line"><a class="code" href="group___color_base_algorithm_color.html#gab2d1dda637cb2b7c32cc87f199ea1dc0">get_color</a>(ref, red_t()) = 1;</div><div class="line">assert(data == 0x04);</div><div class="line"><a class="code" href="group___color_base_algorithm_color.html#gab2d1dda637cb2b7c32cc87f199ea1dc0">get_color</a>(ref, green_t()) = 3;</div><div class="line">assert(data == 0x1C);</div><div class="line"><a class="code" href="group___color_base_algorithm_color.html#gab2d1dda637cb2b7c32cc87f199ea1dc0">get_color</a>(ref, blue_t()) = 7;</div><div class="line">assert(data == 0xFC);</div></div><!-- fragment --><p>Heterogeneous pixel reference corresponding to non-byte-aligned bit range. Models <a class="el" href="structboost_1_1gil_1_1_color_base_concept.html" title="A color base is a container of color elements (such as channels, channel references or channel pointe...">ColorBaseConcept</a>, <a class="el" href="structboost_1_1gil_1_1_pixel_concept.html" title="Pixel concept - A color base whose elements are channels. ">PixelConcept</a>, <a class="el" href="structboost_1_1gil_1_1_pixel_based_concept.html" title="Concept for all pixel-based GIL constructs. ">PixelBasedConcept</a></p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">BitField</td><td></td></tr>
<tr><td class="paramname">ChannelBitSizes</td><td>MPL integral vector defining the number of bits for each channel. For example, for 565RGB, vector_c&lt;int,5,6,5&gt; </td></tr>
<tr><td class="paramname">Layout</td><td></td></tr>
<tr><td class="paramname">IsMutable</td><td></td></tr>
</table>
</dd>
</dl>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.13
</small>
</address>
</body>
</html>