2
0
[email protected] 8 жил өмнө
parent
commit
8a6c6d5d5d

+ 1 - 0
oxygine/src/oxygine/core/log.cpp

@@ -49,6 +49,7 @@ namespace oxygine
         void enable()
         void enable()
         {
         {
             _enabled = true;
             _enabled = true;
+            messageln("***log enabled***");
         }
         }
 
 
         void disable()
         void disable()

+ 9 - 1
oxygine/third_party/android/libjpeg/jconfig.h

@@ -18,11 +18,19 @@
 /* Define this if you get warnings about undefined structures. */
 /* Define this if you get warnings about undefined structures. */
 /* #undef INCOMPLETE_TYPES_BROKEN */
 /* #undef INCOMPLETE_TYPES_BROKEN */
 
 
-/* Define "boolean" as unsigned char, not int, on Windows systems. */
+/* Define "boolean" as unsigned char, not enum, on Windows systems. */
+#ifdef _WIN32
 #ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
 #ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
 typedef unsigned char boolean;
 typedef unsigned char boolean;
 #endif
 #endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
 #define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
 #define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
+#endif
 
 
 #ifdef JPEG_INTERNALS
 #ifdef JPEG_INTERNALS
 
 

+ 68 - 12
oxygine/third_party/android/libjpeg/jmorecfg.h

@@ -2,7 +2,7 @@
  * jmorecfg.h
  * jmorecfg.h
  *
  *
  * Copyright (C) 1991-1997, Thomas G. Lane.
  * Copyright (C) 1991-1997, Thomas G. Lane.
- * Modified 1997-2012 by Guido Vollbeding.
+ * Modified 1997-2013 by Guido Vollbeding.
  * This file is part of the Independent JPEG Group's software.
  * This file is part of the Independent JPEG Group's software.
  * For conditions of distribution and use, see the accompanying README file.
  * For conditions of distribution and use, see the accompanying README file.
  *
  *
@@ -15,13 +15,22 @@
 /*
 /*
  * Define BITS_IN_JSAMPLE as either
  * Define BITS_IN_JSAMPLE as either
  *   8   for 8-bit sample values (the usual setting)
  *   8   for 8-bit sample values (the usual setting)
+ *   9   for 9-bit sample values
+ *   10  for 10-bit sample values
+ *   11  for 11-bit sample values
  *   12  for 12-bit sample values
  *   12  for 12-bit sample values
- * Only 8 and 12 are legal data precisions for lossy JPEG according to the
- * JPEG standard, and the IJG code does not support anything else!
- * We do not support run-time selection of data precision, sorry.
+ * Only 8, 9, 10, 11, and 12 bits sample data precision are supported for
+ * full-feature DCT processing.  Further depths up to 16-bit may be added
+ * later for the lossless modes of operation.
+ * Run-time selection and conversion of data precision will be added later
+ * and are currently not supported, sorry.
+ * Exception:  The transcoding part (jpegtran) supports all settings in a
+ * single instance, since it operates on the level of DCT coefficients and
+ * not sample values.  The DCT coefficients are of the same type (16 bits)
+ * in all cases (see below).
  */
  */
 
 
-#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+#define BITS_IN_JSAMPLE  8	/* use 8, 9, 10, 11, or 12 */
 
 
 
 
 /*
 /*
@@ -77,6 +86,48 @@ typedef char JSAMPLE;
 #endif /* BITS_IN_JSAMPLE == 8 */
 #endif /* BITS_IN_JSAMPLE == 8 */
 
 
 
 
+#if BITS_IN_JSAMPLE == 9
+/* JSAMPLE should be the smallest type that will hold the values 0..511.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	511
+#define CENTERJSAMPLE	256
+
+#endif /* BITS_IN_JSAMPLE == 9 */
+
+
+#if BITS_IN_JSAMPLE == 10
+/* JSAMPLE should be the smallest type that will hold the values 0..1023.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	1023
+#define CENTERJSAMPLE	512
+
+#endif /* BITS_IN_JSAMPLE == 10 */
+
+
+#if BITS_IN_JSAMPLE == 11
+/* JSAMPLE should be the smallest type that will hold the values 0..2047.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	2047
+#define CENTERJSAMPLE	1024
+
+#endif /* BITS_IN_JSAMPLE == 11 */
+
+
 #if BITS_IN_JSAMPLE == 12
 #if BITS_IN_JSAMPLE == 12
 /* JSAMPLE should be the smallest type that will hold the values 0..4095.
 /* JSAMPLE should be the smallest type that will hold the values 0..4095.
  * On nearly all machines "short" will do nicely.
  * On nearly all machines "short" will do nicely.
@@ -252,7 +303,10 @@ typedef void noreturn_t;
  * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
  * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
  */
  */
 
 
-#ifdef HAVE_BOOLEAN
+#ifndef HAVE_BOOLEAN
+#if defined FALSE || defined TRUE || defined QGLOBAL_H
+/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */
+typedef int boolean;
 #ifndef FALSE			/* in case these macros already exist */
 #ifndef FALSE			/* in case these macros already exist */
 #define FALSE	0		/* values of boolean */
 #define FALSE	0		/* values of boolean */
 #endif
 #endif
@@ -262,6 +316,7 @@ typedef void noreturn_t;
 #else
 #else
 typedef enum { FALSE = 0, TRUE = 1 } boolean;
 typedef enum { FALSE = 0, TRUE = 1 } boolean;
 #endif
 #endif
