Warning, file /include/boost/gil/rgb.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_GIL_RGB_HPP
0009 #define BOOST_GIL_RGB_HPP
0010
0011 #include <boost/gil/metafunctions.hpp>
0012 #include <boost/gil/planar_pixel_iterator.hpp>
0013 #include <boost/gil/detail/mp11.hpp>
0014
0015 #include <cstddef>
0016 #include <type_traits>
0017
0018 namespace boost { namespace gil {
0019
0020
0021
0022
0023
0024 struct red_t {};
0025
0026
0027 struct green_t {};
0028
0029
0030 struct blue_t {};
0031
0032
0033
0034 using rgb_t = mp11::mp_list<red_t, green_t, blue_t>;
0035
0036
0037 using rgb_layout_t = layout<rgb_t>;
0038
0039
0040 using bgr_layout_t = layout<rgb_t, mp11::mp_list_c<int, 2, 1, 0>>;
0041
0042
0043
0044 template <typename IC>
0045 inline auto planar_rgb_view(
0046 std::size_t width, std::size_t height,
0047 IC r, IC g, IC b,
0048 std::ptrdiff_t rowsize_in_bytes)
0049 -> typename type_from_x_iterator<planar_pixel_iterator<IC, rgb_t> >::view_t
0050 {
0051 using view_t = typename type_from_x_iterator<planar_pixel_iterator<IC, rgb_t>>::view_t;
0052
0053 return view_t(
0054 width, height,
0055 typename view_t::locator(
0056 planar_pixel_iterator<IC, rgb_t>(r, g, b),
0057 rowsize_in_bytes));
0058 }
0059
0060 }}
0061
0062 #endif