From 179a28644793852c1a2dad5108317cb9ebd9682d Mon Sep 17 00:00:00 2001 From: Christian Henning Date: Sat, 22 Jun 2013 20:34:18 +0000 Subject: [PATCH] Added compiler symbol to allow compiling with libpng 1.4 or lower. [SVN r84883] --- include/boost/gil/extension/io/formats/png/reader_backend.hpp | 3 +++ include/boost/gil/extension/io/formats/png/writer_backend.hpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/boost/gil/extension/io/formats/png/reader_backend.hpp b/include/boost/gil/extension/io/formats/png/reader_backend.hpp index 8cde5bbdf..b39be44b1 100644 --- a/include/boost/gil/extension/io/formats/png/reader_backend.hpp +++ b/include/boost/gil/extension/io/formats/png/reader_backend.hpp @@ -476,6 +476,8 @@ public: } } +#ifndef BOOST_GIL_IO_PNG_1_4_OR_LOWER + #ifdef BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED // get physical scale settings @@ -530,6 +532,7 @@ public: } #endif // BOOST_GIL_IO_PNG_FIXED_POINT_SUPPORTED #endif // BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED +#endif // BOOST_GIL_IO_PNG_1_4_OR_LOWER // get comments information from png_info structure if( this->_settings._read_comments ) diff --git a/include/boost/gil/extension/io/formats/png/writer_backend.hpp b/include/boost/gil/extension/io/formats/png/writer_backend.hpp index 7bddde9c7..6d7a46332 100644 --- a/include/boost/gil/extension/io/formats/png/writer_backend.hpp +++ b/include/boost/gil/extension/io/formats/png/writer_backend.hpp @@ -286,6 +286,8 @@ protected: ); } +#ifndef BOOST_GIL_IO_PNG_1_4_OR_LOWER + #ifdef BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED if( _info._valid_scale_factors ) { @@ -320,7 +322,7 @@ protected: #endif // BOOST_GIL_IO_PNG_FIXED_POINT_SUPPORTED #endif // BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED - +#endif // BOOST_GIL_IO_PNG_1_4_OR_LOWER if( _info._valid_text ) {