+#endif
 
 
 
 
 /*
 /*
@@ -299,11 +354,12 @@ typedef enum { FALSE = 0, TRUE = 1 } boolean;
 #define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
 #define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
 #define DCT_SCALING_SUPPORTED	    /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
 #define DCT_SCALING_SUPPORTED	    /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
 #define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
 #define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
-/* Note: if you selected 12-bit data precision, it is dangerous to turn off
- * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
- * precision, so jchuff.c normally uses entropy optimization to compute
- * usable tables for higher precision.  If you don't want to do optimization,
- * you'll have to supply different default Huffman tables.
+/* Note: if you selected more than 8-bit data precision, it is dangerous to
+ * turn off ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only
+ * good for 8-bit precision, so arithmetic coding is recommended for higher
+ * precision.  The Huffman encoder normally uses entropy optimization to
+ * compute usable tables for higher precision.  Otherwise, you'll have to
+ * supply different default Huffman tables.
  * The exact same statements apply for progressive JPEG: the default tables
  * The exact same statements apply for progressive JPEG: the default tables
  * don't work for progressive mode.  (This may get fixed, however.)
  * don't work for progressive mode.  (This may get fixed, however.)
  */
  */
@@ -314,7 +370,7 @@ typedef enum { FALSE = 0, TRUE = 1 } boolean;
 #define D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
 #define D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
 #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
 #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
 #define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
 #define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
-#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? (Requires DCT_ISLOW)*/
 #define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
 #define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
 #define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
 #define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
 #undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
 #undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */

+ 20 - 13
oxygine/third_party/android/libjpeg/jpeglib.h

@@ -2,7 +2,7 @@
  * jpeglib.h
  * jpeglib.h
  *
  *
  * Copyright (C) 1991-1998, Thomas G. Lane.
  * Copyright (C) 1991-1998, Thomas G. Lane.
- * Modified 2002-2012 by Guido Vollbeding.
+ * Modified 2002-2015 by Guido Vollbeding.
  * This file is part of the Independent JPEG Group's software.
  * This file is part of the Independent JPEG Group's software.
  * For conditions of distribution and use, see the accompanying README file.
  * For conditions of distribution and use, see the accompanying README file.
  *
  *
@@ -39,12 +39,12 @@ extern "C" {
 
 
 #define JPEG_LIB_VERSION        90	/* Compatibility version 9.0 */
 #define JPEG_LIB_VERSION        90	/* Compatibility version 9.0 */
 #define JPEG_LIB_VERSION_MAJOR  9
 #define JPEG_LIB_VERSION_MAJOR  9
-#define JPEG_LIB_VERSION_MINOR  0
+#define JPEG_LIB_VERSION_MINOR  2
 
 
 
 
 /* Various constants determining the sizes of things.
 /* Various constants determining the sizes of things.
- * All of these are specified by the JPEG standard, so don't change them
- * if you want to be compatible.
+ * All of these are specified by the JPEG standard,
+ * so don't change them if you want to be compatible.
  */
  */
 
 
 #define DCTSIZE		    8	/* The basic DCT block is 8x8 coefficients */
 #define DCTSIZE		    8	/* The basic DCT block is 8x8 coefficients */
@@ -157,16 +157,21 @@ typedef struct {
   /* The downsampled dimensions are the component's actual, unpadded number
   /* The downsampled dimensions are the component's actual, unpadded number
    * of samples at the main buffer (preprocessing/compression interface);
    * of samples at the main buffer (preprocessing/compression interface);
    * DCT scaling is included, so
    * DCT scaling is included, so
-   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
+   * downsampled_width =
+   *   ceil(image_width * Hi/Hmax * DCT_h_scaled_size/block_size)
    * and similarly for height.
    * and similarly for height.
    */
    */
   JDIMENSION downsampled_width;	 /* actual width in samples */
   JDIMENSION downsampled_width;	 /* actual width in samples */
   JDIMENSION downsampled_height; /* actual height in samples */
   JDIMENSION downsampled_height; /* actual height in samples */
-  /* This flag is used only for decompression.  In cases where some of the
-   * components will be ignored (eg grayscale output from YCbCr image),
-   * we can skip most computations for the unused components.
+  /* For decompression, in cases where some of the components will be
+   * ignored (eg grayscale output from YCbCr image), we can skip most
+   * computations for the unused components.
+   * For compression, some of the components will need further quantization
+   * scale by factor of 2 after DCT (eg BG_YCC output from normal RGB input).
+   * The field is first set TRUE for decompression, FALSE for compression
+   * in initial_setup, and then adapted in color conversion setup.
    */
    */
-  boolean component_needed;	/* do we need the value of this component? */
+  boolean component_needed;
 
 
   /* These values are computed before starting a scan of the component. */
   /* These values are computed before starting a scan of the component. */
   /* The decompressor output side may not use these variables. */
   /* The decompressor output side may not use these variables. */
@@ -215,10 +220,12 @@ struct jpeg_marker_struct {
 typedef enum {
 typedef enum {
 	JCS_UNKNOWN,		/* error/unspecified */
 	JCS_UNKNOWN,		/* error/unspecified */
 	JCS_GRAYSCALE,		/* monochrome */
 	JCS_GRAYSCALE,		/* monochrome */
-	JCS_RGB,		/* red/green/blue */
-	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV) */
+	JCS_RGB,		/* red/green/blue, standard RGB (sRGB) */
+	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV), standard YCC */
 	JCS_CMYK,		/* C/M/Y/K */
 	JCS_CMYK,		/* C/M/Y/K */
-	JCS_YCCK		/* Y/Cb/Cr/K */
+	JCS_YCCK,		/* Y/Cb/Cr/K */
+	JCS_BG_RGB,		/* big gamut red/green/blue, bg-sRGB */
+	JCS_BG_YCC		/* big gamut Y/Cb/Cr, bg-sYCC */
 } J_COLOR_SPACE;
 } J_COLOR_SPACE;
 
 
 /* Supported color transforms. */
 /* Supported color transforms. */
@@ -972,7 +979,7 @@ EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
 			       unsigned char ** outbuffer,
 			       unsigned char ** outbuffer,
 			       unsigned long * outsize));
 			       unsigned long * outsize));
 EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
 EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
-			      unsigned char * inbuffer,
+			      const unsigned char * inbuffer,
 			      unsigned long insize));
 			      unsigned long insize));
 
 
 /* Default parameter setup for compression */
 /* Default parameter setup for compression */

+ 106 - 128
oxygine/third_party/android/libpng/png.h

@@ -1,8 +1,8 @@
 
 
 /* png.h - header file for PNG reference library
 /* png.h - header file for PNG reference library
  *
  *
- * libpng version 1.6.2 - April 25, 2013
- * Copyright (c) 1998-2013 Glenn Randers-Pehrson
+ * libpng version 1.6.16, December 22, 2014
+ * Copyright (c) 1998-2014 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
  *
@@ -11,7 +11,7 @@
  * Authors and maintainers:
  * Authors and maintainers:
  *   libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
  *   libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
  *   libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
  *   libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *   libpng versions 0.97, January 1998, through 1.6.2 - April 25, 2013: Glenn
+ *   libpng versions 0.97, January 1998, through 1.6.16, December 22, 2014: Glenn
  *   See also "Contributing Authors", below.
  *   See also "Contributing Authors", below.
  *
  *
  * Note about libpng version numbers:
  * Note about libpng version numbers:
@@ -175,6 +175,43 @@
  *    1.6.2beta01             16    10602  16.so.16.2[.0]
  *    1.6.2beta01             16    10602  16.so.16.2[.0]
  *    1.6.2rc01-06            16    10602  16.so.16.2[.0]
  *    1.6.2rc01-06            16    10602  16.so.16.2[.0]
  *    1.6.2                   16    10602  16.so.16.2[.0]
  *    1.6.2                   16    10602  16.so.16.2[.0]
+ *    1.6.3beta01-11          16    10603  16.so.16.3[.0]
+ *    1.6.3rc01               16    10603  16.so.16.3[.0]
+ *    1.6.3                   16    10603  16.so.16.3[.0]
+ *    1.6.4beta01-02          16    10604  16.so.16.4[.0]
+ *    1.6.4rc01               16    10604  16.so.16.4[.0]
+ *    1.6.4                   16    10604  16.so.16.4[.0]
+ *    1.6.5                   16    10605  16.so.16.5[.0]
+ *    1.6.6                   16    10606  16.so.16.6[.0]
+ *    1.6.7beta01-04          16    10607  16.so.16.7[.0]
+ *    1.6.7rc01-03            16    10607  16.so.16.7[.0]
+ *    1.6.7                   16    10607  16.so.16.7[.0]
+ *    1.6.8beta01-02          16    10608  16.so.16.8[.0]
+ *    1.6.8rc01-02            16    10608  16.so.16.8[.0]
+ *    1.6.8                   16    10608  16.so.16.8[.0]
+ *    1.6.9beta01-04          16    10609  16.so.16.9[.0]
+ *    1.6.9rc01-02            16    10609  16.so.16.9[.0]
+ *    1.6.9                   16    10609  16.so.16.9[.0]
+ *    1.6.10beta01-03         16    10610  16.so.16.10[.0]
+ *    1.6.10rc01-03           16    10610  16.so.16.10[.0]
+ *    1.6.10                  16    10610  16.so.16.10[.0]
+ *    1.6.11beta01-06         16    10611  16.so.16.11[.0]
+ *    1.6.11rc01-02           16    10611  16.so.16.11[.0]
+ *    1.6.11                  16    10611  16.so.16.11[.0]
+ *    1.6.12rc01-03           16    10612  16.so.16.12[.0]
+ *    1.6.12                  16    10612  16.so.16.12[.0]
+ *    1.6.13beta01-04         16    10613  16.so.16.13[.0]
+ *    1.6.13rc01-02           16    10613  16.so.16.13[.0]
+ *    1.6.13                  16    10613  16.so.16.13[.0]
+ *    1.6.14beta01-07         16    10614  16.so.16.14[.0]
+ *    1.6.14rc01-02           16    10614  16.so.16.14[.0]
+ *    1.6.14                  16    10614  16.so.16.14[.0]
+ *    1.6.15beta01-08         16    10615  16.so.16.15[.0]
+ *    1.6.15rc01-03           16    10615  16.so.16.15[.0]
+ *    1.6.15                  16    10615  16.so.16.15[.0]
+ *    1.6.16beta01-03         16    10616  16.so.16.16[.0]
+ *    1.6.16rc01-02           16    10616  16.so.16.16[.0]
+ *    1.6.16                  16    10616  16.so.16.16[.0]
  *
  *
  *   Henceforth the source version will match the shared-library major
  *   Henceforth the source version will match the shared-library major
  *   and minor numbers; the shared-library major version number will be
  *   and minor numbers; the shared-library major version number will be
@@ -206,8 +243,8 @@
  *
  *
  * This code is released under the libpng license.
  * This code is released under the libpng license.
  *
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.6.2, April 25, 2013, are
- * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
+ * Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
  * distributed according to the same disclaimer and license as libpng-1.2.5
  * distributed according to the same disclaimer and license as libpng-1.2.5
  * with the following individual added to the list of Contributing Authors:
  * with the following individual added to the list of Contributing Authors:
  *
  *
@@ -318,13 +355,13 @@
  * Y2K compliance in libpng:
  * Y2K compliance in libpng:
  * =========================
  * =========================
  *
  *
- *    April 25, 2013
+ *    December 22, 2014
  *
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
  *    an official declaration.
  *
  *
  *    This is your unofficial assurance that libpng from version 0.71 and
  *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.6.2 are Y2K compliant.  It is my belief that
+ *    upward through 1.6.16 are Y2K compliant.  It is my belief that
  *    earlier versions were also Y2K compliant.
  *    earlier versions were also Y2K compliant.
  *
  *
  *    Libpng only has two year fields.  One is a 2-byte unsigned integer
  *    Libpng only has two year fields.  One is a 2-byte unsigned integer
@@ -377,16 +414,18 @@
 /* This is not the place to learn how to use libpng. The file libpng-manual.txt
 /* This is not the place to learn how to use libpng. The file libpng-manual.txt
  * describes how to use libpng, and the file example.c summarizes it
  * describes how to use libpng, and the file example.c summarizes it
  * with some code on which to build.  This file is useful for looking
  * with some code on which to build.  This file is useful for looking
- * at the actual function definitions and structure components.
+ * at the actual function definitions and structure components.  If that
+ * file has been stripped from your copy of libpng, you can find it at
+ * <http://www.libpng.org/pub/png/libpng-manual.txt>
  *
  *
  * If you just need to read a PNG file and don't want to read the documentation
  * If you just need to read a PNG file and don't want to read the documentation
  * skip to the end of this file and read the section entitled 'simplified API'.
  * skip to the end of this file and read the section entitled 'simplified API'.
  */
  */
 
 
 /* Version information for png.h - this should match the version in png.c */
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.2"
+#define PNG_LIBPNG_VER_STRING "1.6.16"
 #define PNG_HEADER_VERSION_STRING \
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.2 - April 25, 2013\n"
+     " libpng version 1.6.16 - December 22, 2014\n"
 
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
 #define PNG_LIBPNG_VER_DLLNUM  16
