[libpng15] #ifdef out png_progressive_combine_row() when interlacing is
not supported.
diff --git a/example.c b/example.c
index c0d27f4..fc91f4a 100644
--- a/example.c
+++ b/example.c
@@ -2,7 +2,7 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
- * Last changed in libpng 1.5.4 [July 7, 2011]
+ * Last changed in libpng 1.5.6 [(PENDING RELEASE)]
* This file has been placed in the public domain by the authors.
* Maintained 1998-2011 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
@@ -341,11 +341,16 @@
/* Add filler (or alpha) byte (before/after each RGB triplet) */
png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Turn on interlace handling. REQUIRED if you are not using
* png_read_image(). To see how to handle interlacing passes,
* see the png_read_row() method below:
*/
number_passes = png_set_interlace_handling(png_ptr);
+#else
+ number_passes = 1;
+#endif /* PNG_READ_INTERLACING_SUPPORTED */
+
/* Optional call to gamma correct and add the background to the palette
* and update info structure. REQUIRED if you are expecting libpng to
@@ -527,6 +532,7 @@
*/
png_bytep old_row = ((png_bytep *)our_data)[row_num];
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* If both rows are allocated then copy the new row
* data to the corresponding row data.
*/
@@ -555,6 +561,7 @@
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
+#endif /* PNG_READ_INTERLACING_SUPPORTED */
}
end_callback(png_structp png_ptr, png_infop info)