Boost logo

Boost-Commit :

From: lbourdev_at_[hidden]
Date: 2008-03-21 05:41:00


Author: lbourdev
Date: 2008-03-21 05:40:59 EDT (Fri, 21 Mar 2008)
New Revision: 43741
URL: http://svn.boost.org/trac/boost/changeset/43741

Log:
GIL: Fixed a bug in planar device_n view construction.

Text files modified:
   trunk/boost/gil/device_n.hpp | 14 +++++++++-----
   1 files changed, 9 insertions(+), 5 deletions(-)

Modified: trunk/boost/gil/device_n.hpp
==============================================================================
--- trunk/boost/gil/device_n.hpp (original)
+++ trunk/boost/gil/device_n.hpp 2008-03-21 05:40:59 EDT (Fri, 21 Mar 2008)
@@ -5,7 +5,7 @@
     Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt).
 
- See http://opensource.adobe.com/gil for most recent version including documentation.
+ See http://stlab.adobe.com/gil for most recent version including documentation.
 */
 /*************************************************************************************************/
 
@@ -64,7 +64,8 @@
 template <typename IC>
 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);
+ typedef typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t view_t;
+ return view_t(width, height, typename view_t::locator(typename view_t::x_iterator(c0,c1), rowsize_in_bytes));
 }
 
 /// \ingroup ImageViewConstructors
@@ -72,7 +73,8 @@
 template <typename IC>
 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);
+ typedef typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t view_t;
+ return view_t(width, height, typename view_t::locator(typename view_t::x_iterator(c0,c1,c2), rowsize_in_bytes));
 }
 
 /// \ingroup ImageViewConstructors
@@ -80,7 +82,8 @@
 template <typename IC>
 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);
+ typedef typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t view_t;
+ return view_t(width, height, typename view_t::locator(typename view_t::x_iterator(c0,c1,c2,c3), rowsize_in_bytes));
 }
 
 /// \ingroup ImageViewConstructors
@@ -88,7 +91,8 @@
 template <typename IC>
 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);
+ typedef typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t view_t;
+ return view_t(width, height, typename view_t::locator(typename view_t::x_iterator(c0,c1,c2,c3,c4), rowsize_in_bytes));
 }
 
 } } // namespace boost::gil


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk