summaryrefslogtreecommitdiff
path: root/png/png.h
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-09-07 18:06:14 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-09-07 18:06:39 +0200
commit27e02a1541db180e3d4260732461a080dab593a1 (patch)
tree85b14e9d0937a3c8c615c2c3ddc6644b0c58768a /png/png.h
parent1182cd66ec66cc317af2db44d21c2e56b99536e8 (diff)
Update bundled libpng to version 1.6.50 dated 2025-07-01
Diffstat (limited to 'png/png.h')
-rw-r--r--png/png.h175
1 files changed, 151 insertions, 24 deletions
diff --git a/png/png.h b/png/png.h
index 04a233f39..b9985e816 100644
--- a/png/png.h
+++ b/png/png.h
@@ -1,9 +1,8 @@
-
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.44
+ * libpng version 1.6.50
*
- * Copyright (c) 2018-2024 Cosmin Truta
+ * Copyright (c) 2018-2025 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -15,7 +14,7 @@
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson
- * libpng versions 1.6.36, December 2018, through 1.6.44, September 2024:
+ * libpng versions 1.6.36, December 2018, through 1.6.50, July 2025:
* Cosmin Truta
* See also "Contributing Authors", below.
*/
@@ -27,8 +26,8 @@
* PNG Reference Library License version 2
* ---------------------------------------
*
- * * Copyright (c) 1995-2024 The PNG Reference Library Authors.
- * * Copyright (c) 2018-2024 Cosmin Truta.
+ * * Copyright (c) 1995-2025 The PNG Reference Library Authors.
+ * * Copyright (c) 2018-2025 Cosmin Truta.
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* * Copyright (c) 1996-1997 Andreas Dilger.
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -239,7 +238,7 @@
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
- * 1.6.44 16 10644 16.so.16.44[.0]
+ * 1.6.50 16 10650 16.so.16.50[.0]
*
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
@@ -275,7 +274,7 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.44"
+#define PNG_LIBPNG_VER_STRING "1.6.50"
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
/* The versions of shared library builds should stay in sync, going forward */
@@ -286,7 +285,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 44
+#define PNG_LIBPNG_VER_RELEASE 50
/* This should be zero for a public release, or non-zero for a
* development version.
@@ -317,7 +316,7 @@
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
-#define PNG_LIBPNG_VER 10644 /* 1.6.44 */
+#define PNG_LIBPNG_VER 10650 /* 1.6.50 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -427,7 +426,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_44;
+typedef char* png_libpng_version_1_6_50;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -745,6 +744,21 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */
#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */
#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */
+#define PNG_INFO_cICP 0x20000U /* PNGv3: 1.6.45 */
+#define PNG_INFO_cLLI 0x40000U /* PNGv3: 1.6.45 */
+#define PNG_INFO_mDCV 0x80000U /* PNGv3: 1.6.45 */
+/* APNG: these chunks are stored as unknown, these flags are never set
+ * however they are provided as a convenience for implementors of APNG and
+ * avoids any merge conflicts.
+ *
+ * Private chunks: these chunk names violate the chunk name recommendations
+ * because the chunk definitions have no signature and because the private
+ * chunks with these names have been reserved. Private definitions should
+ * avoid them.
+ */
+#define PNG_INFO_acTL 0x100000U /* PNGv3: 1.6.45: unknown */
+#define PNG_INFO_fcTL 0x200000U /* PNGv3: 1.6.45: unknown */
+#define PNG_INFO_fdAT 0x400000U /* PNGv3: 1.6.45: unknown */
/* This is used for the transformation routines, as some of them
* change these values for the row. It also should enable using
@@ -1556,7 +1570,7 @@ PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
#ifdef PNG_STDIO_SUPPORTED
/* Initialize the input/output for the PNG file to the default functions. */
-PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp));
+PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, FILE *fp));
#endif
/* Replace the (error and abort), and warning functions with user
@@ -1974,6 +1988,46 @@ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
png_fixed_point int_blue_Z))
#endif
+#ifdef PNG_cICP_SUPPORTED
+PNG_EXPORT(250, png_uint_32, png_get_cICP, (png_const_structrp png_ptr,
+ png_const_inforp info_ptr, png_bytep colour_primaries,
+ png_bytep transfer_function, png_bytep matrix_coefficients,
+ png_bytep video_full_range_flag));
+#endif
+
+#ifdef PNG_cICP_SUPPORTED
+PNG_EXPORT(251, void, png_set_cICP, (png_const_structrp png_ptr,
+ png_inforp info_ptr, png_byte colour_primaries,
+ png_byte transfer_function, png_byte matrix_coefficients,
+ png_byte video_full_range_flag));
+#endif
+
+#ifdef PNG_cLLI_SUPPORTED
+PNG_FP_EXPORT(252, png_uint_32, png_get_cLLI, (png_const_structrp png_ptr,
+ png_const_inforp info_ptr, double *maximum_content_light_level,
+ double *maximum_frame_average_light_level))
+PNG_FIXED_EXPORT(253, png_uint_32, png_get_cLLI_fixed,
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
+ /* The values below are in cd/m2 (nits) and are scaled by 10,000; not
+ * 100,000 as in the case of png_fixed_point.
+ */
+ png_uint_32p maximum_content_light_level_scaled_by_10000,
+ png_uint_32p maximum_frame_average_light_level_scaled_by_10000))
+#endif
+
+#ifdef PNG_cLLI_SUPPORTED
+PNG_FP_EXPORT(254, void, png_set_cLLI, (png_const_structrp png_ptr,
+ png_inforp info_ptr, double maximum_content_light_level,
+ double maximum_frame_average_light_level))
+PNG_FIXED_EXPORT(255, void, png_set_cLLI_fixed, (png_const_structrp png_ptr,
+ png_inforp info_ptr,
+ /* The values below are in cd/m2 (nits) and are scaled by 10,000; not
+ * 100,000 as in the case of png_fixed_point.
+ */
+ png_uint_32 maximum_content_light_level_scaled_by_10000,
+ png_uint_32 maximum_frame_average_light_level_scaled_by_10000))
+#endif
+
#ifdef PNG_eXIf_SUPPORTED
PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, png_bytep *exif));
@@ -2018,6 +2072,60 @@ PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr,
int color_type, int interlace_method, int compression_method,
int filter_method));
+#ifdef PNG_mDCV_SUPPORTED
+PNG_FP_EXPORT(256, png_uint_32, png_get_mDCV, (png_const_structrp png_ptr,
+ png_const_inforp info_ptr,
+ /* The chromaticities of the mastering display. As cHRM, but independent of
+ * the encoding endpoints in cHRM, or cICP, or iCCP. These values will
+ * always be in the range 0 to 1.3107.
+ */
+ double *white_x, double *white_y, double *red_x, double *red_y,
+ double *green_x, double *green_y, double *blue_x, double *blue_y,
+ /* Mastering display luminance in cd/m2 (nits). */
+ double *mastering_display_maximum_luminance,
+ double *mastering_display_minimum_luminance))
+
+PNG_FIXED_EXPORT(257, png_uint_32, png_get_mDCV_fixed,
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
+ png_fixed_point *int_white_x, png_fixed_point *int_white_y,
+ png_fixed_point *int_red_x, png_fixed_point *int_red_y,
+ png_fixed_point *int_green_x, png_fixed_point *int_green_y,
+ png_fixed_point *int_blue_x, png_fixed_point *int_blue_y,
+ /* Mastering display luminance in cd/m2 (nits) multiplied (scaled) by
+ * 10,000.
+ */
+ png_uint_32p mastering_display_maximum_luminance_scaled_by_10000,
+ png_uint_32p mastering_display_minimum_luminance_scaled_by_10000))
+#endif
+
+#ifdef PNG_mDCV_SUPPORTED
+PNG_FP_EXPORT(258, void, png_set_mDCV, (png_const_structrp png_ptr,
+ png_inforp info_ptr,
+ /* The chromaticities of the mastering display. As cHRM, but independent of
+ * the encoding endpoints in cHRM, or cICP, or iCCP.
+ */
+ double white_x, double white_y, double red_x, double red_y, double green_x,
+ double green_y, double blue_x, double blue_y,
+ /* Mastering display luminance in cd/m2 (nits). */
+ double mastering_display_maximum_luminance,
+ double mastering_display_minimum_luminance))
+
+PNG_FIXED_EXPORT(259, void, png_set_mDCV_fixed, (png_const_structrp png_ptr,
+ png_inforp info_ptr,
+ /* The admissible range of these values is not the full range of a PNG
+ * fixed point value. Negative values cannot be encoded and the maximum
+ * value is about 1.3 */
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
+ png_fixed_point int_red_x, png_fixed_point int_red_y,
+ png_fixed_point int_green_x, png_fixed_point int_green_y,
+ png_fixed_point int_blue_x, png_fixed_point int_blue_y,
+ /* These are PNG unsigned 4 byte values: 31-bit unsigned values. The MSB
+ * must be zero.
+ */
+ png_uint_32 mastering_display_maximum_luminance_scaled_by_10000,
+ png_uint_32 mastering_display_minimum_luminance_scaled_by_10000))
+#endif
+
#ifdef PNG_oFFs_SUPPORTED
PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr,
png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
@@ -2980,7 +3088,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,
- FILE* file));
+ FILE *file));
/* The PNG header is read from the stdio FILE object. */
#endif /* STDIO */
@@ -3055,7 +3163,7 @@ PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
const void *colormap));
- /* Write the image to the given (FILE*). */
+ /* Write the image to the given FILE object. */
#endif /* SIMPLIFIED_WRITE_STDIO */
/* With all write APIs if image is in one of the linear formats with 16-bit
@@ -3195,26 +3303,45 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
* selected at run time.
*/
#ifdef PNG_SET_OPTION_SUPPORTED
+
+/* HARDWARE: ARM Neon SIMD instructions supported */
#ifdef PNG_ARM_NEON_API_SUPPORTED
-# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
+# define PNG_ARM_NEON 0
#endif
-#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */
-#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */
+
+/* SOFTWARE: Force maximum window */
+#define PNG_MAXIMUM_INFLATE_WINDOW 2
+
+/* SOFTWARE: Check ICC profile for sRGB */
+#define PNG_SKIP_sRGB_CHECK_PROFILE 4
+
+/* HARDWARE: MIPS MSA SIMD instructions supported */
#ifdef PNG_MIPS_MSA_API_SUPPORTED
-# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */
+# define PNG_MIPS_MSA 6
#endif
+
+/* SOFTWARE: Disable Adler32 check on IDAT */
#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
-# define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */
+# define PNG_IGNORE_ADLER32 8
#endif
+
+/* HARDWARE: PowerPC VSX SIMD instructions supported */
#ifdef PNG_POWERPC_VSX_API_SUPPORTED
-# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions
- * supported */
+# define PNG_POWERPC_VSX 10
#endif
+
+/* HARDWARE: MIPS MMI SIMD instructions supported */
#ifdef PNG_MIPS_MMI_API_SUPPORTED
-# define PNG_MIPS_MMI 12 /* HARDWARE: MIPS MMI SIMD instructions supported */
+# define PNG_MIPS_MMI 12
+#endif
+
+/* HARDWARE: RISC-V RVV SIMD instructions supported */
+#ifdef PNG_RISCV_RVV_API_SUPPORTED
+# define PNG_RISCV_RVV 14
#endif
-#define PNG_OPTION_NEXT 14 /* Next option - numbers must be even */
+/* Next option - numbers must be even */
+#define PNG_OPTION_NEXT 16
/* Return values: NOTE: there are four values and 'off' is *not* zero */
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
@@ -3238,7 +3365,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
* one to use is one more than this.)
*/
#ifdef PNG_EXPORT_LAST_ORDINAL
- PNG_EXPORT_LAST_ORDINAL(249);
+ PNG_EXPORT_LAST_ORDINAL(259);
#endif
#ifdef __cplusplus