|
1 | 1 |
|
2 | 2 | /* png.h - header file for PNG reference library |
3 | 3 | * |
4 | | - * libpng version 1.6.37 - April 14, 2019 |
| 4 | + * libpng version 1.6.43 |
5 | 5 | * |
6 | | - * Copyright (c) 2018-2019 Cosmin Truta |
| 6 | + * Copyright (c) 2018-2024 Cosmin Truta |
7 | 7 | * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson |
8 | 8 | * Copyright (c) 1996-1997 Andreas Dilger |
9 | 9 | * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. |
|
15 | 15 | * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger |
16 | 16 | * libpng versions 0.97, January 1998, through 1.6.35, July 2018: |
17 | 17 | * Glenn Randers-Pehrson |
18 | | - * libpng versions 1.6.36, December 2018, through 1.6.37, April 2019: |
| 18 | + * libpng versions 1.6.36, December 2018, through 1.6.43, February 2024: |
19 | 19 | * Cosmin Truta |
20 | 20 | * See also "Contributing Authors", below. |
21 | 21 | */ |
|
27 | 27 | * PNG Reference Library License version 2 |
28 | 28 | * --------------------------------------- |
29 | 29 | * |
30 | | - * * Copyright (c) 1995-2019 The PNG Reference Library Authors. |
31 | | - * * Copyright (c) 2018-2019 Cosmin Truta. |
| 30 | + * * Copyright (c) 1995-2024 The PNG Reference Library Authors. |
| 31 | + * * Copyright (c) 2018-2024 Cosmin Truta. |
32 | 32 | * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. |
33 | 33 | * * Copyright (c) 1996-1997 Andreas Dilger. |
34 | 34 | * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. |
|
239 | 239 | * ... |
240 | 240 | * 1.5.30 15 10530 15.so.15.30[.0] |
241 | 241 | * ... |
242 | | - * 1.6.37 16 10637 16.so.16.37[.0] |
| 242 | + * 1.6.43 16 10643 16.so.16.43[.0] |
243 | 243 | * |
244 | 244 | * Henceforth the source version will match the shared-library major and |
245 | 245 | * minor numbers; the shared-library major version number will be used for |
|
255 | 255 | * to the info_ptr or png_ptr members through png.h, and the compiled |
256 | 256 | * application is loaded with a different version of the library. |
257 | 257 | * |
258 | | - * DLLNUM will change each time there are forward or backward changes |
259 | | - * in binary compatibility (e.g., when a new feature is added). |
260 | | - * |
261 | 258 | * See libpng.txt or libpng.3 for more information. The PNG specification |
262 | 259 | * is available as a W3C Recommendation and as an ISO/IEC Standard; see |
263 | 260 | * <https://www.w3.org/TR/2003/REC-PNG-20031110/> |
|
278 | 275 | */ |
279 | 276 |
|
280 | 277 | /* Version information for png.h - this should match the version in png.c */ |
281 | | -#define PNG_LIBPNG_VER_STRING "1.6.37" |
282 | | -#define PNG_HEADER_VERSION_STRING " libpng version 1.6.37 - April 14, 2019\n" |
| 278 | +#define PNG_LIBPNG_VER_STRING "1.6.43" |
| 279 | +#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" |
283 | 280 |
|
284 | | -#define PNG_LIBPNG_VER_SONUM 16 |
285 | | -#define PNG_LIBPNG_VER_DLLNUM 16 |
| 281 | +/* The versions of shared library builds should stay in sync, going forward */ |
| 282 | +#define PNG_LIBPNG_VER_SHAREDLIB 16 |
| 283 | +#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ |
| 284 | +#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ |
286 | 285 |
|
287 | 286 | /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ |
288 | 287 | #define PNG_LIBPNG_VER_MAJOR 1 |
289 | 288 | #define PNG_LIBPNG_VER_MINOR 6 |
290 | | -#define PNG_LIBPNG_VER_RELEASE 37 |
| 289 | +#define PNG_LIBPNG_VER_RELEASE 43 |
291 | 290 |
|
292 | 291 | /* This should be zero for a public release, or non-zero for a |
293 | | - * development version. [Deprecated] |
| 292 | + * development version. |
294 | 293 | */ |
295 | 294 | #define PNG_LIBPNG_VER_BUILD 0 |
296 | 295 |
|
|
318 | 317 | * From version 1.0.1 it is: |
319 | 318 | * XXYYZZ, where XX=major, YY=minor, ZZ=release |
320 | 319 | */ |
321 | | -#define PNG_LIBPNG_VER 10637 /* 1.6.37 */ |
| 320 | +#define PNG_LIBPNG_VER 10643 /* 1.6.43 */ |
322 | 321 |
|
323 | 322 | /* Library configuration: these options cannot be changed after |
324 | 323 | * the library has been built. |
@@ -428,7 +427,7 @@ extern "C" { |
428 | 427 | /* This triggers a compiler error in png.c, if png.c and png.h |
429 | 428 | * do not agree upon the version number. |
430 | 429 | */ |
431 | | -typedef char* png_libpng_version_1_6_37; |
| 430 | +typedef char* png_libpng_version_1_6_43; |
432 | 431 |
|
433 | 432 | /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. |
434 | 433 | * |
@@ -849,7 +848,7 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); |
849 | 848 | #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ |
850 | 849 | /* Added to libpng-1.5.4 */ |
851 | 850 | #define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ |
852 | | -#if INT_MAX >= 0x8000 /* else this might break */ |
| 851 | +#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */ |
853 | 852 | #define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ |
854 | 853 | #endif |
855 | 854 |
|
@@ -908,15 +907,15 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); |
908 | 907 | /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a |
909 | 908 | * PNG file. Returns zero if the supplied bytes match the 8-byte PNG |
910 | 909 | * signature, and non-zero otherwise. Having num_to_check == 0 or |
911 | | - * start > 7 will always fail (ie return non-zero). |
| 910 | + * start > 7 will always fail (i.e. return non-zero). |
912 | 911 | */ |
913 | 912 | PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start, |
914 | 913 | size_t num_to_check)); |
915 | 914 |
|
916 | 915 | /* Simple signature checking function. This is the same as calling |
917 | | - * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). |
| 916 | + * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0). |
918 | 917 | */ |
919 | | -#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) |
| 918 | +#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */ |
920 | 919 |
|
921 | 920 | /* Allocate and initialize png_ptr struct for reading, and any other memory. */ |
922 | 921 | PNG_EXPORTA(4, png_structp, png_create_read_struct, |
@@ -1446,7 +1445,7 @@ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, |
1446 | 1445 | * mainly useful for testing, as the defaults should work with most users. |
1447 | 1446 | * Those users who are tight on memory or want faster performance at the |
1448 | 1447 | * expense of compression can modify them. See the compression library |
1449 | | - * header file (zlib.h) for an explination of the compression functions. |
| 1448 | + * header file (zlib.h) for an explanation of the compression functions. |
1450 | 1449 | */ |
1451 | 1450 |
|
1452 | 1451 | /* Set the filtering method(s) used by libpng. Currently, the only valid |
@@ -1501,7 +1500,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, |
1501 | 1500 | * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 |
1502 | 1501 | * (0 - no compression, 9 - "maximal" compression). Note that tests have |
1503 | 1502 | * shown that zlib compression levels 3-6 usually perform as well as level 9 |
1504 | | - * for PNG images, and do considerably fewer caclulations. In the future, |
| 1503 | + * for PNG images, and do considerably fewer calculations. In the future, |
1505 | 1504 | * these values may not correspond directly to the zlib compression levels. |
1506 | 1505 | */ |
1507 | 1506 | #ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED |
@@ -1730,12 +1729,9 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); |
1730 | 1729 | PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, |
1731 | 1730 | png_inforp info_ptr, png_uint_32 free_me, int num)); |
1732 | 1731 |
|
1733 | | -/* Reassign responsibility for freeing existing data, whether allocated |
| 1732 | +/* Reassign the responsibility for freeing existing data, whether allocated |
1734 | 1733 | * by libpng or by the application; this works on the png_info structure passed |
1735 | | - * in, it does not change the state for other png_info structures. |
1736 | | - * |
1737 | | - * It is unlikely that this function works correctly as of 1.6.0 and using it |
1738 | | - * may result either in memory leaks or double free of allocated data. |
| 1734 | + * in, without changing the state for other png_info structures. |
1739 | 1735 | */ |
1740 | 1736 | PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, |
1741 | 1737 | png_inforp info_ptr, int freer, png_uint_32 mask)); |
@@ -3207,11 +3203,18 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, |
3207 | 3203 | #ifdef PNG_MIPS_MSA_API_SUPPORTED |
3208 | 3204 | # define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ |
3209 | 3205 | #endif |
3210 | | -#define PNG_IGNORE_ADLER32 8 |
| 3206 | +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED |
| 3207 | +# define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */ |
| 3208 | +#endif |
3211 | 3209 | #ifdef PNG_POWERPC_VSX_API_SUPPORTED |
3212 | | -# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ |
| 3210 | +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions |
| 3211 | + * supported */ |
3213 | 3212 | #endif |
3214 | | -#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */ |
| 3213 | +#ifdef PNG_MIPS_MMI_API_SUPPORTED |
| 3214 | +# define PNG_MIPS_MMI 12 /* HARDWARE: MIPS MMI SIMD instructions supported */ |
| 3215 | +#endif |
| 3216 | + |
| 3217 | +#define PNG_OPTION_NEXT 14 /* Next option - numbers must be even */ |
3215 | 3218 |
|
3216 | 3219 | /* Return values: NOTE: there are four values and 'off' is *not* zero */ |
3217 | 3220 | #define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ |
|
0 commit comments