Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60194 - branches/release/boost/gil/extension/dynamic_image
From: chhenning_at_[hidden]
Date: 2010-03-05 11:15:07


Author: chhenning
Date: 2010-03-05 11:15:07 EST (Fri, 05 Mar 2010)
New Revision: 60194
URL: http://svn.boost.org/trac/boost/changeset/60194

Log:
Fix for ticket #2831.
Text files modified:
   branches/release/boost/gil/extension/dynamic_image/image_view_factory.hpp | 9 +++++++--
   1 files changed, 7 insertions(+), 2 deletions(-)

Modified: branches/release/boost/gil/extension/dynamic_image/image_view_factory.hpp
==============================================================================
--- branches/release/boost/gil/extension/dynamic_image/image_view_factory.hpp (original)
+++ branches/release/boost/gil/extension/dynamic_image/image_view_factory.hpp 2010-03-05 11:15:07 EST (Fri, 05 Mar 2010)
@@ -70,9 +70,14 @@
     int _n;
     template <typename View> result_type operator()(const View& src) const { return result_type(nth_channel_view(src,_n)); }
 };
-template <typename DstP, typename Result> struct color_converted_view_fn {
+template <typename DstP, typename Result, typename CC = default_color_converter> struct color_converted_view_fn {
     typedef Result result_type;
- template <typename View> result_type operator()(const View& src) const { return result_type(color_converted_view<DstP>(src)); }
+ color_converted_view_fn(CC cc = CC()): _cc(cc) {}
+
+ template <typename View> result_type operator()(const View& src) const { return result_type(color_converted_view<DstP>(src, _cc)); }
+
+ private:
+ CC _cc;
 };
 } // namespace detail
 


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