###

#

rgb.hpp
//
// Copyright 2005-2007 Adobe Systems Incorporated
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
#ifndef BOOST_GIL_RGB_HPP
#define BOOST_GIL_RGB_HPP
#include <boost/gil/metafunctions.hpp>
#include <boost/gil/planar_pixel_iterator.hpp>
#include <boost/gil/detail/mp11.hpp>
#include <cstddef>
#include <type_traits>
namespace boost { namespace gil {
struct red_t {};
struct green_t {};
struct blue_t {};
using rgb_t = mp11::mp_list<red_t, green_t, blue_t>;
using rgb_layout_t = layout<rgb_t>;
using bgr_layout_t = layout<rgb_t, mp11::mp_list_c<int, 2, 1, 0>>;
template <typename IC>
inline auto planar_rgb_view(
std::size_t width, std::size_t height,
IC r, IC g, IC b,
std::ptrdiff_t rowsize_in_bytes)
-> typename type_from_x_iterator<planar_pixel_iterator<IC, rgb_t> >::view_t
{
using view_t = typename type_from_x_iterator<planar_pixel_iterator<IC, rgb_t>>::view_t;
return view_t(
width, height,
typename view_t::locator(
planar_pixel_iterator<IC, rgb_t>(r, g, b),
rowsize_in_bytes));
}
}} // namespace boost::gil
#endif
boost
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition: algorithm.hpp:36
boost::gil::planar_pixel_iterator
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept,...
Definition: algorithm.hpp:40
boost::gil::green_t
Green.
Definition: rgb.hpp:27
boost::gil::type_from_x_iterator
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:302
boost::gil::layout
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:267
boost::gil::blue_t
Blue.
Definition: rgb.hpp:30
boost::gil::planar_rgb_view
auto planar_rgb_view(std::size_t width, std::size_t height, IC r, IC g, IC b, std::ptrdiff_t rowsize_in_bytes) -> typename type_from_x_iterator< planar_pixel_iterator< IC, rgb_t > >::view_t
from raw RGB planar data
Definition: rgb.hpp:45
boost::gil::red_t
Red.
Definition: rgb.hpp:24