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 {
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 auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes)
66 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1), rowsize_in_bytes));
71 template <
typename IC>
73 auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes)
77 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2), rowsize_in_bytes));
82 template <
typename IC>
84 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)
88 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2,c3), rowsize_in_bytes));
93 template <
typename IC>
95 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)
99 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:95
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition: algorithm.hpp:36
unnamed color
Definition: device_n.hpp:30
unnamed color layout of up to five channels
Definition: device_n.hpp:56
Unnamed color space of 1, 2, 3, 4, or 5 channels.
Definition: device_n.hpp:40
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:268
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:303