1 <!-- HTML header for doxygen 1.8.13-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.15"/>
8 <meta name="viewport" content="width=device-width, initial-scale=1"/>
9 <title>Generic Image Library: bit_aligned_pixel_reference</title>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="dynsections.js"></script>
13 <link href="doxygen.css" rel="stylesheet" type="text/css" />
14 <link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
17 <div class="boost-header">
18 <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
20 <td valign="top" width="300">
21 <h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
23 <td ><h1 align="center"><a href="../index.html"></a></h1></td>
29 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
30 <!-- Generated by Doxygen 1.8.15 -->
31 <script type="text/javascript" src="menudata.js"></script>
32 <script type="text/javascript" src="menu.js"></script>
33 <script type="text/javascript">
34 /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
36 initMenu('',false,false,'search.php','Search');
38 /* @license-end */</script>
39 <div id="main-nav"></div>
42 <div class="headertitle">
43 <div class="title">bit_aligned_pixel_reference<div class="ingroups"><a class="el" href="group___pixel.html">Pixel</a> » <a class="el" href="group___pixel_model.html">Models</a><a class="el" href="group___color_base.html">ColorBase</a> » <a class="el" href="group___color_base_model.html">Models</a> » | <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> » | <a class="el" href="group___pixel_based_model.html">Models</a></div></div> </div>
45 <div class="contents">
47 <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>.
48 <a href="#details">More...</a></p>
49 <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>
50 <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 "123" 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<unsigned char, mp11::mp_list_c<int,1,2,3>, rgb_layout_t, <span class="keyword">true</span>> <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(&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>
51 <dl class="tparams"><dt>Template Parameters</dt><dd>
52 <table class="tparams">
53 <tr><td class="paramname">BitField</td><td></td></tr>
54 <tr><td class="paramname">ChannelBitSizes</td><td>Boost.MP11-compatible list of integral types defining the number of bits for each channel. For example, for 565RGB, mp_list_c<int,5,6,5> </td></tr>
55 <tr><td class="paramname">Layout</td><td></td></tr>
56 <tr><td class="paramname">IsMutable</td><td></td></tr>
60 </div><!-- contents -->
61 <!-- HTML footer for doxygen 1.8.13-->
62 <!-- start footer part -->
64 <address class="footer">
66 Generated by  <a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15