diff --git a/include/boost/gil/bit_aligned_pixel_iterator.hpp b/include/boost/gil/bit_aligned_pixel_iterator.hpp index e58b96ad5..868d3d324 100644 --- a/include/boost/gil/bit_aligned_pixel_iterator.hpp +++ b/include/boost/gil/bit_aligned_pixel_iterator.hpp @@ -26,6 +26,7 @@ #include #include "gil_config.hpp" #include "bit_aligned_pixel_reference.hpp" +#include "pixel_iterator.hpp" namespace boost { namespace gil { diff --git a/include/boost/gil/cmyk.hpp b/include/boost/gil/cmyk.hpp index 5f68b6335..06757b027 100644 --- a/include/boost/gil/cmyk.hpp +++ b/include/boost/gil/cmyk.hpp @@ -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 #include "gil_config.hpp" #include "metafunctions.hpp" #include @@ -54,7 +55,8 @@ typedef layout cmyk_layout_t; /// \ingroup ImageViewConstructors /// \brief from raw CMYK planar data template -inline typename type_from_x_iterator >::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 >::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 >::view_t RView; return RView(width, height, typename RView::locator(planar_pixel_iterator(c,m,y,k), rowsize_in_bytes)); } diff --git a/include/boost/gil/color_base.hpp b/include/boost/gil/color_base.hpp index 97764ea43..1441d4a69 100644 --- a/include/boost/gil/color_base.hpp +++ b/include/boost/gil/color_base.hpp @@ -35,6 +35,9 @@ namespace boost { namespace gil { +// Forward-declare +template P* memunit_advanced(const P* p, std::ptrdiff_t diff); + // Forward-declare semantic_at_c template typename disable_if,typename kth_semantic_element_reference_type::type>::type semantic_at_c(ColorBase& p); diff --git a/include/boost/gil/device_n.hpp b/include/boost/gil/device_n.hpp index 14d85f4a2..ce92191db 100644 --- a/include/boost/gil/device_n.hpp +++ b/include/boost/gil/device_n.hpp @@ -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 #include "gil_config.hpp" #include #include @@ -61,28 +62,32 @@ template struct devicen_layout_t : public layout > {}; /// \ingroup ImageViewConstructors /// \brief from 2-channel planar data template -inline typename type_from_x_iterator > >::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 > >::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 > >::view_t(width, height, planar_pixel_iterator >(c0,c1), rowsize_in_bytes); } /// \ingroup ImageViewConstructors /// \brief from 3-channel planar data template -inline typename type_from_x_iterator > >::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 > >::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 > >::view_t(width, height, planar_pixel_iterator >(c0,c1,c2), rowsize_in_bytes); } /// \ingroup ImageViewConstructors /// \brief from 4-channel planar data template -inline typename type_from_x_iterator > >::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 > >::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 > >::view_t(width, height, planar_pixel_iterator >(c0,c1,c2,c3), rowsize_in_bytes); } /// \ingroup ImageViewConstructors /// \brief from 5-channel planar data template -inline typename type_from_x_iterator > >::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 > >::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 > >::view_t(width, height, planar_pixel_iterator >(c0,c1,c2,c3,c4), rowsize_in_bytes); } diff --git a/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp b/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp index 65a5e5801..558ea4a1a 100644 --- a/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp +++ b/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp @@ -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 diff --git a/include/boost/gil/gil_concept.hpp b/include/boost/gil/gil_concept.hpp index 91ca92a64..9b3e82504 100644 --- a/include/boost/gil/gil_concept.hpp +++ b/include/boost/gil/gil_concept.hpp @@ -1363,7 +1363,7 @@ struct IteratorAdaptorConcept { typedef typename iterator_adaptor_get_base::type base_t; gil_function_requires >(); - BOOST_STATIC_ASSERT(is_iterator_adaptor()); + BOOST_STATIC_ASSERT(is_iterator_adaptor::value); typedef typename iterator_adaptor_rebind::type rebind_t; base_t base=it.base(); ignore_unused_variable_warning(base); diff --git a/include/boost/gil/pixel_iterator.hpp b/include/boost/gil/pixel_iterator.hpp index 5d4172273..0353d4766 100644 --- a/include/boost/gil/pixel_iterator.hpp +++ b/include/boost/gil/pixel_iterator.hpp @@ -26,6 +26,7 @@ #include #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(p2)-gil_reinterpret_cast_c(p1)); } -template P* memunit_advanced(const P* p, std::ptrdiff_t diff); - template 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 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) diff --git a/include/boost/gil/rgb.hpp b/include/boost/gil/rgb.hpp index 08cc7d7cb..64e3aca6c 100644 --- a/include/boost/gil/rgb.hpp +++ b/include/boost/gil/rgb.hpp @@ -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 #include #include #include "gil_config.hpp" @@ -55,7 +56,7 @@ typedef layout > bgr_layout_t; template inline typename type_from_x_iterator >::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 >::view_t RView; diff --git a/include/boost/gil/rgba.hpp b/include/boost/gil/rgba.hpp index d087d3b79..209d702e4 100644 --- a/include/boost/gil/rgba.hpp +++ b/include/boost/gil/rgba.hpp @@ -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 #include "gil_config.hpp" #include #include "rgb.hpp" @@ -48,7 +49,7 @@ typedef layout > abgr_layout_t; template inline typename type_from_x_iterator >::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 >::view_t RView;