mirror of
https://github.com/boostorg/gil.git
synced 2026-02-19 02:22:09 +00:00
GIL: minor cumulative fixes
[SVN r40804]
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include "gil_config.hpp"
|
||||
#include "bit_aligned_pixel_reference.hpp"
|
||||
#include "pixel_iterator.hpp"
|
||||
|
||||
namespace boost { namespace gil {
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
/// \brief Support for CMYK color space and variants
|
||||
/// \author Lubomir Bourdev and Hailin Jin \n
|
||||
/// Adobe Systems Incorporated
|
||||
/// \date 2005-2007 \n Last updated on September 18, 2006
|
||||
/// \date 2005-2007 \n Last updated on October 10, 2007
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstddef>
|
||||
#include "gil_config.hpp"
|
||||
#include "metafunctions.hpp"
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
@@ -54,7 +55,8 @@ typedef layout<cmyk_t> cmyk_layout_t;
|
||||
/// \ingroup ImageViewConstructors
|
||||
/// \brief from raw CMYK planar data
|
||||
template <typename IC>
|
||||
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) {
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t
|
||||
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) {
|
||||
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
|
||||
return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
namespace boost { namespace gil {
|
||||
|
||||
// Forward-declare
|
||||
template <typename P> P* memunit_advanced(const P* p, std::ptrdiff_t diff);
|
||||
|
||||
// Forward-declare semantic_at_c
|
||||
template <int K, typename ColorBase>
|
||||
typename disable_if<is_const<ColorBase>,typename kth_semantic_element_reference_type<ColorBase,K>::type>::type semantic_at_c(ColorBase& p);
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
/// \brief Support for color space of N channels and variants
|
||||
/// \author Lubomir Bourdev and Hailin Jin \n
|
||||
/// Adobe Systems Incorporated
|
||||
/// \date 2005-2007 \n Last updated on March 8, 2006
|
||||
/// \date 2005-2007 \n Last updated on October 10, 2007
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstddef>
|
||||
#include "gil_config.hpp"
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
@@ -61,28 +62,32 @@ template <int N> struct devicen_layout_t : public layout<devicen_t<N> > {};
|
||||
/// \ingroup ImageViewConstructors
|
||||
/// \brief from 2-channel planar data
|
||||
template <typename IC>
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes) {
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t
|
||||
planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes) {
|
||||
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<2> >(c0,c1), rowsize_in_bytes);
|
||||
}
|
||||
|
||||
/// \ingroup ImageViewConstructors
|
||||
/// \brief from 3-channel planar data
|
||||
template <typename IC>
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes) {
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t
|
||||
planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes) {
|
||||
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<3> >(c0,c1,c2), rowsize_in_bytes);
|
||||
}
|
||||
|
||||
/// \ingroup ImageViewConstructors
|
||||
/// \brief from 4-channel planar data
|
||||
template <typename IC>
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes) {
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t
|
||||
planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes) {
|
||||
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<4> >(c0,c1,c2,c3), rowsize_in_bytes);
|
||||
}
|
||||
|
||||
/// \ingroup ImageViewConstructors
|
||||
/// \brief from 5-channel planar data
|
||||
template <typename IC>
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes) {
|
||||
inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t
|
||||
planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes) {
|
||||
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<5> >(c0,c1,c2,c3,c4), rowsize_in_bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace detail {
|
||||
|
||||
// Create specializations of apply_operation_fn for each N 0..100
|
||||
GIL_GENERATE_APPLY_FWD_OPS(99)
|
||||
};
|
||||
}
|
||||
|
||||
// unary application
|
||||
template <typename Types, typename Bits, typename Op>
|
||||
|
||||
@@ -1363,7 +1363,7 @@ struct IteratorAdaptorConcept {
|
||||
typedef typename iterator_adaptor_get_base<Iterator>::type base_t;
|
||||
gil_function_requires<boost_concepts::ForwardTraversalConcept<base_t> >();
|
||||
|
||||
BOOST_STATIC_ASSERT(is_iterator_adaptor<Iterator>());
|
||||
BOOST_STATIC_ASSERT(is_iterator_adaptor<Iterator>::value);
|
||||
typedef typename iterator_adaptor_rebind<Iterator, void*>::type rebind_t;
|
||||
|
||||
base_t base=it.base(); ignore_unused_variable_warning(base);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <iterator>
|
||||
#include "gil_config.hpp"
|
||||
#include "gil_concept.hpp"
|
||||
#include "utilities.hpp"
|
||||
#include "pixel.hpp"
|
||||
|
||||
namespace boost { namespace gil {
|
||||
@@ -132,8 +133,6 @@ inline std::ptrdiff_t memunit_distance(const P* p1, const P* p2) {
|
||||
return (gil_reinterpret_cast_c<const unsigned char*>(p2)-gil_reinterpret_cast_c<const unsigned char*>(p1));
|
||||
}
|
||||
|
||||
template <typename P> P* memunit_advanced(const P* p, std::ptrdiff_t diff);
|
||||
|
||||
template <typename P>
|
||||
inline void memunit_advance(P* &p, std::ptrdiff_t diff) {
|
||||
p=(P*)((unsigned char*)(p)+diff);
|
||||
@@ -141,10 +140,9 @@ inline void memunit_advance(P* &p, std::ptrdiff_t diff) {
|
||||
|
||||
template <typename P>
|
||||
inline P* memunit_advanced(const P* p, std::ptrdiff_t diff) {
|
||||
return (P*)((unsigned char*)(p)+diff);
|
||||
return (P*)((char*)(p)+diff);
|
||||
}
|
||||
|
||||
|
||||
// memunit_advanced_ref
|
||||
// (shortcut to advancing a pointer by a given number of memunits and taking the reference in case the compiler is not smart enough)
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
/// \brief Support for RGB color space and variants
|
||||
/// \author Lubomir Bourdev and Hailin Jin \n
|
||||
/// Adobe Systems Incorporated
|
||||
/// \date 2005-2007 \n Last updated on September 18, 2006
|
||||
/// \date 2005-2007 \n Last updated on October 10, 2007
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include "gil_config.hpp"
|
||||
@@ -55,7 +56,7 @@ typedef layout<rgb_t, mpl::vector3_c<int,2,1,0> > bgr_layout_t;
|
||||
template <typename IC>
|
||||
inline
|
||||
typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t
|
||||
planar_rgb_view(int width, int height,
|
||||
planar_rgb_view(std::size_t width, std::size_t height,
|
||||
IC r, IC g, IC b,
|
||||
std::ptrdiff_t rowsize_in_bytes) {
|
||||
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t RView;
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
/// \brief Support for RGBA color space and variants
|
||||
/// \author Lubomir Bourdev and Hailin Jin \n
|
||||
/// Adobe Systems Incorporated
|
||||
/// \date 2005-2007 \n Last updated on February 12, 2007
|
||||
/// \date 2005-2007 \n Last updated on October 10, 2007
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstddef>
|
||||
#include "gil_config.hpp"
|
||||
#include <boost/mpl/contains.hpp>
|
||||
#include "rgb.hpp"
|
||||
@@ -48,7 +49,7 @@ typedef layout<rgba_t, mpl::vector4_c<int,3,2,1,0> > abgr_layout_t;
|
||||
template <typename IC>
|
||||
inline
|
||||
typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t
|
||||
planar_rgba_view(int width, int height,
|
||||
planar_rgba_view(std::size_t width, std::size_t height,
|
||||
IC r, IC g, IC b, IC a,
|
||||
std::ptrdiff_t rowsize_in_bytes) {
|
||||
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t RView;
|
||||
|
||||
Reference in New Issue
Block a user