@@ -394,7 +433,7 @@
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MINOR   6
 #define PNG_LIBPNG_VER_MINOR   6
-#define PNG_LIBPNG_VER_RELEASE 2
+#define PNG_LIBPNG_VER_RELEASE 16
 
 
 /* This should match the numeric part of the final component of
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -425,7 +464,7 @@
  * version 1.0.0 was mis-numbered 100 instead of 10000).  From
  * version 1.0.0 was mis-numbered 100 instead of 10000).  From
  * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release
  * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release
  */
  */
-#define PNG_LIBPNG_VER 10602 /* 1.6.2 */
+#define PNG_LIBPNG_VER 10616 /* 1.6.16 */
 
 
 /* Library configuration: these options cannot be changed after
 /* Library configuration: these options cannot be changed after
  * the library has been built.
  * the library has been built.
@@ -530,7 +569,7 @@ extern "C" {
 /* This triggers a compiler error in png.c, if png.c and png.h
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  * do not agree upon the version number.
  */
  */
-typedef char* png_libpng_version_1_6_2;
+typedef char* png_libpng_version_1_6_16;
 
 
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  *
  *
@@ -712,7 +751,8 @@ typedef png_time * png_timep;
 typedef const png_time * png_const_timep;
 typedef const png_time * png_const_timep;
 typedef png_time * * png_timepp;
 typedef png_time * * png_timepp;
 
 
-#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
+#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\
+   defined(PNG_USER_CHUNKS_SUPPORTED)
 /* png_unknown_chunk is a structure to hold queued chunks for which there is
 /* png_unknown_chunk is a structure to hold queued chunks for which there is
  * no specific support.  The idea is that we can use this to queue
  * no specific support.  The idea is that we can use this to queue
  * up private chunks for output even though the library doesn't actually
  * up private chunks for output even though the library doesn't actually
@@ -1142,7 +1182,7 @@ PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
 
 
 /* Convert from time_t to png_time.  Uses gmtime() */
 /* Convert from time_t to png_time.  Uses gmtime() */
 PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
 PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
-#endif /* PNG_CONVERT_tIME_SUPPORTED */
+#endif /* CONVERT_tIME */
 
 
 #ifdef PNG_READ_EXPAND_SUPPORTED
 #ifdef PNG_READ_EXPAND_SUPPORTED
 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
@@ -1191,9 +1231,9 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
 #endif
 #endif
 
 
 #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
 #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
