- * Some of these rows will not be changed from the previous pass.
- * When the row is not changed, the new_row variable will be NULL.
+ *
+ * In this function you will receive a pointer to new row data from
+ * libpng called new_row that is to replace a corresponding row (of
+ * the same data format) in a buffer allocated by your application.
+ *
+ * The new row data pointer new_row may be NULL, indicating there is
+ * no new data to be replaced (in cases of interlace loading).
+ *
+ * If new_row is not NULL then you need to call
+ * png_progressive_combine_row() to replace the corresponding row as
+ * shown below:
+ */
+ /* Check if row_num is in bounds. */
+ if((row_num >= 0) && (row_num < height))
+ {
+ /* Get pointer to corresponding row in our
+ * PNG read buffer.
+ */
+ png_bytep old_row = ((png_bytep *)our_data)[row_num];
+
+ /* If both rows are allocated then copy the new row
+ * data to the corresponding row data.
+ */
+ if((old_row != NULL) && (new_row != NULL))
+ png_progressive_combine_row(png_ptr, old_row, new_row);
+ }
+/*