Boost GIL


rgb.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3 
4  Use, modification and distribution are subject to the Boost Software License,
5  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6  http://www.boost.org/LICENSE_1_0.txt).
7 
8  See http://opensource.adobe.com/gil for most recent version including documentation.
9 */
10 
11 /*************************************************************************************************/
12 
13 #ifndef GIL_RGB_H
14 #define GIL_RGB_H
15 
23 
24 #include <cstddef>
25 #include <boost/mpl/range_c.hpp>
26 #include <boost/mpl/vector_c.hpp>
27 #include "gil_config.hpp"
28 #include "metafunctions.hpp"
30 
31 namespace boost { namespace gil {
32 
35 
37 struct red_t {};
38 
40 struct green_t {};
41 
43 struct blue_t {};
45 
47 typedef mpl::vector3<red_t,green_t,blue_t> rgb_t;
48 
53 
56 template <typename IC>
57 inline
59 planar_rgb_view(std::size_t width, std::size_t height,
60  IC r, IC g, IC b,
61  std::ptrdiff_t rowsize_in_bytes) {
62  typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t RView;
63  return RView(width, height,
64  typename RView::locator(planar_pixel_iterator<IC,rgb_t>(r,g,b),
65  rowsize_in_bytes));
66 }
67 
68 } } // namespace boost::gil
69 
70 #endif
metafunctions that construct types or return type properties
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:53
planar pixel pointer class
Green.
Definition: rgb.hpp:40
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:252
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:317
Blue.
Definition: rgb.hpp:43
type_from_x_iterator< planar_pixel_iterator< IC, rgb_t > >::view_t planar_rgb_view(std::size_t width, std::size_t height, IC r, IC g, IC b, std::ptrdiff_t rowsize_in_bytes)
from raw RGB planar data
Definition: rgb.hpp:59
GIL configuration file.
Red.
Definition: rgb.hpp:37