-/* How the alpha channel is interpreted - this affects how the color channels of
- * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
- * file, is present.
+/* How the alpha channel is interpreted - this affects how the color channels
+ * of a PNG file are returned to the calling application when an alpha channel,
+ * or a tRNS chunk in a palette file, is present.
  *
  *
  * This has no effect on the way pixels are written into a PNG output
  * This has no effect on the way pixels are written into a PNG output
  * datastream. The color samples in a PNG datastream are never premultiplied
  * datastream. The color samples in a PNG datastream are never premultiplied
@@ -1201,33 +1241,19 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
  *
  *
  * The default is to return data according to the PNG specification: the alpha
  * The default is to return data according to the PNG specification: the alpha
  * channel is a linear measure of the contribution of the pixel to the
  * channel is a linear measure of the contribution of the pixel to the
- * corresponding composited pixel.  The gamma encoded color channels must be
- * scaled according to the contribution and to do this it is necessary to undo
+ * corresponding composited pixel, and the color channels are unassociated
+ * (not premultiplied).  The gamma encoded color channels must be scaled
+ * according to the contribution and to do this it is necessary to undo
  * the encoding, scale the color values, perform the composition and reencode
  * the encoding, scale the color values, perform the composition and reencode
  * the values.  This is the 'PNG' mode.
  * the values.  This is the 'PNG' mode.
  *
  *
  * The alternative is to 'associate' the alpha with the color information by
  * The alternative is to 'associate' the alpha with the color information by
- * storing color channel values that have been scaled by the alpha.  The
- * advantage is that the color channels can be resampled (the image can be
- * scaled) in this form.  The disadvantage is that normal practice is to store
- * linear, not (gamma) encoded, values and this requires 16-bit channels for
- * still images rather than the 8-bit channels that are just about sufficient if
- * gamma encoding is used.  In addition all non-transparent pixel values,
- * including completely opaque ones, must be gamma encoded to produce the final
- * image.  This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the
- * latter being the two common names for associated alpha color channels.)
- *
- * Since it is not necessary to perform arithmetic on opaque color values so
- * long as they are not to be resampled and are in the final color space it is
- * possible to optimize the handling of alpha by storing the opaque pixels in
- * the PNG format (adjusted for the output color space) while storing partially
- * opaque pixels in the standard, linear, format.  The accuracy required for
- * standard alpha composition is relatively low, because the pixels are
- * isolated, therefore typically the accuracy loss in storing 8-bit linear
- * values is acceptable.  (This is not true if the alpha channel is used to
- * simulate transparency over large areas - use 16 bits or the PNG mode in
- * this case!)  This is the 'OPTIMIZED' mode.  For this mode a pixel is
- * treated as opaque only if the alpha value is equal to the maximum value.
+ * storing color channel values that have been scaled by the alpha.
+ * image.  These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes
+ * (the latter being the two common names for associated alpha color channels).
+ *
+ * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha
+ * value is equal to the maximum value.
  *
  *
  * The final choice is to gamma encode the alpha channel as well.  This is
  * The final choice is to gamma encode the alpha channel as well.  This is
  * broken because, in practice, no implementation that uses this choice
  * broken because, in practice, no implementation that uses this choice
@@ -1254,68 +1280,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
 
 
 #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
 #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
 /* The output_gamma value is a screen gamma in libpng terminology: it expresses
 /* The output_gamma value is a screen gamma in libpng terminology: it expresses
- * how to decode the output values, not how they are encoded.  The values used
- * correspond to the normal numbers used to describe the overall gamma of a
- * computer display system; for example 2.2 for an sRGB conformant system.  The
- * values are scaled by 100000 in the _fixed version of the API (so 220000 for
- * sRGB.)
- *
- * The inverse of the value is always used to provide a default for the PNG file
- * encoding if it has no gAMA chunk and if png_set_gamma() has not been called
- * to override the PNG gamma information.
- *
- * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode
- * opaque pixels however pixels with lower alpha values are not encoded,
- * regardless of the output gamma setting.
- *
- * When the standard Porter Duff handling is requested with mode 1 the output
- * encoding is set to be linear and the output_gamma value is only relevant
- * as a default for input data that has no gamma information.  The linear output
- * encoding will be overridden if png_set_gamma() is called - the results may be
- * highly unexpected!
- *
- * The following numbers are derived from the sRGB standard and the research
- * behind it.  sRGB is defined to be approximated by a PNG gAMA chunk value of
- * 0.45455 (1/2.2) for PNG.  The value implicitly includes any viewing
- * correction required to take account of any differences in the color
- * environment of the original scene and the intended display environment; the
- * value expresses how to *decode* the image for display, not how the original
- * data was *encoded*.
- *
- * sRGB provides a peg for the PNG standard by defining a viewing environment.
- * sRGB itself, and earlier TV standards, actually use a more complex transform
- * (a linear portion then a gamma 2.4 power law) than PNG can express.  (PNG is
- * limited to simple power laws.)  By saying that an image for direct display on
- * an sRGB conformant system should be stored with a gAMA chunk value of 45455
- * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification
- * makes it possible to derive values for other display systems and
- * environments.
- *
- * The Mac value is deduced from the sRGB based on an assumption that the actual
- * extra viewing correction used in early Mac display systems was implemented as
- * a power 1.45 lookup table.
- *
- * Any system where a programmable lookup table is used or where the behavior of
- * the final display device characteristics can be changed requires system
- * specific code to obtain the current characteristic.  However this can be
- * difficult and most PNG gamma correction only requires an approximate value.
- *
- * By default, if png_set_alpha_mode() is not called, libpng assumes that all
- * values are unencoded, linear, values and that the output device also has a
- * linear characteristic.  This is only very rarely correct - it is invariably
- * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the
- * default if you don't know what the right answer is!
- *
- * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS
- * 10.6) which used a correction table to implement a somewhat lower gamma on an
- * otherwise sRGB system.
- *
- * Both these values are reserved (not simple gamma values) in order to allow
- * more precise correction internally in the future.
- *
- * NOTE: the following values can be passed to either the fixed or floating
- * point APIs, but the floating point API will also accept floating point
- * values.
+ * how to decode the output values, not how they are encoded.
  */
  */
 #define PNG_DEFAULT_sRGB -1       /* sRGB gamma and color space */
 #define PNG_DEFAULT_sRGB -1       /* sRGB gamma and color space */
 #define PNG_GAMMA_MAC_18 -2       /* Old Mac '1.8' gamma and color space */
 #define PNG_GAMMA_MAC_18 -2       /* Old Mac '1.8' gamma and color space */
@@ -1423,7 +1388,7 @@ PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
 PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
 PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
     png_uint_32 filler, int flags));
     png_uint_32 filler, int flags));
-#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
+#endif /* READ_FILLER || WRITE_FILLER */
 
 
 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
 /* Swap bytes in 16-bit depth files. */
 /* Swap bytes in 16-bit depth files. */
@@ -1687,7 +1652,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
     (png_structrp png_ptr, int heuristic_method, int num_weights,
     (png_structrp png_ptr, int heuristic_method, int num_weights,
     png_const_fixed_point_p filter_weights,
     png_const_fixed_point_p filter_weights,
     png_const_fixed_point_p filter_costs))
     png_const_fixed_point_p filter_costs))
-#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
+#endif /* WRITE_WEIGHTED_FILTER */
 
 
 /* Heuristic used for row filter selection.  These defines should NOT be
 /* Heuristic used for row filter selection.  These defines should NOT be
  * changed.
  * changed.
@@ -1743,7 +1708,7 @@ PNG_EXPORT(225, void, png_set_text_compression_window_bits,
 
 
 PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
 PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
     int method));
     int method));
-#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
+#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
 
 
 /* These next functions are called for input/output, memory, and error
 /* These next functions are called for input/output, memory, and error
  * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
  * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
@@ -1903,7 +1868,6 @@ PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save));
  */
  */
 PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
 PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
 
 
-#ifdef PNG_READ_INTERLACING_SUPPORTED
 /* Function that combines rows.  'new_row' is a flag that should come from
 /* Function that combines rows.  'new_row' is a flag that should come from
  * the callback and be non-NULL if anything needs to be done; the library
  * the callback and be non-NULL if anything needs to be done; the library
  * stores its own version of the new data internally and ignores the passed
  * stores its own version of the new data internally and ignores the passed
@@ -1911,8 +1875,7 @@ PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
  */
  */
 PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr,
 PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr,
     png_bytep old_row, png_const_bytep new_row));
     png_bytep old_row, png_const_bytep new_row));
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+#endif /* PROGRESSIVE_READ */
 
 
 PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr,
 PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr,
     png_alloc_size_t size), PNG_ALLOCATED);
     png_alloc_size_t size), PNG_ALLOCATED);
