]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
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> | |
7c673cae FG |
13 | |
14 | #include <cstddef> | |
7c673cae FG |
15 | |
16 | namespace boost { namespace gil { | |
17 | ||
7c673cae FG |
18 | /// \addtogroup ColorNameModel |
19 | /// \{ | |
20 | ||
21 | /// \brief Cyan | |
92f5a8d4 | 22 | struct cyan_t {}; |
7c673cae FG |
23 | |
24 | /// \brief Magenta | |
25 | struct magenta_t {}; | |
26 | ||
27 | /// \brief Yellow | |
92f5a8d4 | 28 | struct yellow_t {}; |
7c673cae FG |
29 | |
30 | /// \brief Black | |
31 | struct black_t {}; | |
32 | /// \} | |
33 | ||
34 | /// \ingroup ColorSpaceModel | |
92f5a8d4 | 35 | using cmyk_t = mp11::mp_list<cyan_t, magenta_t, yellow_t, black_t>; |
7c673cae FG |
36 | |
37 | /// \ingroup LayoutModel | |
92f5a8d4 | 38 | using cmyk_layout_t = layout<cmyk_t>; |
7c673cae FG |
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 | |
92f5a8d4 TL |
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)); | |
7c673cae FG |
48 | } |
49 | ||
50 | } } // namespace gil | |
51 | ||
52 | #endif |