cmyk.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef GIL_CMYK_H
00014 #define GIL_CMYK_H
00015
00023
00024 #include <cstddef>
00025 #include "gil_config.hpp"
00026 #include "metafunctions.hpp"
00027 #include <boost/mpl/range_c.hpp>
00028 #include <boost/mpl/vector_c.hpp>
00029
00030 namespace boost { namespace gil {
00031
00032
00035
00037 struct cyan_t {};
00038
00040 struct magenta_t {};
00041
00043 struct yellow_t {};
00044
00046 struct black_t {};
00048
00050 typedef mpl::vector4<cyan_t,magenta_t,yellow_t,black_t> cmyk_t;
00051
00053 typedef layout<cmyk_t> cmyk_layout_t;
00054
00057 template <typename IC>
00058 inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t
00059 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) {
00060 typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
00061 return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
00062 }
00063
00064 } }
00065
00066 #endif