@@ -1938,8 +1901,8 @@ PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
  * It is unlikely that this function works correctly as of 1.6.0 and using it
  * It is unlikely that this function works correctly as of 1.6.0 and using it
  * may result either in memory leaks or double free of allocated data.
  * may result either in memory leaks or double free of allocated data.
  */
  */
-PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr,
-    png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED);
+PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
+    png_inforp info_ptr, int freer, png_uint_32 mask));
 
 
 /* Assignments for png_data_freer */
 /* Assignments for png_data_freer */
 #define PNG_DESTROY_WILL_FREE_DATA 1
 #define PNG_DESTROY_WILL_FREE_DATA 1
@@ -1981,6 +1944,8 @@ PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
 #else
 #else
 /* Fatal error in PNG image of libpng - can't continue */
 /* Fatal error in PNG image of libpng - can't continue */
 PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
 PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
+#  define png_error(s1,s2) png_err(s1)
+#  define png_chunk_error(s1,s2) png_err(s1)
 #endif
 #endif
 
 
 #ifdef PNG_WARNINGS_SUPPORTED
 #ifdef PNG_WARNINGS_SUPPORTED
@@ -1991,6 +1956,9 @@ PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr,
 /* Non-fatal error in libpng, chunk name is prepended to message. */
 /* Non-fatal error in libpng, chunk name is prepended to message. */
 PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
 PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
     png_const_charp warning_message));
     png_const_charp warning_message));
+#else
+#  define png_warning(s1,s2) ((void)(s1))
+#  define png_chunk_warning(s1,s2) ((void)(s1))
 #endif
 #endif
 
 
 #ifdef PNG_BENIGN_ERRORS_SUPPORTED
 #ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -2108,7 +2076,7 @@ PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
 PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
 PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
     (png_const_structrp png_ptr, png_const_inforp info_ptr));
     (png_const_structrp png_ptr, png_const_inforp info_ptr));
 
 
-#endif /* PNG_EASY_ACCESS_SUPPORTED */
+#endif /* EASY_ACCESS */
 
 
 #ifdef PNG_READ_SUPPORTED
 #ifdef PNG_READ_SUPPORTED
 /* Returns pointer to signature string read from PNG header */
 /* Returns pointer to signature string read from PNG header */
@@ -2360,7 +2328,7 @@ PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr,
 PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
 PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
     png_inforp info_ptr, int unit,
     png_inforp info_ptr, int unit,
     png_const_charp swidth, png_const_charp sheight));
     png_const_charp swidth, png_const_charp sheight));
-#endif /* PNG_sCAL_SUPPORTED */
+#endif /* sCAL */
 
 
 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 /* Provide the default handling for all unknown chunks or, optionally, for
 /* Provide the default handling for all unknown chunks or, optionally, for
@@ -2501,11 +2469,15 @@ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr,
 
 
 #ifdef PNG_INFO_IMAGE_SUPPORTED
 #ifdef PNG_INFO_IMAGE_SUPPORTED
 /* The "params" pointer is currently not used and is for future expansion. */
 /* The "params" pointer is currently not used and is for future expansion. */
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
 PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
 PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
     int transforms, png_voidp params));
     int transforms, png_voidp params));
+#endif
+#ifdef PNG_WRITE_SUPPORTED
 PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
 PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
     int transforms, png_voidp params));
     int transforms, png_voidp params));
 #endif
 #endif
+#endif
 
 
 PNG_EXPORT(180, png_const_charp, png_get_copyright,
 PNG_EXPORT(180, png_const_charp, png_get_copyright,
     (png_const_structrp png_ptr));
     (png_const_structrp png_ptr));
@@ -2584,8 +2556,8 @@ PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
 PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr,
 PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr,
     png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
     png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
     int *unit_type));
     int *unit_type));
-#  endif /* PNG_pHYs_SUPPORTED */
-#endif  /* PNG_INCH_CONVERSIONS_SUPPORTED */
+#  endif /* pHYs */
+#endif  /* INCH_CONVERSIONS */
 
 
 /* Added in libpng-1.4.0 */
 /* Added in libpng-1.4.0 */
 #ifdef PNG_IO_STATE_SUPPORTED
 #ifdef PNG_IO_STATE_SUPPORTED
@@ -2608,7 +2580,7 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
 #  define PNG_IO_CHUNK_CRC   0x0080   /* currently at the chunk crc */
 #  define PNG_IO_CHUNK_CRC   0x0080   /* currently at the chunk crc */
 #  define PNG_IO_MASK_OP     0x000f   /* current operation: reading/writing */
 #  define PNG_IO_MASK_OP     0x000f   /* current operation: reading/writing */
 #  define PNG_IO_MASK_LOC    0x00f0   /* current location: sig/hdr/data/crc */
 #  define PNG_IO_MASK_LOC    0x00f0   /* current location: sig/hdr/data/crc */
-#endif /* ?PNG_IO_STATE_SUPPORTED */
+#endif /* IO_STATE */
 
 
 /* Interlace support.  The following macros are always defined so that if
 /* Interlace support.  The following macros are always defined so that if
  * libpng interlace handling is turned off the macros may be used to handle
  * libpng interlace handling is turned off the macros may be used to handle
@@ -2712,7 +2684,7 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
      (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
      (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
      (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) +         \
      (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) +         \
      32767) / 65535)
      32767) / 65535)
-#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
+#endif /* READ_COMPOSITE_NODIV */
 
 
 #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
 #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
 PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
 PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
@@ -2782,6 +2754,8 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
 #  endif
 #  endif
 #endif
 #endif
 
 
