From bf2cad5d37a17bcc7563acb84291ea4ffcb06d0c Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 6 Jan 2023 11:31:33 +0200 Subject: Fix build with libpng16 --- lib/pngstream.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/pngstream.cc b/lib/pngstream.cc index d9344b4..e3e49eb 100644 --- a/lib/pngstream.cc +++ b/lib/pngstream.cc @@ -83,7 +83,8 @@ namespace iscan #if HAVE_PNG_H set_error_handler (_png, _info); - if (_header && !_footer && _png->num_rows == _png->flush_rows) + lib->write_flush (_png); + if (_header && !_footer) { lib->write_end (_png, _info); _footer = true; @@ -118,7 +119,7 @@ namespace iscan // to a "file not found" error when calling dlopen. We just // dlopen the libz library explicitly to work around this. basic_imgstream::dlopen ("libz"); - basic_imgstream::dlopen ("libpng12", validate); + basic_imgstream::dlopen ("libpng16", validate); } catch (std::runtime_error& e) { -- cgit v1.2.3