File libpng15.patch of Package iscan (Revision 5068ae099745f2db562e7f16cbf3e243)

Currently displaying revision 5068ae099745f2db562e7f16cbf3e243 , Show latest

49
 
1
--- a/lib/pngstream.cc
2
+++ b/lib/pngstream.cc
3
@@ -83,7 +83,12 @@ namespace iscan
4
 #if HAVE_PNG_H
5
     set_error_handler (_png, _info);
6
 
7
+/* when not interlacing (ie, only one pass), number of rows is image height:  _v_sz */
8
+#if PNG_LIBPNG_VER > 10499
9
+        if (!_footer && _v_sz == lib->get_current_row_number(_png))
10
+#else
11
     if (_header && !_footer && _png->num_rows == _png->flush_rows)
12
+#endif
13
       {
14
         lib->write_end (_png, _info);
15
         _footer = true;
16
@@ -157,6 +162,9 @@ namespace iscan
17
     funcsym (write_row);
18
     funcsym (write_flush);
19
     funcsym (write_end);
20
+#if PNG_LIBPNG_VER > 10499
21
+    funcsym (get_current_row_number);
22
+#endif
23
 
24
     if (lib->access_version_number
25
         && lib->create_write_struct
26
@@ -166,6 +174,9 @@ namespace iscan
27
         && lib->set_IHDR
28
         && lib->set_pHYs
29
         && lib->set_invert_mono
30
+#if PNG_LIBPNG_VER > 10499
31
+   && lib->get_current_row_number
32
+#endif
33
         && lib->write_info
34
         && lib->write_row
35
         && lib->write_flush
36
--- a/lib/pngstream.hh
37
+++ b/lib/pngstream.hh
38
@@ -108,6 +108,10 @@ namespace iscan
39
                png_structp);
40
       fundecl (void, write_end,
41
                png_structp, png_infop);
42
+#if PNG_LIBPNG_VER > 10499
43
+      fundecl (png_uint_32, get_current_row_number,
44
+               png_structp);
45
+#endif
46
 #endif /* HAVE_PNG_H */
47
     };
48
     static png_lib_handle *lib;
49