Boost GIL


rgba.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 #ifndef GIL_RGBA_H
13 #define GIL_RGBA_H
14 
22 
23 #include <cstddef>
24 #include "gil_config.hpp"
25 #include <boost/mpl/contains.hpp>
26 #include "rgb.hpp"
28 
29 namespace boost { namespace gil {
30 
33 struct alpha_t {};
34 
36 typedef mpl::vector4<red_t,green_t,blue_t,alpha_t> rgba_t;
37 
46 
49 template <typename IC>
50 inline
52 planar_rgba_view(std::size_t width, std::size_t height,
53  IC r, IC g, IC b, IC a,
54  std::ptrdiff_t rowsize_in_bytes) {
55  typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t RView;
56  return RView(width, height,
57  typename RView::locator(planar_pixel_iterator<IC,rgba_t>(r,g,b,a),
58  rowsize_in_bytes));
59 }
60 
61 } } // namespace boost::gil
62 
63 #endif
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:53
planar pixel pointer class
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:252
Alpha.
Definition: rgba.hpp:33
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:317
type_from_x_iterator< planar_pixel_iterator< IC, rgba_t > >::view_t planar_rgba_view(std::size_t width, std::size_t height, IC r, IC g, IC b, IC a, std::ptrdiff_t rowsize_in_bytes)
from raw RGBA planar data
Definition: rgba.hpp:52
GIL configuration file.
Support for RGB color space and variants.