rgb.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003    
00004     Use, modification and distribution are subject to the Boost Software License,
00005     Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
00006     http://www.boost.org/LICENSE_1_0.txt).
00007 
00008     See http://opensource.adobe.com/gil for most recent version including documentation.
00009 */
00010 
00011 /*************************************************************************************************/
00012 
00013 #ifndef GIL_RGB_H
00014 #define GIL_RGB_H
00015 
00023 
00024 #include <boost/mpl/range_c.hpp>
00025 #include <boost/mpl/vector_c.hpp>
00026 #include "gil_config.hpp"
00027 #include "metafunctions.hpp"
00028 #include "planar_pixel_iterator.hpp"
00029 
00030 namespace boost { namespace gil {
00031 
00034 
00036 struct red_t {};    
00037 
00039 struct green_t {};
00040 
00042 struct blue_t {}; 
00044 
00046 typedef mpl::vector3<red_t,green_t,blue_t> rgb_t;
00047 
00049 typedef layout<rgb_t> rgb_layout_t;
00051 typedef layout<rgb_t, mpl::vector3_c<int,2,1,0> > bgr_layout_t;
00052 
00055 template <typename IC>
00056 inline
00057 typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t
00058 planar_rgb_view(int width, int height,
00059                 IC r, IC g, IC b,
00060                 std::ptrdiff_t rowsize_in_bytes) {
00061     typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t RView;
00062     return RView(width, height,
00063                  typename RView::locator(planar_pixel_iterator<IC,rgb_t>(r,g,b),
00064                                          rowsize_in_bytes));
00065 }
00066 
00067 } }  // namespace boost::gil
00068 
00069 #endif

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google