diff -Naru libpng-1.6.14.org/png.h libpng-1.6.14/png.h
--- libpng-1.6.14.org/png.h 2014-10-23 23:57:22.656674917 +0900
+++ libpng-1.6.14/png.h 2014-10-23 23:57:22.729677456 +0900
@@ -470,6 +470,10 @@
# include "pnglibconf.h"
#endif
+#define PNG_APNG_SUPPORTED
+#define PNG_READ_APNG_SUPPORTED
+#define PNG_WRITE_APNG_SUPPORTED
+
#ifndef PNG_VERSION_INFO_ONLY
/* Machine specific configuration. */
# include "pngconf.h"
@@ -560,6 +564,17 @@
* See pngconf.h for base types that vary by machine/system
*/
+#ifdef PNG_APNG_SUPPORTED
+/* dispose_op flags from inside fcTL */
+#define PNG_DISPOSE_OP_NONE 0x00
+#define PNG_DISPOSE_OP_BACKGROUND 0x01
+#define PNG_DISPOSE_OP_PREVIOUS 0x02
+
+/* blend_op flags from inside fcTL */
+#define PNG_BLEND_OP_SOURCE 0x00
+#define PNG_BLEND_OP_OVER 0x01
+#endif /* PNG_APNG_SUPPORTED */
+
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
@@ -880,6 +895,10 @@
#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
+#ifdef PNG_APNG_SUPPORTED
+#define PNG_INFO_acTL 0x10000
+#define PNG_INFO_fcTL 0x20000
+#endif
/* This is used for the transformation routines, as some of them
* change these values for the row. It also should enable using
@@ -917,6 +936,10 @@
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
+#ifdef PNG_APNG_SUPPORTED
+typedef PNG_CALLBACK(void, *png_progressive_frame_ptr, (png_structp,
+ png_uint_32));
+#endif
/* The following callback receives png_uint_32 row_number, int pass for the
* png_bytep data of the row. When transforming an interlaced image the
@@ -3255,6 +3278,74 @@
/*******************************************************************************
* END OF HARDWARE AND SOFTWARE OPTIONS
******************************************************************************/
+#ifdef PNG_APNG_SUPPORTED
+PNG_EXPORT(245, png_uint_32, png_get_acTL, (png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 *num
|