+#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
+    defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
 /*******************************************************************************
 /*******************************************************************************
  *  SIMPLIFIED API
  *  SIMPLIFIED API
  *******************************************************************************
  *******************************************************************************
@@ -2853,7 +2827,7 @@ typedef struct
 #  define PNG_IMAGE_WARNING 1
 #  define PNG_IMAGE_WARNING 1
 #  define PNG_IMAGE_ERROR 2
 #  define PNG_IMAGE_ERROR 2
    /*
    /*
-    * The result is a two bit code such that a value more than 1 indicates
+    * The result is a two-bit code such that a value more than 1 indicates
     * a failure in the API just called:
     * a failure in the API just called:
     *
     *
     *    0 - no warning or error
     *    0 - no warning or error
@@ -3138,7 +3112,7 @@ PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
 PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
 PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
    FILE* file));
    FILE* file));
    /* The PNG header is read from the stdio FILE object. */
    /* The PNG header is read from the stdio FILE object. */
-#endif /* PNG_STDIO_SUPPORTED */
+#endif /* STDIO */
 
 
 PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
 PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
    png_const_voidp memory, png_size_t size));
    png_const_voidp memory, png_size_t size));
@@ -3183,9 +3157,10 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
    /* Free any data allocated by libpng in image->opaque, setting the pointer to
    /* Free any data allocated by libpng in image->opaque, setting the pointer to
     * NULL.  May be called at any time after the structure is initialized.
     * NULL.  May be called at any time after the structure is initialized.
     */
     */
-#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
+#endif /* SIMPLIFIED_READ */
 
 
 #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
 #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
+#ifdef PNG_STDIO_SUPPORTED
 /* WRITE APIS
 /* WRITE APIS
  * ----------
  * ----------
  * For write you must initialize a png_image structure to describe the image to
  * For write you must initialize a png_image structure to describe the image to
@@ -3228,10 +3203,12 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
  *
  *
  * Note that the write API does not support interlacing or sub-8-bit pixels.
  * Note that the write API does not support interlacing or sub-8-bit pixels.
  */
  */
-#endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */
+#endif /* STDIO */
+#endif /* SIMPLIFIED_WRITE */
 /*******************************************************************************
 /*******************************************************************************
  *  END OF SIMPLIFIED API
  *  END OF SIMPLIFIED API
  ******************************************************************************/
  ******************************************************************************/
+#endif /* SIMPLIFIED_{READ|WRITE} */
 
 
 #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
 #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
 PNG_EXPORT(242, void, png_set_check_for_invalid_index,
 PNG_EXPORT(242, void, png_set_check_for_invalid_index,
@@ -3267,7 +3244,9 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
 #ifdef PNG_ARM_NEON_API_SUPPORTED
 #ifdef PNG_ARM_NEON_API_SUPPORTED
 #  define PNG_ARM_NEON   0 /* HARDWARE: ARM Neon SIMD instructions supported */
 #  define PNG_ARM_NEON   0 /* HARDWARE: ARM Neon SIMD instructions supported */
 #endif
 #endif
-#define PNG_OPTION_NEXT  2 /* Next option - numbers must be even */
+#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */
+#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */
+#define PNG_OPTION_NEXT  6 /* Next option - numbers must be even */
 
 
 /* Return values: NOTE: there are four values and 'off' is *not* zero */
 /* Return values: NOTE: there are four values and 'off' is *not* zero */
 #define PNG_OPTION_UNSET   0 /* Unset - defaults to off */
 #define PNG_OPTION_UNSET   0 /* Unset - defaults to off */
@@ -3277,19 +3256,18 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
 
 
 PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
 PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
    int onoff));
    int onoff));
-#endif
+#endif /* SET_OPTION */
 
 
 /*******************************************************************************
 /*******************************************************************************
- *  END OF HARDWARE OPTIONS
+ *  END OF HARDWARE AND SOFTWARE OPTIONS
  ******************************************************************************/
  ******************************************************************************/
 
 
-/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
- * defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt
+/* Maintainer: Put new public prototypes here ^, in libpng.3, in project
+ * defs, and in scripts/symbols.def.
  */
  */
 
 
 /* The last ordinal number (this is the *last* one already used; the next
 /* The last ordinal number (this is the *last* one already used; the next
- * one to use is one more than this.)  Maintainer, remember to add an entry to
- * scripts/symbols.def as well.
+ * one to use is one more than this.)
  */
  */
 #ifdef PNG_EXPORT_LAST_ORDINAL
 #ifdef PNG_EXPORT_LAST_ORDINAL
   PNG_EXPORT_LAST_ORDINAL(244);
   PNG_EXPORT_LAST_ORDINAL(244);

+ 35 - 7
oxygine/third_party/android/libpng/pngconf.h

@@ -1,9 +1,9 @@
 
 
 /* pngconf.h - machine configurable file for libpng
 /* pngconf.h - machine configurable file for libpng
  *
  *
- * libpng version 1.6.2 - April 25, 2013
+ * libpng version 1.6.16,December 22, 2014
  *
  *
- * Copyright (c) 1998-2013 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2014 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
  *
@@ -238,6 +238,7 @@
 #      define PNGAPI _stdcall
 #      define PNGAPI _stdcall
 #    endif
 #    endif
 #  endif /* compiler/api */
 #  endif /* compiler/api */
+
   /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
   /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
 
 
 #  if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
 #  if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
@@ -360,7 +361,33 @@
    * version 1.2.41.  Disabling these removes the warnings but may also produce
    * version 1.2.41.  Disabling these removes the warnings but may also produce
    * less efficient code.
    * less efficient code.
    */
    */
-#  if defined(__GNUC__)
+#  if defined(__clang__) && defined(__has_attribute)
+     /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
+#    if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
+#      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
+#    endif
+#    if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
+#      define PNG_NORETURN __attribute__((__noreturn__))
+#    endif
+#    if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
+#      define PNG_ALLOCATED __attribute__((__malloc__))
+#    endif
+#    if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
+#      define PNG_DEPRECATED __attribute__((__deprecated__))
+#    endif
+#    if !defined(PNG_PRIVATE)
+#      ifdef __has_extension
+#        if __has_extension(attribute_unavailable_with_message)
+#          define PNG_PRIVATE __attribute__((__unavailable__(\
+             "This function is not exported by libpng.")))
+#        endif
+#      endif
+#    endif
+#    ifndef PNG_RESTRICT
+#      define PNG_RESTRICT __restrict
+#    endif
+
+#  elif defined(__GNUC__)
 #    ifndef PNG_USE_RESULT
 #    ifndef PNG_USE_RESULT
 #      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
 #      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
 #    endif
 #    endif
