Generic Image Library: cmyk.hpp Source File

###  | #  |

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
16namespace 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
35using cmyk_t = mp11::mp_list<cyan_t, magenta_t, yellow_t, black_t>;
36
38using cmyk_layout_t = layout<cmyk_t>;
39
42template <typename IC>
43 inline auto 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)
44 -> typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t>>::view_t
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
boost::gil::planar_cmyk_view
auto 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) -> typename type_from_x_iterator< planar_pixel_iterator< IC, cmyk_t > >::view_t
from raw CMYK planar data
Definition cmyk.hpp:43
boost
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
boost::gil::black_t
Black.
Definition cmyk.hpp:31
boost::gil::cyan_t
Cyan.
Definition cmyk.hpp:22
boost::gil::layout
Represents a color space and ordering of channels in memory.
Definition utilities.hpp:268
boost::gil::magenta_t
Magenta.
Definition cmyk.hpp:25
boost::gil::planar_pixel_iterator
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept,...
Definition planar_pixel_iterator.hpp:58
boost::gil::type_from_x_iterator
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition metafunctions.hpp:303
boost::gil::yellow_t
Yellow.
Definition cmyk.hpp:28