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 "gil_config.hpp"
00025 #include "metafunctions.hpp"
00026 #include <boost/mpl/range_c.hpp>
00027 #include <boost/mpl/vector_c.hpp>
00028
00029 namespace boost { namespace gil {
00030
00031
00034
00036 struct cyan_t {};
00037
00039 struct magenta_t {};
00040
00042 struct yellow_t {};
00043
00045 struct black_t {};
00047
00049 typedef mpl::vector4<cyan_t,magenta_t,yellow_t,black_t> cmyk_t;
00050
00052 typedef layout<cmyk_t> cmyk_layout_t;
00053
00056 template <typename IC>
00057 inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t planar_cmyk_view(int width, int height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes) {
00058 typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
00059 return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
00060 }
00061
00062 } }
00063
00064 #endif