C++ Boost


cmyk.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3 
4  Use, modification and distribution are subject to the Boost Software License,
5  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6  http://www.boost.org/LICENSE_1_0.txt).
7 
8  See http://opensource.adobe.com/gil for most recent version including documentation.
9 */
10 
11 /*************************************************************************************************/
12 
13 #ifndef GIL_CMYK_H
14 #define GIL_CMYK_H
15 
23 
24 #include <cstddef>
25 
26 #include <boost/config.hpp>
27 #include <boost/mpl/range_c.hpp>
28 #include <boost/mpl/vector_c.hpp>
29 
30 #include "gil_config.hpp"
31 #include "metafunctions.hpp"
32 
33 namespace boost { namespace gil {
34 
35 
38 
40 struct cyan_t {};
41 
43 struct magenta_t {};
44 
46 struct yellow_t {};
47 
49 struct black_t {};
51 
53 typedef mpl::vector4<cyan_t,magenta_t,yellow_t,black_t> cmyk_t;
54 
57 
60 template <typename IC>
62 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) {
63  typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
64  return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
65 }
66 
67 } } // namespace gil
68 
69 #endif
Magenta.
Definition: cmyk.hpp:43
Yellow.
Definition: cmyk.hpp:46
metafunctions that construct types or return type properties
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:53
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:252
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:306
Black.
Definition: cmyk.hpp:49
GIL configuration file.
Cyan.
Definition: cmyk.hpp:40
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:62