@@ -383,12 +410,12 @@
             __attribute__((__deprecated__))
             __attribute__((__deprecated__))
 #        endif
 #        endif
 #      endif
 #      endif
-#      if ((__GNUC__ != 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
+#      if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
 #        ifndef PNG_RESTRICT
 #        ifndef PNG_RESTRICT
 #          define PNG_RESTRICT __restrict
 #          define PNG_RESTRICT __restrict
 #        endif
 #        endif
-#      endif /*  __GNUC__ == 3.0 */
-#    endif /*  __GNUC__ >= 3 */
+#      endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
+#    endif /* __GNUC__ >= 3 */
 
 
 #  elif defined(_MSC_VER)  && (_MSC_VER >= 1300)
 #  elif defined(_MSC_VER)  && (_MSC_VER >= 1300)
 #    ifndef PNG_USE_RESULT
 #    ifndef PNG_USE_RESULT
@@ -418,7 +445,7 @@
 #    ifndef PNG_RESTRICT
 #    ifndef PNG_RESTRICT
 #      define PNG_RESTRICT __restrict
 #      define PNG_RESTRICT __restrict
 #    endif
 #    endif
-#  endif /* _MSC_VER */
+#  endif
 #endif /* PNG_PEDANTIC_WARNINGS */
 #endif /* PNG_PEDANTIC_WARNINGS */
 
 
 #ifndef PNG_DEPRECATED
 #ifndef PNG_DEPRECATED
@@ -439,6 +466,7 @@
 #ifndef PNG_RESTRICT
 #ifndef PNG_RESTRICT
 #  define PNG_RESTRICT    /* The C99 "restrict" feature */
 #  define PNG_RESTRICT    /* The C99 "restrict" feature */
 #endif
 #endif
+
 #ifndef PNG_FP_EXPORT     /* A floating point API. */
 #ifndef PNG_FP_EXPORT     /* A floating point API. */
 #  ifdef PNG_FLOATING_POINT_SUPPORTED
 #  ifdef PNG_FLOATING_POINT_SUPPORTED
 #     define PNG_FP_EXPORT(ordinal, type, name, args)\
 #     define PNG_FP_EXPORT(ordinal, type, name, args)\

+ 4 - 5
oxygine/third_party/android/libpng/pnglibconf.h

@@ -1,8 +1,8 @@
 /* pnglibconf.h - library build configuration */
 /* pnglibconf.h - library build configuration */
 
 
-/* libpng version 1.6.2 - April 25, 2013 */
+/* libpng version 1.6.16,December 22, 2014 */
 
 
-/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
+/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
 
 
 /* This code is released under the libpng license. */
 /* This code is released under the libpng license. */
 /* For conditions of distribution and use, see the disclaimer */
 /* For conditions of distribution and use, see the disclaimer */
@@ -18,7 +18,6 @@
 #define PNG_ALIGNED_MEMORY_SUPPORTED
 #define PNG_ALIGNED_MEMORY_SUPPORTED
 /*#undef PNG_ARM_NEON_API_SUPPORTED*/
 /*#undef PNG_ARM_NEON_API_SUPPORTED*/
 /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
 /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
-/*#undef PNG_ARM_NEON_SUPPORTED*/
 #define PNG_BENIGN_ERRORS_SUPPORTED
 #define PNG_BENIGN_ERRORS_SUPPORTED
 #define PNG_BENIGN_READ_ERRORS_SUPPORTED
 #define PNG_BENIGN_READ_ERRORS_SUPPORTED
 /*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
 /*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
@@ -103,7 +102,7 @@
 #define PNG_SETJMP_SUPPORTED
 #define PNG_SETJMP_SUPPORTED
 #define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
 #define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
 #define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
 #define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
-/*#undef PNG_SET_OPTION_SUPPORTED*/
+#define PNG_SET_OPTION_SUPPORTED
 #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SET_USER_LIMITS_SUPPORTED
 #define PNG_SET_USER_LIMITS_SUPPORTED
 #define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
 #define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
@@ -186,7 +185,6 @@
 /* end of options */
 /* end of options */
 /* settings */
 /* settings */
 #define PNG_API_RULE 0
 #define PNG_API_RULE 0
-#define PNG_CALLOC_SUPPORTED
 #define PNG_COST_SHIFT 3
 #define PNG_COST_SHIFT 3
 #define PNG_DEFAULT_READ_MACROS 1
 #define PNG_DEFAULT_READ_MACROS 1
 #define PNG_GAMMA_THRESHOLD_FIXED 5000
 #define PNG_GAMMA_THRESHOLD_FIXED 5000
@@ -200,6 +198,7 @@
 #define PNG_TEXT_Z_DEFAULT_STRATEGY 0
 #define PNG_TEXT_Z_DEFAULT_STRATEGY 0
 #define PNG_WEIGHT_SHIFT 8
 #define PNG_WEIGHT_SHIFT 8
 #define PNG_ZBUF_SIZE 8192
 #define PNG_ZBUF_SIZE 8192
+#define PNG_ZLIB_VERNUM 0x1280
 #define PNG_Z_DEFAULT_COMPRESSION (-1)
 #define PNG_Z_DEFAULT_COMPRESSION (-1)
 #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
 #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
 #define PNG_Z_DEFAULT_STRATEGY 1
 #define PNG_Z_DEFAULT_STRATEGY 1

BIN
oxygine/third_party/android/libraries/armeabi-v7a/libjpeg.a


BIN
oxygine/third_party/android/libraries/armeabi-v7a/libpng.a


BIN
oxygine/third_party/android/libraries/armeabi/libjpeg.a


BIN
oxygine/third_party/android/libraries/armeabi/libpng.a