Boost GIL


rgba.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 #ifndef BOOST_GIL_RGBA_HPP
9 #define BOOST_GIL_RGBA_HPP
10 
11 #include <boost/gil/planar_pixel_iterator.hpp>
12 #include <boost/gil/rgb.hpp>
13 #include <boost/gil/detail/mp11.hpp>
14 
15 #include <cstddef>
16 #include <type_traits>
17 
18 namespace boost { namespace gil {
19 
22 struct alpha_t {};
23 
25 using rgba_t =mp11::mp_list<red_t, green_t, blue_t, alpha_t>;
26 
29 
32 
35 
38 
41 template <typename IC>
42 inline
44  std::size_t width, std::size_t height,
45  IC r, IC g, IC b, IC a,
46  std::ptrdiff_t rowsize_in_bytes)
48 {
49  using view_t = typename type_from_x_iterator<planar_pixel_iterator<IC, rgba_t>>::view_t;
50 
51  return RView(
52  width, height,
53  typename view_t::locator(
55  rowsize_in_bytes));
56 }
57 
58 }} // namespace boost::gil
59 
60 #endif
Definition: algorithm.hpp:30
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:34
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:301
Alpha.
Definition: rgba.hpp:22
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:246
auto 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) -> typename type_from_x_iterator< planar_pixel_iterator< IC, rgba_t > >::view_t
from raw RGBA planar data
Definition: rgba.hpp:43