8 #ifndef BOOST_GIL_DEVICE_N_HPP 9 #define BOOST_GIL_DEVICE_N_HPP 11 #include <boost/gil/metafunctions.hpp> 12 #include <boost/gil/utilities.hpp> 13 #include <boost/gil/detail/mp11.hpp> 15 #include <boost/config.hpp> 18 #include <type_traits> 20 namespace boost {
namespace gil {
46 N == 1 || (3 <= N && N <= 5),
47 "invalid number of DeviceN color components");
50 using type = mp11::mp_transform<color_t, mp11::mp_iota_c<N>>;
60 template <
typename IC>
62 planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes)
65 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1), rowsize_in_bytes));
70 template <
typename IC>
72 auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes)
76 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2), rowsize_in_bytes));
81 template <
typename IC>
83 auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes)
87 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2,c3), rowsize_in_bytes));
92 template <
typename IC>
94 auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes)
98 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2,c3,c4), rowsize_in_bytes));
auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes) -> typename type_from_x_iterator< planar_pixel_iterator< IC, devicen_t< 5 >>>::view_t
from 5-channel planar data
Definition: device_n.hpp:94
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:301
unnamed color
Definition: device_n.hpp:30
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:266
Unnamed color space of 1, 3, 4, or 5 channels.
Definition: device_n.hpp:33
unnamed color layout of up to five channels
Definition: device_n.hpp:56