Boost logo

Boost-Commit :

From: hljin_at_[hidden]
Date: 2007-08-23 15:26:56


Author: hljin
Date: 2007-08-23 15:26:55 EDT (Thu, 23 Aug 2007)
New Revision: 38868
URL: http://svn.boost.org/trac/boost/changeset/38868

Log:
GIL: a further fix on the PNG IO 16-bit bug
Text files modified:
   trunk/boost/gil/extension/io/png_io_private.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/boost/gil/extension/io/png_io_private.hpp
==============================================================================
--- trunk/boost/gil/extension/io/png_io_private.hpp (original)
+++ trunk/boost/gil/extension/io/png_io_private.hpp 2007-08-23 15:26:55 EDT (Thu, 23 Aug 2007)
@@ -339,7 +339,9 @@
                      PNG_INTERLACE_NONE,
                      PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT);
         png_write_info(_png_ptr,_info_ptr);
- if (little_endian() && png_get_bit_depth(_png_ptr,_info_ptr)>8)
+ if (little_endian() &&
+ png_write_support_private<typename channel_type<View>::type,
+ typename color_space_type<View>::type>::bit_depth>8)
             png_set_swap(_png_ptr);
         std::vector<pixel<typename channel_type<View>::type,
                           layout<typename color_space_type<View>::type> > > row(view.width());


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