Boost GIL


cmyk.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_CMYK_HPP
9 #define BOOST_GIL_CMYK_HPP
10 
11 #include <boost/gil/metafunctions.hpp>
12 #include <boost/gil/detail/mp11.hpp>
13 
14 #include <cstddef>
15 
16 namespace boost { namespace gil {
17 
20 
22 struct cyan_t {};
23 
25 struct magenta_t {};
26 
28 struct yellow_t {};
29 
31 struct black_t {};
33 
35 using cmyk_t = mp11::mp_list<cyan_t, magenta_t, yellow_t, black_t>;
36 
39 
42 template <typename IC>
44 planar_cmyk_view(std::size_t width, std::size_t height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes)
45 {
46  using view_t = typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t;
47  return view_t(width, height, typename view_t::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
48 }
49 
50 } } // namespace gil
51 
52 #endif
Magenta.
Definition: cmyk.hpp:25
Yellow.
Definition: cmyk.hpp:28
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept,...
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
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:266
Black.
Definition: cmyk.hpp:31
Cyan.
Definition: cmyk.hpp:22
type_from_x_iterator< planar_pixel_iterator< IC, cmyk_t > >::view_t planar_cmyk_view(std::size_t width, std::size_t height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes)
from raw CMYK planar data
Definition: cmyk.hpp:44