Generic Image Library: rgb.hpp Source File

###  | #  |

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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"
29 #include "planar_pixel_iterator.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
50 typedef layout<rgb_t> rgb_layout_t;
52 typedef layout<rgb_t, mpl::vector3_c<int,2,1,0> > bgr_layout_t;
53
56 template <typename IC>
57 inline
58 typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t
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.hpp
metafunctions that construct types or return type properties
boost::gil::planar_pixel_iterator
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:53
planar_pixel_iterator.hpp
planar pixel pointer class
boost::gil::green_t
Green.
Definition: rgb.hpp:40
boost::gil::type_from_x_iterator
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:252
boost::gil::layout
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:317
boost::gil::blue_t
Blue.
Definition: rgb.hpp:43
boost::gil::planar_rgb_view
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_config.hpp
GIL configuration file.
boost::gil::red_t
Red.
Definition: rgb.hpp:37