Chris@16: /* Chris@16: Copyright 2005-2007 Adobe Systems Incorporated Chris@16: Chris@16: Use, modification and distribution are subject to the Boost Software License, Chris@16: Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: http://www.boost.org/LICENSE_1_0.txt). Chris@16: Chris@16: See http://opensource.adobe.com/gil for most recent version including documentation. Chris@16: */ Chris@16: /*************************************************************************************************/ Chris@16: Chris@16: #ifndef GIL_RGBA_H Chris@16: #define GIL_RGBA_H Chris@16: Chris@16: //////////////////////////////////////////////////////////////////////////////////////// Chris@16: /// \file Chris@16: /// \brief Support for RGBA color space and variants Chris@16: /// \author Lubomir Bourdev and Hailin Jin \n Chris@16: /// Adobe Systems Incorporated Chris@16: /// \date 2005-2007 \n Last updated on October 10, 2007 Chris@16: //////////////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: #include Chris@16: #include "gil_config.hpp" Chris@16: #include Chris@16: #include "rgb.hpp" Chris@16: #include "planar_pixel_iterator.hpp" Chris@16: Chris@16: namespace boost { namespace gil { Chris@16: Chris@16: /// \ingroup ColorNameModel Chris@16: /// \brief Alpha Chris@16: struct alpha_t {}; Chris@16: Chris@16: /// \ingroup ColorSpaceModel Chris@16: typedef mpl::vector4 rgba_t; Chris@16: Chris@16: /// \ingroup LayoutModel Chris@16: typedef layout rgba_layout_t; Chris@16: /// \ingroup LayoutModel Chris@16: typedef layout > bgra_layout_t; Chris@16: /// \ingroup LayoutModel Chris@16: typedef layout > argb_layout_t; Chris@16: /// \ingroup LayoutModel Chris@16: typedef layout > abgr_layout_t; Chris@16: Chris@16: /// \ingroup ImageViewConstructors Chris@16: /// \brief from raw RGBA planar data Chris@16: template Chris@16: inline Chris@16: typename type_from_x_iterator >::view_t Chris@16: planar_rgba_view(std::size_t width, std::size_t height, Chris@16: IC r, IC g, IC b, IC a, Chris@16: std::ptrdiff_t rowsize_in_bytes) { Chris@16: typedef typename type_from_x_iterator >::view_t RView; Chris@16: return RView(width, height, Chris@16: typename RView::locator(planar_pixel_iterator(r,g,b,a), Chris@16: rowsize_in_bytes)); Chris@16: } Chris@16: Chris@16: } } // namespace boost::gil Chris@16: Chris@16: #endif