]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/gil/cmyk.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / 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
18 /// \addtogroup ColorNameModel
19 /// \{
20
21 /// \brief Cyan
22 struct cyan_t {};
23
24 /// \brief Magenta
25 struct magenta_t {};
26
27 /// \brief Yellow
28 struct yellow_t {};
29
30 /// \brief Black
31 struct black_t {};
32 /// \}
33
34 /// \ingroup ColorSpaceModel
35 using cmyk_t = mp11::mp_list<cyan_t, magenta_t, yellow_t, black_t>;
36
37 /// \ingroup LayoutModel
38 using cmyk_layout_t = layout<cmyk_t>;
39
40 /// \ingroup ImageViewConstructors
41 /// \brief from raw CMYK planar data
42 template <typename IC>
43 inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t
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