@img/sharp-libvips-dev 1.3.0-rc.2 → 1.3.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/include/archive.h +2 -2
  2. package/include/archive_entry.h +1 -1
  3. package/include/expat.h +2 -2
  4. package/include/expat_config.h +3 -6
  5. package/include/expat_external.h +2 -3
  6. package/include/freetype2/freetype/config/ftoption.h +7 -1
  7. package/include/freetype2/freetype/config/mac-support.h +2 -0
  8. package/include/freetype2/freetype/freetype.h +8 -17
  9. package/include/freetype2/freetype/ftbdf.h +9 -3
  10. package/include/freetype2/freetype/ftimage.h +1 -1
  11. package/include/freetype2/freetype/ftlcdfil.h +2 -8
  12. package/include/freetype2/freetype/ftparams.h +2 -5
  13. package/include/freetype2/freetype/t1tables.h +2 -2
  14. package/include/glib-2.0/gio/gfileattribute.h +1 -1
  15. package/include/glib-2.0/gio/gfileinfo.h +5 -0
  16. package/include/glib-2.0/gio/gicon.h +1 -1
  17. package/include/glib-2.0/gio/gio-autocleanups.h +0 -1
  18. package/include/glib-2.0/gio/gio.h +2 -0
  19. package/include/glib-2.0/gio/gioenums.h +61 -40
  20. package/include/glib-2.0/gio/gioenumtypes.h +2 -0
  21. package/include/glib-2.0/gio/giptosmessage.h +46 -0
  22. package/include/glib-2.0/gio/gipv6tclassmessage.h +46 -0
  23. package/include/glib-2.0/gio/gresolver.h +1 -1
  24. package/include/glib-2.0/gio/gsettings.h +1 -1
  25. package/include/glib-2.0/gio/gsocketcontrolmessage.h +2 -0
  26. package/include/glib-2.0/girepository/girepository.h +1 -1
  27. package/include/glib-2.0/girepository/girffi.h +2 -2
  28. package/include/glib-2.0/girepository/gitypes.h +3 -3
  29. package/include/glib-2.0/glib/gatomic.h +26 -2
  30. package/include/glib-2.0/glib/gfileutils.h +2 -2
  31. package/include/glib-2.0/glib/ghook.h +3 -1
  32. package/include/glib-2.0/glib/giochannel.h +1 -1
  33. package/include/glib-2.0/glib/gkeyfile.h +1 -1
  34. package/include/glib-2.0/glib/gmacros.h +32 -0
  35. package/include/glib-2.0/glib/gmain.h +4 -0
  36. package/include/glib-2.0/glib/gmarkup.h +8 -1
  37. package/include/glib-2.0/glib/gmessages.h +1 -1
  38. package/include/glib-2.0/glib/gnode.h +1 -1
  39. package/include/glib-2.0/glib/goption.h +1 -1
  40. package/include/glib-2.0/glib/gslice.h +12 -4
  41. package/include/glib-2.0/glib/gspawn.h +1 -1
  42. package/include/glib-2.0/glib/gstrfuncs.h +1 -1
  43. package/include/glib-2.0/glib/gtestutils.h +6 -3
  44. package/include/glib-2.0/glib/gtimer.h +1 -0
  45. package/include/glib-2.0/glib/guri.h +3 -3
  46. package/include/glib-2.0/glib/gutils.h +1 -1
  47. package/include/glib-2.0/gmodule.h +1 -1
  48. package/include/glib-2.0/gobject/gbinding.h +1 -1
  49. package/include/glib-2.0/gobject/gobject.h +1 -1
  50. package/include/glib-2.0/gobject/gparam.h +1 -1
  51. package/include/glib-2.0/gobject/gsignal.h +3 -3
  52. package/include/glib-2.0/gobject/gtype.h +3 -3
  53. package/include/harfbuzz/hb-buffer.h +11 -3
  54. package/include/harfbuzz/hb-cplusplus.hh +31 -27
  55. package/include/harfbuzz/hb-features.h +21 -0
  56. package/include/harfbuzz/hb-ot-color.h +14 -0
  57. package/include/harfbuzz/hb-ot-shape.h +15 -0
  58. package/include/harfbuzz/hb-paint.h +19 -18
  59. package/include/harfbuzz/hb-version.h +3 -3
  60. package/include/lcms2.h +3 -3
  61. package/include/lcms2_plugin.h +1 -1
  62. package/include/libheif/heif_sequences.h +1 -1
  63. package/include/libheif/heif_version.h +2 -2
  64. package/include/libpng16/png.h +636 -487
  65. package/include/libpng16/pngconf.h +2 -2
  66. package/include/libpng16/pnglibconf.h +2 -2
  67. package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
  68. package/include/librsvg-2.0/librsvg/rsvg.h +4 -4
  69. package/include/libxml2/libxml/catalog.h +2 -0
  70. package/include/libxml2/libxml/relaxng.h +4 -0
  71. package/include/libxml2/libxml/xmlversion.h +4 -4
  72. package/include/png.h +636 -487
  73. package/include/pngconf.h +2 -2
  74. package/include/pnglibconf.h +2 -2
  75. package/include/vips/colour.h +2 -2
  76. package/include/vips/memory.h +1 -1
  77. package/include/vips/version.h +4 -4
  78. package/include/zlib.h +3 -3
  79. package/package.json +1 -1
  80. package/versions.json +14 -14
  81. package/include/harfbuzz/hb-subset-serialize.h +0 -83
  82. package/include/harfbuzz/hb-subset.h +0 -297
@@ -1,8 +1,8 @@
1
1
  /* png.h - header file for PNG reference library
2
2
  *
3
- * libpng version 1.6.53
3
+ * libpng version 1.6.55
4
4
  *
5
- * Copyright (c) 2018-2025 Cosmin Truta
5
+ * Copyright (c) 2018-2026 Cosmin Truta
6
6
  * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
7
7
  * Copyright (c) 1996-1997 Andreas Dilger
8
8
  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -14,7 +14,7 @@
14
14
  * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
15
15
  * libpng versions 0.97, January 1998, through 1.6.35, July 2018:
16
16
  * Glenn Randers-Pehrson
17
- * libpng versions 1.6.36, December 2018, through 1.6.53, December 2025:
17
+ * libpng versions 1.6.36, December 2018, through 1.6.55, February 2026:
18
18
  * Cosmin Truta
19
19
  * See also "Contributing Authors", below.
20
20
  */
@@ -26,8 +26,8 @@
26
26
  * PNG Reference Library License version 2
27
27
  * ---------------------------------------
28
28
  *
29
- * * Copyright (c) 1995-2025 The PNG Reference Library Authors.
30
- * * Copyright (c) 2018-2025 Cosmin Truta.
29
+ * * Copyright (c) 1995-2026 The PNG Reference Library Authors.
30
+ * * Copyright (c) 2018-2026 Cosmin Truta.
31
31
  * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
32
32
  * * Copyright (c) 1996-1997 Andreas Dilger.
33
33
  * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -238,7 +238,7 @@
238
238
  * ...
239
239
  * 1.5.30 15 10530 15.so.15.30[.0]
240
240
  * ...
241
- * 1.6.53 16 10651 16.so.16.53[.0]
241
+ * 1.6.55 16 10655 16.so.16.55[.0]
242
242
  *
243
243
  * Henceforth the source version will match the shared-library major and
244
244
  * minor numbers; the shared-library major version number will be used for
@@ -274,7 +274,7 @@
274
274
  */
275
275
 
276
276
  /* Version information for png.h - this should match the version in png.c */
277
- #define PNG_LIBPNG_VER_STRING "1.6.53"
277
+ #define PNG_LIBPNG_VER_STRING "1.6.55"
278
278
  #define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
279
279
 
280
280
  /* The versions of shared library builds should stay in sync, going forward */
@@ -285,7 +285,7 @@
285
285
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
286
286
  #define PNG_LIBPNG_VER_MAJOR 1
287
287
  #define PNG_LIBPNG_VER_MINOR 6
288
- #define PNG_LIBPNG_VER_RELEASE 53
288
+ #define PNG_LIBPNG_VER_RELEASE 55
289
289
 
290
290
  /* This should be zero for a public release, or non-zero for a
291
291
  * development version.
@@ -316,7 +316,7 @@
316
316
  * From version 1.0.1 it is:
317
317
  * XXYYZZ, where XX=major, YY=minor, ZZ=release
318
318
  */
319
- #define PNG_LIBPNG_VER 10653 /* 1.6.53 */
319
+ #define PNG_LIBPNG_VER 10655 /* 1.6.55 */
320
320
 
321
321
  /* Library configuration: these options cannot be changed after
322
322
  * the library has been built.
@@ -426,7 +426,7 @@ extern "C" {
426
426
  /* This triggers a compiler error in png.c, if png.c and png.h
427
427
  * do not agree upon the version number.
428
428
  */
429
- typedef char* png_libpng_version_1_6_53;
429
+ typedef char *png_libpng_version_1_6_55;
430
430
 
431
431
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
432
432
  *
@@ -785,17 +785,22 @@ typedef png_row_info * * png_row_infopp;
785
785
  * modify the buffer it is passed. The 'read' function, on the other hand, is
786
786
  * expected to return the read data in the buffer.
787
787
  */
788
- typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
789
- typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t));
790
- typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
791
- typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
792
- int));
793
- typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32,
794
- int));
788
+ typedef PNG_CALLBACK(void, *png_error_ptr,
789
+ (png_structp, png_const_charp));
790
+ typedef PNG_CALLBACK(void, *png_rw_ptr,
791
+ (png_structp, png_bytep, size_t));
792
+ typedef PNG_CALLBACK(void, *png_flush_ptr,
793
+ (png_structp));
794
+ typedef PNG_CALLBACK(void, *png_read_status_ptr,
795
+ (png_structp, png_uint_32, int));
796
+ typedef PNG_CALLBACK(void, *png_write_status_ptr,
797
+ (png_structp, png_uint_32, int));
795
798
 
796
799
  #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
797
- typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
798
- typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
800
+ typedef PNG_CALLBACK(void, *png_progressive_info_ptr,
801
+ (png_structp, png_infop));
802
+ typedef PNG_CALLBACK(void, *png_progressive_end_ptr,
803
+ (png_structp, png_infop));
799
804
 
800
805
  /* The following callback receives png_uint_32 row_number, int pass for the
801
806
  * png_bytep data of the row. When transforming an interlaced image the
@@ -807,19 +812,19 @@ typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
807
812
  * find the output pixel (x,y) given an interlaced sub-image pixel
808
813
  * (row,col,pass). (See below for these macros.)
809
814
  */
810
- typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep,
811
- png_uint_32, int));
815
+ typedef PNG_CALLBACK(void, *png_progressive_row_ptr,
816
+ (png_structp, png_bytep, png_uint_32, int));
812
817
  #endif
813
818
 
814
819
  #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
815
820
  defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
816
- typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop,
817
- png_bytep));
821
+ typedef PNG_CALLBACK(void, *png_user_transform_ptr,
822
+ (png_structp, png_row_infop, png_bytep));
818
823
  #endif
819
824
 
820
825
  #ifdef PNG_USER_CHUNKS_SUPPORTED
821
- typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
822
- png_unknown_chunkp));
826
+ typedef PNG_CALLBACK(int, *png_user_chunk_ptr,
827
+ (png_structp, png_unknown_chunkp));
823
828
  #endif
824
829
  #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
825
830
  /* not used anywhere */
@@ -877,9 +882,10 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), (jmp_buf, int), typedef);
877
882
  * ignores the first argument) should be completely compatible with the
878
883
  * following.
879
884
  */
880
- typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
881
- png_alloc_size_t));
882
- typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
885
+ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr,
886
+ (png_structp, png_alloc_size_t));
887
+ typedef PNG_CALLBACK(void, *png_free_ptr,
888
+ (png_structp, png_voidp));
883
889
 
884
890
  /* Section 4: exported functions
885
891
  * Here are the function definitions most commonly used. This is not
@@ -911,20 +917,22 @@ typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
911
917
  */
912
918
 
913
919
  /* Returns the version number of the library */
914
- PNG_EXPORT(1, png_uint_32, png_access_version_number, (void));
920
+ PNG_EXPORT(1, png_uint_32, png_access_version_number,
921
+ (void));
915
922
 
916
923
  /* Tell lib we have already handled the first <num_bytes> magic bytes.
917
924
  * Handling more than 8 bytes from the beginning of the file is an error.
918
925
  */
919
- PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
926
+ PNG_EXPORT(2, void, png_set_sig_bytes,
927
+ (png_structrp png_ptr, int num_bytes));
920
928
 
921
929
  /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
922
930
  * PNG file. Returns zero if the supplied bytes match the 8-byte PNG
923
931
  * signature, and non-zero otherwise. Having num_to_check == 0 or
924
932
  * start > 7 will always fail (i.e. return non-zero).
925
933
  */
926
- PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
927
- size_t num_to_check));
934
+ PNG_EXPORT(3, int, png_sig_cmp,
935
+ (png_const_bytep sig, size_t start, size_t num_to_check));
928
936
 
929
937
  /* Simple signature checking function. This is the same as calling
930
938
  * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0).
@@ -933,21 +941,21 @@ PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
933
941
 
934
942
  /* Allocate and initialize png_ptr struct for reading, and any other memory. */
935
943
  PNG_EXPORTA(4, png_structp, png_create_read_struct,
936
- (png_const_charp user_png_ver, png_voidp error_ptr,
937
- png_error_ptr error_fn, png_error_ptr warn_fn),
938
- PNG_ALLOCATED);
944
+ (png_const_charp user_png_ver,
945
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn),
946
+ PNG_ALLOCATED);
939
947
 
940
948
  /* Allocate and initialize png_ptr struct for writing, and any other memory */
941
949
  PNG_EXPORTA(5, png_structp, png_create_write_struct,
942
- (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
943
- png_error_ptr warn_fn),
944
- PNG_ALLOCATED);
950
+ (png_const_charp user_png_ver,
951
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn),
952
+ PNG_ALLOCATED);
945
953
 
946
954
  PNG_EXPORT(6, size_t, png_get_compression_buffer_size,
947
- (png_const_structrp png_ptr));
955
+ (png_const_structrp png_ptr));
948
956
 
949
- PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr,
950
- size_t size));
957
+ PNG_EXPORT(7, void, png_set_compression_buffer_size,
958
+ (png_structrp png_ptr, size_t size));
951
959
 
952
960
  /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
953
961
  * match up.
@@ -960,8 +968,8 @@ PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr,
960
968
  * allocated by the library - the call will return NULL on a mismatch
961
969
  * indicating an ABI mismatch.
962
970
  */
963
- PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr,
964
- png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
971
+ PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn,
972
+ (png_structrp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
965
973
  # define png_jmpbuf(png_ptr) \
966
974
  (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf))))
967
975
  #else
@@ -973,67 +981,77 @@ PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr,
973
981
  * will use it; otherwise it will call PNG_ABORT(). This function was
974
982
  * added in libpng-1.5.0.
975
983
  */
976
- PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val),
977
- PNG_NORETURN);
984
+ PNG_EXPORTA(9, void, png_longjmp,
985
+ (png_const_structrp png_ptr, int val),
986
+ PNG_NORETURN);
978
987
 
979
988
  #ifdef PNG_READ_SUPPORTED
980
989
  /* Reset the compression stream */
981
- PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED);
990
+ PNG_EXPORTA(10, int, png_reset_zstream,
991
+ (png_structrp png_ptr),
992
+ PNG_DEPRECATED);
982
993
  #endif
983
994
 
984
995
  /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
985
996
  #ifdef PNG_USER_MEM_SUPPORTED
986
997
  PNG_EXPORTA(11, png_structp, png_create_read_struct_2,
987
- (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
988
- png_error_ptr warn_fn,
998
+ (png_const_charp user_png_ver,
999
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn,
989
1000
  png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
990
- PNG_ALLOCATED);
1001
+ PNG_ALLOCATED);
991
1002
  PNG_EXPORTA(12, png_structp, png_create_write_struct_2,
992
- (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
993
- png_error_ptr warn_fn,
1003
+ (png_const_charp user_png_ver,
1004
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn,
994
1005
  png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
995
- PNG_ALLOCATED);
1006
+ PNG_ALLOCATED);
996
1007
  #endif
997
1008
 
998
1009
  /* Write the PNG file signature. */
999
- PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr));
1010
+ PNG_EXPORT(13, void, png_write_sig,
1011
+ (png_structrp png_ptr));
1000
1012
 
1001
1013
  /* Write a PNG chunk - size, type, (optional) data, CRC. */
1002
- PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep
1003
- chunk_name, png_const_bytep data, size_t length));
1014
+ PNG_EXPORT(14, void, png_write_chunk,
1015
+ (png_structrp png_ptr,
1016
+ png_const_bytep chunk_name, png_const_bytep data, size_t length));
1004
1017
 
1005
1018
  /* Write the start of a PNG chunk - length and chunk name. */
1006
- PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
1019
+ PNG_EXPORT(15, void, png_write_chunk_start,
1020
+ (png_structrp png_ptr,
1007
1021
  png_const_bytep chunk_name, png_uint_32 length));
1008
1022
 
1009
1023
  /* Write the data of a PNG chunk started with png_write_chunk_start(). */
1010
- PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr,
1024
+ PNG_EXPORT(16, void, png_write_chunk_data,
1025
+ (png_structrp png_ptr,
1011
1026
  png_const_bytep data, size_t length));
1012
1027
 
1013
1028
  /* Finish a chunk started with png_write_chunk_start() (includes CRC). */
1014
- PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr));
1029
+ PNG_EXPORT(17, void, png_write_chunk_end,
1030
+ (png_structrp png_ptr));
1015
1031
 
1016
1032
  /* Allocate and initialize the info structure */
1017
- PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr),
1018
- PNG_ALLOCATED);
1033
+ PNG_EXPORTA(18, png_infop, png_create_info_struct,
1034
+ (png_const_structrp png_ptr),
1035
+ PNG_ALLOCATED);
1019
1036
 
1020
1037
  /* DEPRECATED: this function allowed init structures to be created using the
1021
1038
  * default allocation method (typically malloc). Use is deprecated in 1.6.0 and
1022
1039
  * the API will be removed in the future.
1023
1040
  */
1024
- PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr,
1025
- size_t png_info_struct_size), PNG_DEPRECATED);
1041
+ PNG_EXPORTA(19, void, png_info_init_3,
1042
+ (png_infopp info_ptr, size_t png_info_struct_size),
1043
+ PNG_DEPRECATED);
1026
1044
 
1027
1045
  /* Writes all the PNG information before the image. */
1028
1046
  PNG_EXPORT(20, void, png_write_info_before_PLTE,
1029
- (png_structrp png_ptr, png_const_inforp info_ptr));
1047
+ (png_structrp png_ptr, png_const_inforp info_ptr));
1030
1048
  PNG_EXPORT(21, void, png_write_info,
1031
- (png_structrp png_ptr, png_const_inforp info_ptr));
1049
+ (png_structrp png_ptr, png_const_inforp info_ptr));
1032
1050
 
1033
1051
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1034
1052
  /* Read the information before the actual image data. */
1035
1053
  PNG_EXPORT(22, void, png_read_info,
1036
- (png_structrp png_ptr, png_inforp info_ptr));
1054
+ (png_structrp png_ptr, png_inforp info_ptr));
1037
1055
  #endif
1038
1056
 
1039
1057
  #ifdef PNG_TIME_RFC1123_SUPPORTED
@@ -1043,45 +1061,54 @@ PNG_EXPORT(22, void, png_read_info,
1043
1061
  */
1044
1062
  #if PNG_LIBPNG_VER < 10700
1045
1063
  /* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */
1046
- PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr,
1047
- png_const_timep ptime),PNG_DEPRECATED);
1064
+ PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123,
1065
+ (png_structrp png_ptr, png_const_timep ptime),
1066
+ PNG_DEPRECATED);
1048
1067
  #endif
1049
- PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29],
1050
- png_const_timep ptime));
1068
+ PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer,
1069
+ (char out[29], png_const_timep ptime));
1051
1070
  #endif
1052
1071
 
1053
1072
  #ifdef PNG_CONVERT_tIME_SUPPORTED
1054
1073
  /* Convert from a struct tm to png_time */
1055
- PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
1056
- const struct tm * ttime));
1074
+ PNG_EXPORT(24, void, png_convert_from_struct_tm,
1075
+ (png_timep ptime, const struct tm * ttime));
1057
1076
 
1058
1077
  /* Convert from time_t to png_time. Uses gmtime() */
1059
- PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
1078
+ PNG_EXPORT(25, void, png_convert_from_time_t,
1079
+ (png_timep ptime, time_t ttime));
1060
1080
  #endif /* CONVERT_tIME */
1061
1081
 
1062
1082
  #ifdef PNG_READ_EXPAND_SUPPORTED
1063
1083
  /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
1064
- PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr));
1065
- PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr));
1066
- PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr));
1067
- PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr));
1084
+ PNG_EXPORT(26, void, png_set_expand,
1085
+ (png_structrp png_ptr));
1086
+ PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8,
1087
+ (png_structrp png_ptr));
1088
+ PNG_EXPORT(28, void, png_set_palette_to_rgb,
1089
+ (png_structrp png_ptr));
1090
+ PNG_EXPORT(29, void, png_set_tRNS_to_alpha,
1091
+ (png_structrp png_ptr));
1068
1092
  #endif
1069
1093
 
1070
1094
  #ifdef PNG_READ_EXPAND_16_SUPPORTED
1071
1095
  /* Expand to 16-bit channels, forces conversion of palette to RGB and expansion
1072
1096
  * of a tRNS chunk if present.
1073
1097
  */
1074
- PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr));
1098
+ PNG_EXPORT(221, void, png_set_expand_16,
1099
+ (png_structrp png_ptr));
1075
1100
  #endif
1076
1101
 
1077
1102
  #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
1078
1103
  /* Use blue, green, red order for pixels. */
1079
- PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr));
1104
+ PNG_EXPORT(30, void, png_set_bgr,
1105
+ (png_structrp png_ptr));
1080
1106
  #endif
1081
1107
 
1082
1108
  #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
1083
1109
  /* Expand the grayscale to 24-bit RGB if necessary. */
1084
- PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr));
1110
+ PNG_EXPORT(31, void, png_set_gray_to_rgb,
1111
+ (png_structrp png_ptr));
1085
1112
  #endif
1086
1113
 
1087
1114
  #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
@@ -1091,18 +1118,20 @@ PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr));
1091
1118
  #define PNG_ERROR_ACTION_ERROR 3
1092
1119
  #define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/
1093
1120
 
1094
- PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr,
1121
+ PNG_FP_EXPORT(32, void, png_set_rgb_to_gray,
1122
+ (png_structrp png_ptr,
1095
1123
  int error_action, double red, double green))
1096
- PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr,
1124
+ PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed,
1125
+ (png_structrp png_ptr,
1097
1126
  int error_action, png_fixed_point red, png_fixed_point green))
1098
1127
 
1099
- PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp
1100
- png_ptr));
1128
+ PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status,
1129
+ (png_const_structrp png_ptr));
1101
1130
  #endif
1102
1131
 
1103
1132
  #ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
1104
- PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1105
- png_colorp palette));
1133
+ PNG_EXPORT(35, void, png_build_grayscale_palette,
1134
+ (int bit_depth, png_colorp palette));
1106
1135
  #endif
1107
1136
 
1108
1137
  #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
@@ -1147,10 +1176,10 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1147
1176
  #define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */
1148
1177
  #define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */
1149
1178
 
1150
- PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode,
1151
- double output_gamma))
1152
- PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
1153
- int mode, png_fixed_point output_gamma))
1179
+ PNG_FP_EXPORT(227, void, png_set_alpha_mode,
1180
+ (png_structrp png_ptr, int mode, double output_gamma))
1181
+ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed,
1182
+ (png_structrp png_ptr, int mode, png_fixed_point output_gamma))
1154
1183
  #endif
1155
1184
 
1156
1185
  #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
@@ -1240,51 +1269,57 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
1240
1269
  */
1241
1270
 
1242
1271
  #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
1243
- PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr));
1272
+ PNG_EXPORT(36, void, png_set_strip_alpha,
1273
+ (png_structrp png_ptr));
1244
1274
  #endif
1245
1275
 
1246
1276
  #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
1247
1277
  defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
1248
- PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr));
1278
+ PNG_EXPORT(37, void, png_set_swap_alpha,
1279
+ (png_structrp png_ptr));
1249
1280
  #endif
1250
1281
 
1251
1282
  #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
1252
1283
  defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
1253
- PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr));
1284
+ PNG_EXPORT(38, void, png_set_invert_alpha,
1285
+ (png_structrp png_ptr));
1254
1286
  #endif
1255
1287
 
1256
1288
  #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
1257
1289
  /* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
1258
- PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
1259
- int flags));
1290
+ PNG_EXPORT(39, void, png_set_filler,
1291
+ (png_structrp png_ptr, png_uint_32 filler, int flags));
1260
1292
  /* The values of the PNG_FILLER_ defines should NOT be changed */
1261
1293
  # define PNG_FILLER_BEFORE 0
1262
1294
  # define PNG_FILLER_AFTER 1
1263
1295
  /* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
1264
- PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
1265
- png_uint_32 filler, int flags));
1296
+ PNG_EXPORT(40, void, png_set_add_alpha,
1297
+ (png_structrp png_ptr, png_uint_32 filler, int flags));
1266
1298
  #endif /* READ_FILLER || WRITE_FILLER */
1267
1299
 
1268
1300
  #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
1269
1301
  /* Swap bytes in 16-bit depth files. */
1270
- PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr));
1302
+ PNG_EXPORT(41, void, png_set_swap,
1303
+ (png_structrp png_ptr));
1271
1304
  #endif
1272
1305
 
1273
1306
  #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
1274
1307
  /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
1275
- PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr));
1308
+ PNG_EXPORT(42, void, png_set_packing,
1309
+ (png_structrp png_ptr));
1276
1310
  #endif
1277
1311
 
1278
1312
  #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
1279
1313
  defined(PNG_WRITE_PACKSWAP_SUPPORTED)
1280
1314
  /* Swap packing order of pixels in bytes. */
1281
- PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr));
1315
+ PNG_EXPORT(43, void, png_set_packswap,
1316
+ (png_structrp png_ptr));
1282
1317
  #endif
1283
1318
 
1284
1319
  #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
1285
1320
  /* Converts files to legal bit depths. */
1286
- PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p
1287
- true_bits));
1321
+ PNG_EXPORT(44, void, png_set_shift,
1322
+ (png_structrp png_ptr, png_const_color_8p true_bits));
1288
1323
  #endif
1289
1324
 
1290
1325
  #if defined(PNG_READ_INTERLACING_SUPPORTED) || \
@@ -1295,12 +1330,14 @@ PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p
1295
1330
  * necessary to call png_read_row or png_read_rows png_get_image_height
1296
1331
  * times for each pass.
1297
1332
  */
1298
- PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr));
1333
+ PNG_EXPORT(45, int, png_set_interlace_handling,
1334
+ (png_structrp png_ptr));
1299
1335
  #endif
1300
1336
 
1301
1337
  #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
1302
1338
  /* Invert monochrome files */
1303
- PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr));
1339
+ PNG_EXPORT(46, void, png_set_invert_mono,
1340
+ (png_structrp png_ptr));
1304
1341
  #endif
1305
1342
 
1306
1343
  #ifdef PNG_READ_BACKGROUND_SUPPORTED
@@ -1309,10 +1346,12 @@ PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr));
1309
1346
  * read. Doing so will result in unexpected behavior and possible warnings or
1310
1347
  * errors if the PNG file contains a bKGD chunk.
1311
1348
  */
1312
- PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr,
1349
+ PNG_FP_EXPORT(47, void, png_set_background,
1350
+ (png_structrp png_ptr,
1313
1351
  png_const_color_16p background_color, int background_gamma_code,
1314
1352
  int need_expand, double background_gamma))
1315
- PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr,
1353
+ PNG_FIXED_EXPORT(215, void, png_set_background_fixed,
1354
+ (png_structrp png_ptr,
1316
1355
  png_const_color_16p background_color, int background_gamma_code,
1317
1356
  int need_expand, png_fixed_point background_gamma))
1318
1357
  #endif
@@ -1325,20 +1364,23 @@ PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr,
1325
1364
 
1326
1365
  #ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
1327
1366
  /* Scale a 16-bit depth file down to 8-bit, accurately. */
1328
- PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr));
1367
+ PNG_EXPORT(229, void, png_set_scale_16,
1368
+ (png_structrp png_ptr));
1329
1369
  #endif
1330
1370
 
1331
1371
  #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1332
1372
  #define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */
1333
1373
  /* Strip the second byte of information from a 16-bit depth file. */
1334
- PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr));
1374
+ PNG_EXPORT(48, void, png_set_strip_16,
1375
+ (png_structrp png_ptr));
1335
1376
  #endif
1336
1377
 
1337
1378
  #ifdef PNG_READ_QUANTIZE_SUPPORTED
1338
1379
  /* Turn on quantizing, and reduce the palette to the number of colors
1339
1380
  * available.
1340
1381
  */
1341
- PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr,
1382
+ PNG_EXPORT(49, void, png_set_quantize,
1383
+ (png_structrp png_ptr,
1342
1384
  png_colorp palette, int num_palette, int maximum_colors,
1343
1385
  png_const_uint_16p histogram, int full_quantize));
1344
1386
  #endif
@@ -1360,82 +1402,92 @@ PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr,
1360
1402
  * API (floating point or fixed.) Notice, however, that the 'file_gamma' value
1361
1403
  * is the inverse of a 'screen gamma' value.
1362
1404
  */
1363
- PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr,
1405
+ PNG_FP_EXPORT(50, void, png_set_gamma,
1406
+ (png_structrp png_ptr,
1364
1407
  double screen_gamma, double override_file_gamma))
1365
- PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr,
1408
+ PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed,
1409
+ (png_structrp png_ptr,
1366
1410
  png_fixed_point screen_gamma, png_fixed_point override_file_gamma))
1367
1411
  #endif
1368
1412
 
1369
1413
  #ifdef PNG_WRITE_FLUSH_SUPPORTED
1370
1414
  /* Set how many lines between output flushes - 0 for no flushing */
1371
- PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows));
1415
+ PNG_EXPORT(51, void, png_set_flush,
1416
+ (png_structrp png_ptr, int nrows));
1372
1417
  /* Flush the current PNG output buffer */
1373
- PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr));
1418
+ PNG_EXPORT(52, void, png_write_flush,
1419
+ (png_structrp png_ptr));
1374
1420
  #endif
1375
1421
 
1376
1422
  /* Optional update palette with requested transformations */
1377
- PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr));
1423
+ PNG_EXPORT(53, void, png_start_read_image,
1424
+ (png_structrp png_ptr));
1378
1425
 
1379
1426
  /* Optional call to update the users info structure */
1380
- PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr,
1381
- png_inforp info_ptr));
1427
+ PNG_EXPORT(54, void, png_read_update_info,
1428
+ (png_structrp png_ptr, png_inforp info_ptr));
1382
1429
 
1383
1430
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1384
1431
  /* Read one or more rows of image data. */
1385
- PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row,
1432
+ PNG_EXPORT(55, void, png_read_rows,
1433
+ (png_structrp png_ptr, png_bytepp row,
1386
1434
  png_bytepp display_row, png_uint_32 num_rows));
1387
1435
  #endif
1388
1436
 
1389
1437
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1390
1438
  /* Read a row of data. */
1391
- PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row,
1392
- png_bytep display_row));
1439
+ PNG_EXPORT(56, void, png_read_row,
1440
+ (png_structrp png_ptr, png_bytep row, png_bytep display_row));
1393
1441
  #endif
1394
1442
 
1395
1443
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1396
1444
  /* Read the whole image into memory at once. */
1397
- PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image));
1445
+ PNG_EXPORT(57, void, png_read_image,
1446
+ (png_structrp png_ptr, png_bytepp image));
1398
1447
  #endif
1399
1448
 
1400
1449
  /* Write a row of image data */
1401
- PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr,
1402
- png_const_bytep row));
1450
+ PNG_EXPORT(58, void, png_write_row,
1451
+ (png_structrp png_ptr, png_const_bytep row));
1403
1452
 
1404
1453
  /* Write a few rows of image data: (*row) is not written; however, the type
1405
1454
  * is declared as writeable to maintain compatibility with previous versions
1406
1455
  * of libpng and to allow the 'display_row' array from read_rows to be passed
1407
1456
  * unchanged to write_rows.
1408
1457
  */
1409
- PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row,
1410
- png_uint_32 num_rows));
1458
+ PNG_EXPORT(59, void, png_write_rows,
1459
+ (png_structrp png_ptr, png_bytepp row, png_uint_32 num_rows));
1411
1460
 
1412
1461
  /* Write the image data */
1413
- PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image));
1462
+ PNG_EXPORT(60, void, png_write_image,
1463
+ (png_structrp png_ptr, png_bytepp image));
1414
1464
 
1415
1465
  /* Write the end of the PNG file. */
1416
- PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr,
1417
- png_inforp info_ptr));
1466
+ PNG_EXPORT(61, void, png_write_end,
1467
+ (png_structrp png_ptr, png_inforp info_ptr));
1418
1468
 
1419
1469
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1420
1470
  /* Read the end of the PNG file. */
1421
- PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr));
1471
+ PNG_EXPORT(62, void, png_read_end,
1472
+ (png_structrp png_ptr, png_inforp info_ptr));
1422
1473
  #endif
1423
1474
 
1424
1475
  /* Free any memory associated with the png_info_struct */
1425
- PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr,
1426
- png_infopp info_ptr_ptr));
1476
+ PNG_EXPORT(63, void, png_destroy_info_struct,
1477
+ (png_const_structrp png_ptr, png_infopp info_ptr_ptr));
1427
1478
 
1428
1479
  /* Free any memory associated with the png_struct and the png_info_structs */
1429
- PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr,
1480
+ PNG_EXPORT(64, void, png_destroy_read_struct,
1481
+ (png_structpp png_ptr_ptr,
1430
1482
  png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
1431
1483
 
1432
1484
  /* Free any memory associated with the png_struct and the png_info_structs */
1433
- PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr,
1434
- png_infopp info_ptr_ptr));
1485
+ PNG_EXPORT(65, void, png_destroy_write_struct,
1486
+ (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
1435
1487
 
1436
1488
  /* Set the libpng method of handling chunk CRC errors */
1437
- PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action,
1438
- int ancil_action));
1489
+ PNG_EXPORT(66, void, png_set_crc_action,
1490
+ (png_structrp png_ptr, int crit_action, int ancil_action));
1439
1491
 
1440
1492
  /* Values for png_set_crc_action() say how to handle CRC errors in
1441
1493
  * ancillary and critical chunks, and whether to use the data contained
@@ -1465,8 +1517,8 @@ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action,
1465
1517
  /* Set the filtering method(s) used by libpng. Currently, the only valid
1466
1518
  * value for "method" is 0.
1467
1519
  */
1468
- PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1469
- int filters));
1520
+ PNG_EXPORT(67, void, png_set_filter,
1521
+ (png_structrp png_ptr, int method, int filters));
1470
1522
  #endif /* WRITE */
1471
1523
 
1472
1524
  /* Flags for png_set_filter() to say which filters to use. The flags
@@ -1495,11 +1547,14 @@ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1495
1547
 
1496
1548
  #ifdef PNG_WRITE_SUPPORTED
1497
1549
  #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */
1498
- PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr,
1499
- int heuristic_method, int num_weights, png_const_doublep filter_weights,
1550
+ PNG_FP_EXPORT(68, void, png_set_filter_heuristics,
1551
+ (png_structrp png_ptr,
1552
+ int heuristic_method, int num_weights,
1553
+ png_const_doublep filter_weights,
1500
1554
  png_const_doublep filter_costs))
1501
1555
  PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
1502
- (png_structrp png_ptr, int heuristic_method, int num_weights,
1556
+ (png_structrp png_ptr,
1557
+ int heuristic_method, int num_weights,
1503
1558
  png_const_fixed_point_p filter_weights,
1504
1559
  png_const_fixed_point_p filter_costs))
1505
1560
  #endif /* WRITE_WEIGHTED_FILTER */
@@ -1518,44 +1573,44 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
1518
1573
  * these values may not correspond directly to the zlib compression levels.
1519
1574
  */
1520
1575
  #ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
1521
- PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr,
1522
- int level));
1576
+ PNG_EXPORT(69, void, png_set_compression_level,
1577
+ (png_structrp png_ptr, int level));
1523
1578
 
1524
- PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr,
1525
- int mem_level));
1579
+ PNG_EXPORT(70, void, png_set_compression_mem_level,
1580
+ (png_structrp png_ptr, int mem_level));
1526
1581
 
1527
- PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr,
1528
- int strategy));
1582
+ PNG_EXPORT(71, void, png_set_compression_strategy,
1583
+ (png_structrp png_ptr, int strategy));
1529
1584
 
1530
1585
  /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1531
1586
  * smaller value of window_bits if it can do so safely.
1532
1587
  */
1533
- PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr,
1534
- int window_bits));
1588
+ PNG_EXPORT(72, void, png_set_compression_window_bits,
1589
+ (png_structrp png_ptr, int window_bits));
1535
1590
 
1536
- PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr,
1537
- int method));
1591
+ PNG_EXPORT(73, void, png_set_compression_method,
1592
+ (png_structrp png_ptr, int method));
1538
1593
  #endif /* WRITE_CUSTOMIZE_COMPRESSION */
1539
1594
 
1540
1595
  #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
1541
1596
  /* Also set zlib parameters for compressing non-IDAT chunks */
1542
- PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr,
1543
- int level));
1597
+ PNG_EXPORT(222, void, png_set_text_compression_level,
1598
+ (png_structrp png_ptr, int level));
1544
1599
 
1545
- PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr,
1546
- int mem_level));
1600
+ PNG_EXPORT(223, void, png_set_text_compression_mem_level,
1601
+ (png_structrp png_ptr, int mem_level));
1547
1602
 
1548
- PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr,
1549
- int strategy));
1603
+ PNG_EXPORT(224, void, png_set_text_compression_strategy,
1604
+ (png_structrp png_ptr, int strategy));
1550
1605
 
1551
1606
  /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1552
1607
  * smaller value of window_bits if it can do so safely.
1553
1608
  */
1554
1609
  PNG_EXPORT(225, void, png_set_text_compression_window_bits,
1555
- (png_structrp png_ptr, int window_bits));
1610
+ (png_structrp png_ptr, int window_bits));
1556
1611
 
1557
- PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
1558
- int method));
1612
+ PNG_EXPORT(226, void, png_set_text_compression_method,
1613
+ (png_structrp png_ptr, int method));
1559
1614
  #endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
1560
1615
  #endif /* WRITE */
1561
1616
 
@@ -1570,7 +1625,8 @@ PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
1570
1625
 
1571
1626
  #ifdef PNG_STDIO_SUPPORTED
1572
1627
  /* Initialize the input/output for the PNG file to the default functions. */
1573
- PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, FILE *fp));
1628
+ PNG_EXPORT(74, void, png_init_io,
1629
+ (png_structrp png_ptr, FILE *fp));
1574
1630
  #endif
1575
1631
 
1576
1632
  /* Replace the (error and abort), and warning functions with user
@@ -1581,11 +1637,13 @@ PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, FILE *fp));
1581
1637
  * default function will be used.
1582
1638
  */
1583
1639
 
1584
- PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr,
1640
+ PNG_EXPORT(75, void, png_set_error_fn,
1641
+ (png_structrp png_ptr,
1585
1642
  png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
1586
1643
 
1587
1644
  /* Return the user pointer associated with the error functions */
1588
- PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr));
1645
+ PNG_EXPORT(76, png_voidp, png_get_error_ptr,
1646
+ (png_const_structrp png_ptr));
1589
1647
 
1590
1648
  /* Replace the default data output functions with a user supplied one(s).
1591
1649
  * If buffered output is not used, then output_flush_fn can be set to NULL.
@@ -1597,47 +1655,54 @@ PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr));
1597
1655
  * default flush function, which uses the standard *FILE structure, will
1598
1656
  * be used.
1599
1657
  */
1600
- PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr,
1658
+ PNG_EXPORT(77, void, png_set_write_fn,
1659
+ (png_structrp png_ptr,
1660
+ png_voidp io_ptr,
1601
1661
  png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
1602
1662
 
1603
1663
  /* Replace the default data input function with a user supplied one. */
1604
- PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr,
1605
- png_rw_ptr read_data_fn));
1664
+ PNG_EXPORT(78, void, png_set_read_fn,
1665
+ (png_structrp png_ptr,
1666
+ png_voidp io_ptr, png_rw_ptr read_data_fn));
1606
1667
 
1607
1668
  /* Return the user pointer associated with the I/O functions */
1608
- PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr));
1669
+ PNG_EXPORT(79, png_voidp, png_get_io_ptr,
1670
+ (png_const_structrp png_ptr));
1609
1671
 
1610
- PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr,
1611
- png_read_status_ptr read_row_fn));
1672
+ PNG_EXPORT(80, void, png_set_read_status_fn,
1673
+ (png_structrp png_ptr, png_read_status_ptr read_row_fn));
1612
1674
 
1613
- PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr,
1614
- png_write_status_ptr write_row_fn));
1675
+ PNG_EXPORT(81, void, png_set_write_status_fn,
1676
+ (png_structrp png_ptr, png_write_status_ptr write_row_fn));
1615
1677
 
1616
1678
  #ifdef PNG_USER_MEM_SUPPORTED
1617
1679
  /* Replace the default memory allocation functions with user supplied one(s). */
1618
- PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr,
1619
- png_malloc_ptr malloc_fn, png_free_ptr free_fn));
1680
+ PNG_EXPORT(82, void, png_set_mem_fn,
1681
+ (png_structrp png_ptr,
1682
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
1620
1683
  /* Return the user pointer associated with the memory functions */
1621
- PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr));
1684
+ PNG_EXPORT(83, png_voidp, png_get_mem_ptr,
1685
+ (png_const_structrp png_ptr));
1622
1686
  #endif
1623
1687
 
1624
1688
  #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
1625
- PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr,
1626
- png_user_transform_ptr read_user_transform_fn));
1689
+ PNG_EXPORT(84, void, png_set_read_user_transform_fn,
1690
+ (png_structrp png_ptr, png_user_transform_ptr read_user_transform_fn));
1627
1691
  #endif
1628
1692
 
1629
1693
  #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
1630
- PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr,
1631
- png_user_transform_ptr write_user_transform_fn));
1694
+ PNG_EXPORT(85, void, png_set_write_user_transform_fn,
1695
+ (png_structrp png_ptr, png_user_transform_ptr write_user_transform_fn));
1632
1696
  #endif
1633
1697
 
1634
1698
  #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
1635
- PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr,
1636
- png_voidp user_transform_ptr, int user_transform_depth,
1637
- int user_transform_channels));
1699
+ PNG_EXPORT(86, void, png_set_user_transform_info,
1700
+ (png_structrp png_ptr,
1701
+ png_voidp user_transform_ptr,
1702
+ int user_transform_depth, int user_transform_channels));
1638
1703
  /* Return the user pointer associated with the user transform functions */
1639
1704
  PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
1640
- (png_const_structrp png_ptr));
1705
+ (png_const_structrp png_ptr));
1641
1706
  #endif
1642
1707
 
1643
1708
  #ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
@@ -1652,8 +1717,10 @@ PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
1652
1717
  * find the output pixel (x,y) given an interlaced sub-image pixel
1653
1718
  * (row,col,pass). (See below for these macros.)
1654
1719
  */
1655
- PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp));
1656
- PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp));
1720
+ PNG_EXPORT(217, png_uint_32, png_get_current_row_number,
1721
+ (png_const_structrp));
1722
+ PNG_EXPORT(218, png_byte, png_get_current_pass_number,
1723
+ (png_const_structrp));
1657
1724
  #endif
1658
1725
 
1659
1726
  #ifdef PNG_READ_USER_CHUNKS_SUPPORTED
@@ -1676,28 +1743,32 @@ PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp));
1676
1743
  * See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about
1677
1744
  * how this behavior will change in libpng 1.7
1678
1745
  */
1679
- PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr,
1746
+ PNG_EXPORT(88, void, png_set_read_user_chunk_fn,
1747
+ (png_structrp png_ptr,
1680
1748
  png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
1681
1749
  #endif
1682
1750
 
1683
1751
  #ifdef PNG_USER_CHUNKS_SUPPORTED
1684
- PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr));
1752
+ PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr,
1753
+ (png_const_structrp png_ptr));
1685
1754
  #endif
1686
1755
 
1687
1756
  #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
1688
1757
  /* Sets the function callbacks for the push reader, and a pointer to a
1689
1758
  * user-defined structure available to the callback functions.
1690
1759
  */
1691
- PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr,
1760
+ PNG_EXPORT(90, void, png_set_progressive_read_fn,
1761
+ (png_structrp png_ptr,
1692
1762
  png_voidp progressive_ptr, png_progressive_info_ptr info_fn,
1693
1763
  png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn));
1694
1764
 
1695
1765
  /* Returns the user pointer associated with the push read functions */
1696
1766
  PNG_EXPORT(91, png_voidp, png_get_progressive_ptr,
1697
- (png_const_structrp png_ptr));
1767
+ (png_const_structrp png_ptr));
1698
1768
 
1699
1769
  /* Function to be called when data becomes available */
1700
- PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
1770
+ PNG_EXPORT(92, void, png_process_data,
1771
+ (png_structrp png_ptr,
1701
1772
  png_inforp info_ptr, png_bytep buffer, size_t buffer_size));
1702
1773
 
1703
1774
  /* A function which may be called *only* within png_process_data to stop the
@@ -1707,7 +1778,8 @@ PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
1707
1778
  * 'save' is set to true the routine will first save all the pending data and
1708
1779
  * will always return 0.
1709
1780
  */
1710
- PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save));
1781
+ PNG_EXPORT(219, size_t, png_process_data_pause,
1782
+ (png_structrp, int save));
1711
1783
 
1712
1784
  /* A function which may be called *only* outside (after) a call to
1713
1785
  * png_process_data. It returns the number of bytes of data to skip in the
@@ -1715,45 +1787,53 @@ PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save));
1715
1787
  * application must skip than number of bytes of input data and pass the
1716
1788
  * following data to the next call to png_process_data.
1717
1789
  */
1718
- PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
1790
+ PNG_EXPORT(220, png_uint_32, png_process_data_skip,
1791
+ (png_structrp));
1719
1792
 
1720
1793
  /* Function that combines rows. 'new_row' is a flag that should come from
1721
1794
  * the callback and be non-NULL if anything needs to be done; the library
1722
1795
  * stores its own version of the new data internally and ignores the passed
1723
1796
  * in value.
1724
1797
  */
1725
- PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr,
1798
+ PNG_EXPORT(93, void, png_progressive_combine_row,
1799
+ (png_const_structrp png_ptr,
1726
1800
  png_bytep old_row, png_const_bytep new_row));
1727
1801
  #endif /* PROGRESSIVE_READ */
1728
1802
 
1729
- PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr,
1730
- png_alloc_size_t size), PNG_ALLOCATED);
1803
+ PNG_EXPORTA(94, png_voidp, png_malloc,
1804
+ (png_const_structrp png_ptr, png_alloc_size_t size),
1805
+ PNG_ALLOCATED);
1731
1806
  /* Added at libpng version 1.4.0 */
1732
- PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr,
1733
- png_alloc_size_t size), PNG_ALLOCATED);
1807
+ PNG_EXPORTA(95, png_voidp, png_calloc,
1808
+ (png_const_structrp png_ptr, png_alloc_size_t size),
1809
+ PNG_ALLOCATED);
1734
1810
 
1735
1811
  /* Added at libpng version 1.2.4 */
1736
- PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr,
1737
- png_alloc_size_t size), PNG_ALLOCATED);
1812
+ PNG_EXPORTA(96, png_voidp, png_malloc_warn,
1813
+ (png_const_structrp png_ptr, png_alloc_size_t size),
1814
+ PNG_ALLOCATED);
1738
1815
 
1739
1816
  /* Frees a pointer allocated by png_malloc() */
1740
- PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
1817
+ PNG_EXPORT(97, void, png_free,
1818
+ (png_const_structrp png_ptr, png_voidp ptr));
1741
1819
 
1742
1820
  /* Free data that was allocated internally */
1743
- PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
1744
- png_inforp info_ptr, png_uint_32 free_me, int num));
1821
+ PNG_EXPORT(98, void, png_free_data,
1822
+ (png_const_structrp png_ptr, png_inforp info_ptr,
1823
+ png_uint_32 free_me, int num));
1745
1824
 
1746
1825
  /* Reassign the responsibility for freeing existing data, whether allocated
1747
1826
  * by libpng or by the application; this works on the png_info structure passed
1748
1827
  * in, without changing the state for other png_info structures.
1749
1828
  */
1750
- PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1751
- png_inforp info_ptr, int freer, png_uint_32 mask));
1829
+ PNG_EXPORT(99, void, png_data_freer,
1830
+ (png_const_structrp png_ptr, png_inforp info_ptr,
1831
+ int freer, png_uint_32 mask));
1752
1832
 
1753
1833
  /* Assignments for png_data_freer */
1754
1834
  #define PNG_DESTROY_WILL_FREE_DATA 1
1755
- #define PNG_SET_WILL_FREE_DATA 1
1756
- #define PNG_USER_WILL_FREE_DATA 2
1835
+ #define PNG_SET_WILL_FREE_DATA 1
1836
+ #define PNG_USER_WILL_FREE_DATA 2
1757
1837
  /* Flags for png_ptr->free_me and info_ptr->free_me */
1758
1838
  #define PNG_FREE_HIST 0x0008U
1759
1839
  #define PNG_FREE_ICCP 0x0010U
@@ -1773,36 +1853,42 @@ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1773
1853
  #define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
1774
1854
 
1775
1855
  #ifdef PNG_USER_MEM_SUPPORTED
1776
- PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr,
1777
- png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED);
1778
- PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr,
1779
- png_voidp ptr), PNG_DEPRECATED);
1856
+ PNG_EXPORTA(100, png_voidp, png_malloc_default,
1857
+ (png_const_structrp png_ptr, png_alloc_size_t size),
1858
+ PNG_ALLOCATED PNG_DEPRECATED);
1859
+ PNG_EXPORTA(101, void, png_free_default,
1860
+ (png_const_structrp png_ptr, png_voidp ptr),
1861
+ PNG_DEPRECATED);
1780
1862
  #endif
1781
1863
 
1782
1864
  #ifdef PNG_ERROR_TEXT_SUPPORTED
1783
1865
  /* Fatal error in PNG image of libpng - can't continue */
1784
- PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr,
1785
- png_const_charp error_message), PNG_NORETURN);
1866
+ PNG_EXPORTA(102, void, png_error,
1867
+ (png_const_structrp png_ptr, png_const_charp error_message),
1868
+ PNG_NORETURN);
1786
1869
 
1787
1870
  /* The same, but the chunk name is prepended to the error string. */
1788
- PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
1789
- png_const_charp error_message), PNG_NORETURN);
1871
+ PNG_EXPORTA(103, void, png_chunk_error,
1872
+ (png_const_structrp png_ptr, png_const_charp error_message),
1873
+ PNG_NORETURN);
1790
1874
 
1791
1875
  #else
1792
1876
  /* Fatal error in PNG image of libpng - can't continue */
1793
- PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
1877
+ PNG_EXPORTA(104, void, png_err,
1878
+ (png_const_structrp png_ptr),
1879
+ PNG_NORETURN);
1794
1880
  # define png_error(s1,s2) png_err(s1)
1795
1881
  # define png_chunk_error(s1,s2) png_err(s1)
1796
1882
  #endif
1797
1883
 
1798
1884
  #ifdef PNG_WARNINGS_SUPPORTED
1799
1885
  /* Non-fatal error in libpng. Can continue, but may have a problem. */
1800
- PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr,
1801
- png_const_charp warning_message));
1886
+ PNG_EXPORT(105, void, png_warning,
1887
+ (png_const_structrp png_ptr, png_const_charp warning_message));
1802
1888
 
1803
1889
  /* Non-fatal error in libpng, chunk name is prepended to message. */
1804
- PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
1805
- png_const_charp warning_message));
1890
+ PNG_EXPORT(106, void, png_chunk_warning,
1891
+ (png_const_structrp png_ptr, png_const_charp warning_message));
1806
1892
  #else
1807
1893
  # define png_warning(s1,s2) ((void)(s1))
1808
1894
  # define png_chunk_warning(s1,s2) ((void)(s1))
@@ -1811,17 +1897,17 @@ PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
1811
1897
  #ifdef PNG_BENIGN_ERRORS_SUPPORTED
1812
1898
  /* Benign error in libpng. Can continue, but may have a problem.
1813
1899
  * User can choose whether to handle as a fatal error or as a warning. */
1814
- PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr,
1815
- png_const_charp warning_message));
1900
+ PNG_EXPORT(107, void, png_benign_error,
1901
+ (png_const_structrp png_ptr, png_const_charp warning_message));
1816
1902
 
1817
1903
  #ifdef PNG_READ_SUPPORTED
1818
1904
  /* Same, chunk name is prepended to message (only during read) */
1819
- PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr,
1820
- png_const_charp warning_message));
1905
+ PNG_EXPORT(108, void, png_chunk_benign_error,
1906
+ (png_const_structrp png_ptr, png_const_charp warning_message));
1821
1907
  #endif
1822
1908
 
1823
1909
  PNG_EXPORT(109, void, png_set_benign_errors,
1824
- (png_structrp png_ptr, int allowed));
1910
+ (png_structrp png_ptr, int allowed));
1825
1911
  #else
1826
1912
  # ifdef PNG_ALLOW_BENIGN_ERRORS
1827
1913
  # define png_benign_error png_warning
@@ -1845,169 +1931,181 @@ PNG_EXPORT(109, void, png_set_benign_errors,
1845
1931
  * png_info_struct.
1846
1932
  */
1847
1933
  /* Returns "flag" if chunk data is valid in info_ptr. */
1848
- PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr,
1849
- png_const_inforp info_ptr, png_uint_32 flag));
1934
+ PNG_EXPORT(110, png_uint_32, png_get_valid,
1935
+ (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 flag));
1850
1936
 
1851
1937
  /* Returns number of bytes needed to hold a transformed row. */
1852
- PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr,
1853
- png_const_inforp info_ptr));
1938
+ PNG_EXPORT(111, size_t, png_get_rowbytes,
1939
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1854
1940
 
1855
1941
  #ifdef PNG_INFO_IMAGE_SUPPORTED
1856
1942
  /* Returns row_pointers, which is an array of pointers to scanlines that was
1857
1943
  * returned from png_read_png().
1858
1944
  */
1859
- PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr,
1860
- png_const_inforp info_ptr));
1945
+ PNG_EXPORT(112, png_bytepp, png_get_rows,
1946
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1861
1947
 
1862
1948
  /* Set row_pointers, which is an array of pointers to scanlines for use
1863
1949
  * by png_write_png().
1864
1950
  */
1865
- PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr,
1866
- png_inforp info_ptr, png_bytepp row_pointers));
1951
+ PNG_EXPORT(113, void, png_set_rows,
1952
+ (png_const_structrp png_ptr, png_inforp info_ptr, png_bytepp row_pointers));
1867
1953
  #endif
1868
1954
 
1869
1955
  /* Returns number of color channels in image. */
1870
- PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr,
1871
- png_const_inforp info_ptr));
1956
+ PNG_EXPORT(114, png_byte, png_get_channels,
1957
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1872
1958
 
1873
1959
  #ifdef PNG_EASY_ACCESS_SUPPORTED
1874
1960
  /* Returns image width in pixels. */
1875
- PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr,
1876
- png_const_inforp info_ptr));
1961
+ PNG_EXPORT(115, png_uint_32, png_get_image_width,
1962
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1877
1963
 
1878
1964
  /* Returns image height in pixels. */
1879
- PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr,
1880
- png_const_inforp info_ptr));
1965
+ PNG_EXPORT(116, png_uint_32, png_get_image_height,
1966
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1881
1967
 
1882
1968
  /* Returns image bit_depth. */
1883
- PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr,
1884
- png_const_inforp info_ptr));
1969
+ PNG_EXPORT(117, png_byte, png_get_bit_depth,
1970
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1885
1971
 
1886
1972
  /* Returns image color_type. */
1887
- PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr,
1888
- png_const_inforp info_ptr));
1973
+ PNG_EXPORT(118, png_byte, png_get_color_type,
1974
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1889
1975
 
1890
1976
  /* Returns image filter_type. */
1891
- PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr,
1892
- png_const_inforp info_ptr));
1977
+ PNG_EXPORT(119, png_byte, png_get_filter_type,
1978
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1893
1979
 
1894
1980
  /* Returns image interlace_type. */
1895
- PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr,
1896
- png_const_inforp info_ptr));
1981
+ PNG_EXPORT(120, png_byte, png_get_interlace_type,
1982
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1897
1983
 
1898
1984
  /* Returns image compression_type. */
1899
- PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr,
1900
- png_const_inforp info_ptr));
1985
+ PNG_EXPORT(121, png_byte, png_get_compression_type,
1986
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1901
1987
 
1902
1988
  /* Returns image resolution in pixels per meter, from pHYs chunk data. */
1903
1989
  PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter,
1904
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
1990
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1905
1991
  PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter,
1906
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
1992
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1907
1993
  PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter,
1908
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
1994
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1909
1995
 
1910
1996
  /* Returns pixel aspect ratio, computed from pHYs chunk data. */
1911
1997
  PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio,
1912
- (png_const_structrp png_ptr, png_const_inforp info_ptr))
1998
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
1913
1999
  PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed,
1914
- (png_const_structrp png_ptr, png_const_inforp info_ptr))
2000
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
1915
2001
 
1916
2002
  /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
1917
2003
  PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels,
1918
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2004
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1919
2005
  PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels,
1920
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2006
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1921
2007
  PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
1922
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2008
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1923
2009
  PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
1924
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2010
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1925
2011
 
1926
2012
  #endif /* EASY_ACCESS */
1927
2013
 
1928
2014
  #ifdef PNG_READ_SUPPORTED
1929
2015
  /* Returns pointer to signature string read from PNG header */
1930
- PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr,
1931
- png_const_inforp info_ptr));
2016
+ PNG_EXPORT(130, png_const_bytep, png_get_signature,
2017
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
1932
2018
  #endif
1933
2019
 
1934
2020
  #ifdef PNG_bKGD_SUPPORTED
1935
- PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr,
1936
- png_inforp info_ptr, png_color_16p *background));
2021
+ PNG_EXPORT(131, png_uint_32, png_get_bKGD,
2022
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2023
+ png_color_16p *background));
1937
2024
  #endif
1938
2025
 
1939
2026
  #ifdef PNG_bKGD_SUPPORTED
1940
- PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr,
1941
- png_inforp info_ptr, png_const_color_16p background));
2027
+ PNG_EXPORT(132, void, png_set_bKGD,
2028
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2029
+ png_const_color_16p background));
1942
2030
  #endif
1943
2031
 
1944
2032
  #ifdef PNG_cHRM_SUPPORTED
1945
- PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr,
1946
- png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x,
1947
- double *red_y, double *green_x, double *green_y, double *blue_x,
1948
- double *blue_y))
1949
- PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr,
1950
- png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z,
1951
- double *green_X, double *green_Y, double *green_Z, double *blue_X,
1952
- double *blue_Y, double *blue_Z))
2033
+ PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM,
2034
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2035
+ double *white_x, double *white_y,
2036
+ double *red_x, double *red_y,
2037
+ double *green_x, double *green_y,
2038
+ double *blue_x, double *blue_y))
2039
+ PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ,
2040
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2041
+ double *red_X, double *red_Y, double *red_Z,
2042
+ double *green_X, double *green_Y, double *green_Z,
2043
+ double *blue_X, double *blue_Y, double *blue_Z))
1953
2044
  PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed,
1954
- (png_const_structrp png_ptr, png_const_inforp info_ptr,
2045
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
1955
2046
  png_fixed_point *int_white_x, png_fixed_point *int_white_y,
1956
2047
  png_fixed_point *int_red_x, png_fixed_point *int_red_y,
1957
2048
  png_fixed_point *int_green_x, png_fixed_point *int_green_y,
1958
2049
  png_fixed_point *int_blue_x, png_fixed_point *int_blue_y))
1959
2050
  PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed,
1960
- (png_const_structrp png_ptr, png_const_inforp info_ptr,
2051
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
1961
2052
  png_fixed_point *int_red_X, png_fixed_point *int_red_Y,
1962
- png_fixed_point *int_red_Z, png_fixed_point *int_green_X,
1963
- png_fixed_point *int_green_Y, png_fixed_point *int_green_Z,
2053
+ png_fixed_point *int_red_Z,
2054
+ png_fixed_point *int_green_X, png_fixed_point *int_green_Y,
2055
+ png_fixed_point *int_green_Z,
1964
2056
  png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y,
1965
2057
  png_fixed_point *int_blue_Z))
1966
2058
  #endif
1967
2059
 
1968
2060
  #ifdef PNG_cHRM_SUPPORTED
1969
- PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr,
1970
- png_inforp info_ptr,
1971
- double white_x, double white_y, double red_x, double red_y, double green_x,
1972
- double green_y, double blue_x, double blue_y))
1973
- PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr,
1974
- png_inforp info_ptr, double red_X, double red_Y, double red_Z,
1975
- double green_X, double green_Y, double green_Z, double blue_X,
1976
- double blue_Y, double blue_Z))
1977
- PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr,
1978
- png_inforp info_ptr, png_fixed_point int_white_x,
1979
- png_fixed_point int_white_y, png_fixed_point int_red_x,
1980
- png_fixed_point int_red_y, png_fixed_point int_green_x,
1981
- png_fixed_point int_green_y, png_fixed_point int_blue_x,
1982
- png_fixed_point int_blue_y))
1983
- PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
1984
- png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y,
1985
- png_fixed_point int_red_Z, png_fixed_point int_green_X,
1986
- png_fixed_point int_green_Y, png_fixed_point int_green_Z,
2061
+ PNG_FP_EXPORT(135, void, png_set_cHRM,
2062
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2063
+ double white_x, double white_y,
2064
+ double red_x, double red_y,
2065
+ double green_x, double green_y,
2066
+ double blue_x, double blue_y))
2067
+ PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ,
2068
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2069
+ double red_X, double red_Y, double red_Z,
2070
+ double green_X, double green_Y, double green_Z,
2071
+ double blue_X, double blue_Y, double blue_Z))
2072
+ PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed,
2073
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2074
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
2075
+ png_fixed_point int_red_x, png_fixed_point int_red_y,
2076
+ png_fixed_point int_green_x, png_fixed_point int_green_y,
2077
+ png_fixed_point int_blue_x, png_fixed_point int_blue_y))
2078
+ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed,
2079
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2080
+ png_fixed_point int_red_X, png_fixed_point int_red_Y,
2081
+ png_fixed_point int_red_Z,
2082
+ png_fixed_point int_green_X, png_fixed_point int_green_Y,
2083
+ png_fixed_point int_green_Z,
1987
2084
  png_fixed_point int_blue_X, png_fixed_point int_blue_Y,
1988
2085
  png_fixed_point int_blue_Z))
1989
2086
  #endif
1990
2087
 
1991
2088
  #ifdef PNG_cICP_SUPPORTED
1992
- PNG_EXPORT(250, png_uint_32, png_get_cICP, (png_const_structrp png_ptr,
1993
- png_const_inforp info_ptr, png_bytep colour_primaries,
1994
- png_bytep transfer_function, png_bytep matrix_coefficients,
1995
- png_bytep video_full_range_flag));
2089
+ PNG_EXPORT(250, png_uint_32, png_get_cICP,
2090
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2091
+ png_bytep colour_primaries, png_bytep transfer_function,
2092
+ png_bytep matrix_coefficients, png_bytep video_full_range_flag));
1996
2093
  #endif
1997
2094
 
1998
2095
  #ifdef PNG_cICP_SUPPORTED
1999
- PNG_EXPORT(251, void, png_set_cICP, (png_const_structrp png_ptr,
2000
- png_inforp info_ptr, png_byte colour_primaries,
2001
- png_byte transfer_function, png_byte matrix_coefficients,
2002
- png_byte video_full_range_flag));
2096
+ PNG_EXPORT(251, void, png_set_cICP,
2097
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2098
+ png_byte colour_primaries, png_byte transfer_function,
2099
+ png_byte matrix_coefficients, png_byte video_full_range_flag));
2003
2100
  #endif
2004
2101
 
2005
2102
  #ifdef PNG_cLLI_SUPPORTED
2006
- PNG_FP_EXPORT(252, png_uint_32, png_get_cLLI, (png_const_structrp png_ptr,
2007
- png_const_inforp info_ptr, double *maximum_content_light_level,
2008
- double *maximum_frame_average_light_level))
2103
+ PNG_FP_EXPORT(252, png_uint_32, png_get_cLLI,
2104
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2105
+ double *maximum_content_light_level,
2106
+ double *maximum_frame_average_light_level))
2009
2107
  PNG_FIXED_EXPORT(253, png_uint_32, png_get_cLLI_fixed,
2010
- (png_const_structrp png_ptr, png_const_inforp info_ptr,
2108
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2011
2109
  /* The values below are in cd/m2 (nits) and are scaled by 10,000; not
2012
2110
  * 100,000 as in the case of png_fixed_point.
2013
2111
  */
@@ -2016,11 +2114,12 @@ PNG_FIXED_EXPORT(253, png_uint_32, png_get_cLLI_fixed,
2016
2114
  #endif
2017
2115
 
2018
2116
  #ifdef PNG_cLLI_SUPPORTED
2019
- PNG_FP_EXPORT(254, void, png_set_cLLI, (png_const_structrp png_ptr,
2020
- png_inforp info_ptr, double maximum_content_light_level,
2021
- double maximum_frame_average_light_level))
2022
- PNG_FIXED_EXPORT(255, void, png_set_cLLI_fixed, (png_const_structrp png_ptr,
2023
- png_inforp info_ptr,
2117
+ PNG_FP_EXPORT(254, void, png_set_cLLI,
2118
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2119
+ double maximum_content_light_level,
2120
+ double maximum_frame_average_light_level))
2121
+ PNG_FIXED_EXPORT(255, void, png_set_cLLI_fixed,
2122
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2024
2123
  /* The values below are in cd/m2 (nits) and are scaled by 10,000; not
2025
2124
  * 100,000 as in the case of png_fixed_point.
2026
2125
  */
@@ -2029,64 +2128,73 @@ PNG_FIXED_EXPORT(255, void, png_set_cLLI_fixed, (png_const_structrp png_ptr,
2029
2128
  #endif
2030
2129
 
2031
2130
  #ifdef PNG_eXIf_SUPPORTED
2032
- PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr,
2033
- png_inforp info_ptr, png_bytep *exif));
2034
- PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr,
2035
- png_inforp info_ptr, png_bytep exif));
2131
+ PNG_EXPORT(246, png_uint_32, png_get_eXIf,
2132
+ (png_const_structrp png_ptr, png_inforp info_ptr, png_bytep *exif));
2133
+ PNG_EXPORT(247, void, png_set_eXIf,
2134
+ (png_const_structrp png_ptr, png_inforp info_ptr, png_bytep exif));
2036
2135
 
2037
- PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr,
2038
- png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif));
2039
- PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr,
2040
- png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif));
2136
+ PNG_EXPORT(248, png_uint_32, png_get_eXIf_1,
2137
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2138
+ png_uint_32 *num_exif, png_bytep *exif));
2139
+ PNG_EXPORT(249, void, png_set_eXIf_1,
2140
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2141
+ png_uint_32 num_exif, png_bytep exif));
2041
2142
  #endif
2042
2143
 
2043
2144
  #ifdef PNG_gAMA_SUPPORTED
2044
- PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr,
2045
- png_const_inforp info_ptr, double *file_gamma))
2145
+ PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA,
2146
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2147
+ double *file_gamma))
2046
2148
  PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed,
2047
- (png_const_structrp png_ptr, png_const_inforp info_ptr,
2149
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2048
2150
  png_fixed_point *int_file_gamma))
2049
2151
  #endif
2050
2152
 
2051
2153
  #ifdef PNG_gAMA_SUPPORTED
2052
- PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr,
2053
- png_inforp info_ptr, double file_gamma))
2054
- PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr,
2055
- png_inforp info_ptr, png_fixed_point int_file_gamma))
2154
+ PNG_FP_EXPORT(139, void, png_set_gAMA,
2155
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2156
+ double file_gamma))
2157
+ PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed,
2158
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2159
+ png_fixed_point int_file_gamma))
2056
2160
  #endif
2057
2161
 
2058
2162
  #ifdef PNG_hIST_SUPPORTED
2059
- PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr,
2060
- png_inforp info_ptr, png_uint_16p *hist));
2061
- PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr,
2062
- png_inforp info_ptr, png_const_uint_16p hist));
2163
+ PNG_EXPORT(141, png_uint_32, png_get_hIST,
2164
+ (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_16p *hist));
2165
+ PNG_EXPORT(142, void, png_set_hIST,
2166
+ (png_const_structrp png_ptr, png_inforp info_ptr, png_const_uint_16p hist));
2063
2167
  #endif
2064
2168
 
2065
- PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr,
2066
- png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height,
2067
- int *bit_depth, int *color_type, int *interlace_method,
2068
- int *compression_method, int *filter_method));
2169
+ PNG_EXPORT(143, png_uint_32, png_get_IHDR,
2170
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2171
+ png_uint_32 *width, png_uint_32 *height,
2172
+ int *bit_depth, int *color_type,
2173
+ int *interlace_method, int *compression_method, int *filter_method));
2069
2174
 
2070
- PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr,
2071
- png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
2072
- int color_type, int interlace_method, int compression_method,
2073
- int filter_method));
2175
+ PNG_EXPORT(144, void, png_set_IHDR,
2176
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2177
+ png_uint_32 width, png_uint_32 height,
2178
+ int bit_depth, int color_type,
2179
+ int interlace_method, int compression_method, int filter_method));
2074
2180
 
2075
2181
  #ifdef PNG_mDCV_SUPPORTED
2076
- PNG_FP_EXPORT(256, png_uint_32, png_get_mDCV, (png_const_structrp png_ptr,
2077
- png_const_inforp info_ptr,
2182
+ PNG_FP_EXPORT(256, png_uint_32, png_get_mDCV,
2183
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2078
2184
  /* The chromaticities of the mastering display. As cHRM, but independent of
2079
2185
  * the encoding endpoints in cHRM, or cICP, or iCCP. These values will
2080
2186
  * always be in the range 0 to 1.3107.
2081
2187
  */
2082
- double *white_x, double *white_y, double *red_x, double *red_y,
2083
- double *green_x, double *green_y, double *blue_x, double *blue_y,
2188
+ double *white_x, double *white_y,
2189
+ double *red_x, double *red_y,
2190
+ double *green_x, double *green_y,
2191
+ double *blue_x, double *blue_y,
2084
2192
  /* Mastering display luminance in cd/m2 (nits). */
2085
2193
  double *mastering_display_maximum_luminance,
2086
2194
  double *mastering_display_minimum_luminance))
2087
2195
 
2088
2196
  PNG_FIXED_EXPORT(257, png_uint_32, png_get_mDCV_fixed,
2089
- (png_const_structrp png_ptr, png_const_inforp info_ptr,
2197
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2090
2198
  png_fixed_point *int_white_x, png_fixed_point *int_white_y,
2091
2199
  png_fixed_point *int_red_x, png_fixed_point *int_red_y,
2092
2200
  png_fixed_point *int_green_x, png_fixed_point *int_green_y,
@@ -2099,19 +2207,21 @@ PNG_FIXED_EXPORT(257, png_uint_32, png_get_mDCV_fixed,
2099
2207
  #endif
2100
2208
 
2101
2209
  #ifdef PNG_mDCV_SUPPORTED
2102
- PNG_FP_EXPORT(258, void, png_set_mDCV, (png_const_structrp png_ptr,
2103
- png_inforp info_ptr,
2210
+ PNG_FP_EXPORT(258, void, png_set_mDCV,
2211
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2104
2212
  /* The chromaticities of the mastering display. As cHRM, but independent of
2105
2213
  * the encoding endpoints in cHRM, or cICP, or iCCP.
2106
2214
  */
2107
- double white_x, double white_y, double red_x, double red_y, double green_x,
2108
- double green_y, double blue_x, double blue_y,
2215
+ double white_x, double white_y,
2216
+ double red_x, double red_y,
2217
+ double green_x, double green_y,
2218
+ double blue_x, double blue_y,
2109
2219
  /* Mastering display luminance in cd/m2 (nits). */
2110
2220
  double mastering_display_maximum_luminance,
2111
2221
  double mastering_display_minimum_luminance))
2112
2222
 
2113
- PNG_FIXED_EXPORT(259, void, png_set_mDCV_fixed, (png_const_structrp png_ptr,
2114
- png_inforp info_ptr,
2223
+ PNG_FIXED_EXPORT(259, void, png_set_mDCV_fixed,
2224
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2115
2225
  /* The admissible range of these values is not the full range of a PNG
2116
2226
  * fixed point value. Negative values cannot be encoded and the maximum
2117
2227
  * value is about 1.3 */
@@ -2127,95 +2237,107 @@ PNG_FIXED_EXPORT(259, void, png_set_mDCV_fixed, (png_const_structrp png_ptr,
2127
2237
  #endif
2128
2238
 
2129
2239
  #ifdef PNG_oFFs_SUPPORTED
2130
- PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr,
2131
- png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
2132
- int *unit_type));
2240
+ PNG_EXPORT(145, png_uint_32, png_get_oFFs,
2241
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2242
+ png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type));
2133
2243
  #endif
2134
2244
 
2135
2245
  #ifdef PNG_oFFs_SUPPORTED
2136
- PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr,
2137
- png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y,
2138
- int unit_type));
2246
+ PNG_EXPORT(146, void, png_set_oFFs,
2247
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2248
+ png_int_32 offset_x, png_int_32 offset_y, int unit_type));
2139
2249
  #endif
2140
2250
 
2141
2251
  #ifdef PNG_pCAL_SUPPORTED
2142
- PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr,
2143
- png_inforp info_ptr, png_charp *purpose, png_int_32 *X0,
2144
- png_int_32 *X1, int *type, int *nparams, png_charp *units,
2145
- png_charpp *params));
2252
+ PNG_EXPORT(147, png_uint_32, png_get_pCAL,
2253
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2254
+ png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
2255
+ int *type, int *nparams, png_charp *units, png_charpp *params));
2146
2256
  #endif
2147
2257
 
2148
2258
  #ifdef PNG_pCAL_SUPPORTED
2149
- PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr,
2150
- png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1,
2259
+ PNG_EXPORT(148, void, png_set_pCAL,
2260
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2261
+ png_const_charp purpose, png_int_32 X0, png_int_32 X1,
2151
2262
  int type, int nparams, png_const_charp units, png_charpp params));
2152
2263
  #endif
2153
2264
 
2154
2265
  #ifdef PNG_pHYs_SUPPORTED
2155
- PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr,
2156
- png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
2157
- int *unit_type));
2266
+ PNG_EXPORT(149, png_uint_32, png_get_pHYs,
2267
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2268
+ png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
2158
2269
  #endif
2159
2270
 
2160
2271
  #ifdef PNG_pHYs_SUPPORTED
2161
- PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr,
2162
- png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
2272
+ PNG_EXPORT(150, void, png_set_pHYs,
2273
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2274
+ png_uint_32 res_x, png_uint_32 res_y, int unit_type));
2163
2275
  #endif
2164
2276
 
2165
- PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr,
2166
- png_inforp info_ptr, png_colorp *palette, int *num_palette));
2277
+ PNG_EXPORT(151, png_uint_32, png_get_PLTE,
2278
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2279
+ png_colorp *palette, int *num_palette));
2167
2280
 
2168
- PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr,
2169
- png_inforp info_ptr, png_const_colorp palette, int num_palette));
2281
+ PNG_EXPORT(152, void, png_set_PLTE,
2282
+ (png_structrp png_ptr, png_inforp info_ptr,
2283
+ png_const_colorp palette, int num_palette));
2170
2284
 
2171
2285
  #ifdef PNG_sBIT_SUPPORTED
2172
- PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr,
2173
- png_inforp info_ptr, png_color_8p *sig_bit));
2286
+ PNG_EXPORT(153, png_uint_32, png_get_sBIT,
2287
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2288
+ png_color_8p *sig_bit));
2174
2289
  #endif
2175
2290
 
2176
2291
  #ifdef PNG_sBIT_SUPPORTED
2177
- PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr,
2178
- png_inforp info_ptr, png_const_color_8p sig_bit));
2292
+ PNG_EXPORT(154, void, png_set_sBIT,
2293
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2294
+ png_const_color_8p sig_bit));
2179
2295
  #endif
2180
2296
 
2181
2297
  #ifdef PNG_sRGB_SUPPORTED
2182
- PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr,
2183
- png_const_inforp info_ptr, int *file_srgb_intent));
2298
+ PNG_EXPORT(155, png_uint_32, png_get_sRGB,
2299
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2300
+ int *file_srgb_intent));
2184
2301
  #endif
2185
2302
 
2186
2303
  #ifdef PNG_sRGB_SUPPORTED
2187
- PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr,
2188
- png_inforp info_ptr, int srgb_intent));
2189
- PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr,
2190
- png_inforp info_ptr, int srgb_intent));
2304
+ PNG_EXPORT(156, void, png_set_sRGB,
2305
+ (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent));
2306
+ PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM,
2307
+ (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent));
2191
2308
  #endif
2192
2309
 
2193
2310
  #ifdef PNG_iCCP_SUPPORTED
2194
- PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr,
2195
- png_inforp info_ptr, png_charpp name, int *compression_type,
2311
+ PNG_EXPORT(158, png_uint_32, png_get_iCCP,
2312
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2313
+ png_charpp name, int *compression_type,
2196
2314
  png_bytepp profile, png_uint_32 *proflen));
2197
2315
  #endif
2198
2316
 
2199
2317
  #ifdef PNG_iCCP_SUPPORTED
2200
- PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr,
2201
- png_inforp info_ptr, png_const_charp name, int compression_type,
2318
+ PNG_EXPORT(159, void, png_set_iCCP,
2319
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2320
+ png_const_charp name, int compression_type,
2202
2321
  png_const_bytep profile, png_uint_32 proflen));
2203
2322
  #endif
2204
2323
 
2205
2324
  #ifdef PNG_sPLT_SUPPORTED
2206
- PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr,
2207
- png_inforp info_ptr, png_sPLT_tpp entries));
2325
+ PNG_EXPORT(160, int, png_get_sPLT,
2326
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2327
+ png_sPLT_tpp entries));
2208
2328
  #endif
2209
2329
 
2210
2330
  #ifdef PNG_sPLT_SUPPORTED
2211
- PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr,
2212
- png_inforp info_ptr, png_const_sPLT_tp entries, int nentries));
2331
+ PNG_EXPORT(161, void, png_set_sPLT,
2332
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2333
+ png_const_sPLT_tp entries, int nentries));
2213
2334
  #endif
2214
2335
 
2215
2336
  #ifdef PNG_TEXT_SUPPORTED
2216
2337
  /* png_get_text also returns the number of text chunks in *num_text */
2217
- PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr,
2218
- png_inforp info_ptr, png_textp *text_ptr, int *num_text));
2338
+ PNG_EXPORT(162, int, png_get_text,
2339
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2340
+ png_textp *text_ptr, int *num_text));
2219
2341
  #endif
2220
2342
 
2221
2343
  /* Note while png_set_text() will accept a structure whose text,
@@ -2226,35 +2348,41 @@ PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr,
2226
2348
  */
2227
2349
 
2228
2350
  #ifdef PNG_TEXT_SUPPORTED
2229
- PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr,
2230
- png_inforp info_ptr, png_const_textp text_ptr, int num_text));
2351
+ PNG_EXPORT(163, void, png_set_text,
2352
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2353
+ png_const_textp text_ptr, int num_text));
2231
2354
  #endif
2232
2355
 
2233
2356
  #ifdef PNG_tIME_SUPPORTED
2234
- PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr,
2235
- png_inforp info_ptr, png_timep *mod_time));
2357
+ PNG_EXPORT(164, png_uint_32, png_get_tIME,
2358
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2359
+ png_timep *mod_time));
2236
2360
  #endif
2237
2361
 
2238
2362
  #ifdef PNG_tIME_SUPPORTED
2239
- PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr,
2240
- png_inforp info_ptr, png_const_timep mod_time));
2363
+ PNG_EXPORT(165, void, png_set_tIME,
2364
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2365
+ png_const_timep mod_time));
2241
2366
  #endif
2242
2367
 
2243
2368
  #ifdef PNG_tRNS_SUPPORTED
2244
- PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr,
2245
- png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans,
2369
+ PNG_EXPORT(166, png_uint_32, png_get_tRNS,
2370
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2371
+ png_bytep *trans_alpha, int *num_trans,
2246
2372
  png_color_16p *trans_color));
2247
2373
  #endif
2248
2374
 
2249
2375
  #ifdef PNG_tRNS_SUPPORTED
2250
- PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr,
2251
- png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans,
2376
+ PNG_EXPORT(167, void, png_set_tRNS,
2377
+ (png_structrp png_ptr, png_inforp info_ptr,
2378
+ png_const_bytep trans_alpha, int num_trans,
2252
2379
  png_const_color_16p trans_color));
2253
2380
  #endif
2254
2381
 
2255
2382
  #ifdef PNG_sCAL_SUPPORTED
2256
- PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr,
2257
- png_const_inforp info_ptr, int *unit, double *width, double *height))
2383
+ PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL,
2384
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2385
+ int *unit, double *width, double *height))
2258
2386
  #if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \
2259
2387
  defined(PNG_FLOATING_POINT_SUPPORTED)
2260
2388
  /* NOTE: this API is currently implemented using floating point arithmetic,
@@ -2263,21 +2391,22 @@ PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr,
2263
2391
  * is highly recommended that png_get_sCAL_s be used instead.
2264
2392
  */
2265
2393
  PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed,
2266
- (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit,
2267
- png_fixed_point *width, png_fixed_point *height))
2394
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2395
+ int *unit, png_fixed_point *width, png_fixed_point *height))
2268
2396
  #endif
2269
2397
  PNG_EXPORT(169, png_uint_32, png_get_sCAL_s,
2270
- (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit,
2271
- png_charpp swidth, png_charpp sheight));
2272
-
2273
- PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr,
2274
- png_inforp info_ptr, int unit, double width, double height))
2275
- PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr,
2276
- png_inforp info_ptr, int unit, png_fixed_point width,
2277
- png_fixed_point height))
2278
- PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
2279
- png_inforp info_ptr, int unit,
2280
- png_const_charp swidth, png_const_charp sheight));
2398
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2399
+ int *unit, png_charpp swidth, png_charpp sheight));
2400
+
2401
+ PNG_FP_EXPORT(170, void, png_set_sCAL,
2402
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2403
+ int unit, double width, double height))
2404
+ PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed,
2405
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2406
+ int unit, png_fixed_point width, png_fixed_point height))
2407
+ PNG_EXPORT(171, void, png_set_sCAL_s,
2408
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2409
+ int unit, png_const_charp swidth, png_const_charp sheight));
2281
2410
  #endif /* sCAL */
2282
2411
 
2283
2412
  #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
@@ -2380,7 +2509,8 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
2380
2509
  * be processed by libpng.
2381
2510
  */
2382
2511
  #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
2383
- PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr,
2512
+ PNG_EXPORT(172, void, png_set_keep_unknown_chunks,
2513
+ (png_structrp png_ptr,
2384
2514
  int keep, png_const_bytep chunk_list, int num_chunks));
2385
2515
  #endif /* HANDLE_AS_UNKNOWN */
2386
2516
 
@@ -2388,14 +2518,14 @@ PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr,
2388
2518
  * the result is therefore true (non-zero) if special handling is required,
2389
2519
  * false for the default handling.
2390
2520
  */
2391
- PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr,
2392
- png_const_bytep chunk_name));
2521
+ PNG_EXPORT(173, int, png_handle_as_unknown,
2522
+ (png_const_structrp png_ptr, png_const_bytep chunk_name));
2393
2523
  #endif /* SET_UNKNOWN_CHUNKS */
2394
2524
 
2395
2525
  #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
2396
- PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr,
2397
- png_inforp info_ptr, png_const_unknown_chunkp unknowns,
2398
- int num_unknowns));
2526
+ PNG_EXPORT(174, void, png_set_unknown_chunks,
2527
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2528
+ png_const_unknown_chunkp unknowns, int num_unknowns));
2399
2529
  /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added
2400
2530
  * unknowns to the location currently stored in the png_struct. This is
2401
2531
  * invariably the wrong value on write. To fix this call the following API
@@ -2406,43 +2536,47 @@ PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr,
2406
2536
  */
2407
2537
 
2408
2538
  PNG_EXPORT(175, void, png_set_unknown_chunk_location,
2409
- (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location));
2539
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2540
+ int chunk, int location));
2410
2541
 
2411
- PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr,
2412
- png_inforp info_ptr, png_unknown_chunkpp entries));
2542
+ PNG_EXPORT(176, int, png_get_unknown_chunks,
2543
+ (png_const_structrp png_ptr, png_inforp info_ptr,
2544
+ png_unknown_chunkpp entries));
2413
2545
  #endif
2414
2546
 
2415
2547
  /* Png_free_data() will turn off the "valid" flag for anything it frees.
2416
2548
  * If you need to turn it off for a chunk that your application has freed,
2417
2549
  * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
2418
2550
  */
2419
- PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr,
2420
- png_inforp info_ptr, int mask));
2551
+ PNG_EXPORT(177, void, png_set_invalid,
2552
+ (png_const_structrp png_ptr, png_inforp info_ptr, int mask));
2421
2553
 
2422
2554
  #ifdef PNG_INFO_IMAGE_SUPPORTED
2423
2555
  /* The "params" pointer is currently not used and is for future expansion. */
2424
2556
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
2425
- PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
2557
+ PNG_EXPORT(178, void, png_read_png,
2558
+ (png_structrp png_ptr, png_inforp info_ptr,
2426
2559
  int transforms, png_voidp params));
2427
2560
  #endif
2428
2561
  #ifdef PNG_WRITE_SUPPORTED
2429
- PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
2562
+ PNG_EXPORT(179, void, png_write_png,
2563
+ (png_structrp png_ptr, png_inforp info_ptr,
2430
2564
  int transforms, png_voidp params));
2431
2565
  #endif
2432
2566
  #endif
2433
2567
 
2434
2568
  PNG_EXPORT(180, png_const_charp, png_get_copyright,
2435
- (png_const_structrp png_ptr));
2569
+ (png_const_structrp png_ptr));
2436
2570
  PNG_EXPORT(181, png_const_charp, png_get_header_ver,
2437
- (png_const_structrp png_ptr));
2571
+ (png_const_structrp png_ptr));
2438
2572
  PNG_EXPORT(182, png_const_charp, png_get_header_version,
2439
- (png_const_structrp png_ptr));
2573
+ (png_const_structrp png_ptr));
2440
2574
  PNG_EXPORT(183, png_const_charp, png_get_libpng_ver,
2441
- (png_const_structrp png_ptr));
2575
+ (png_const_structrp png_ptr));
2442
2576
 
2443
2577
  #ifdef PNG_MNG_FEATURES_SUPPORTED
2444
- PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr,
2445
- png_uint_32 mng_features_permitted));
2578
+ PNG_EXPORT(184, png_uint_32, png_permit_mng_features,
2579
+ (png_structrp png_ptr, png_uint_32 mng_features_permitted));
2446
2580
  #endif
2447
2581
 
2448
2582
  /* For use in png_set_keep_unknown, added to version 1.2.6 */
@@ -2456,71 +2590,74 @@ PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr,
2456
2590
  * messages before passing them to the error or warning handler.
2457
2591
  */
2458
2592
  #ifdef PNG_ERROR_NUMBERS_SUPPORTED
2459
- PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr,
2460
- png_uint_32 strip_mode));
2593
+ PNG_EXPORT(185, void, png_set_strip_error_numbers,
2594
+ (png_structrp png_ptr, png_uint_32 strip_mode));
2461
2595
  #endif
2462
2596
 
2463
2597
  /* Added in libpng-1.2.6 */
2464
2598
  #ifdef PNG_SET_USER_LIMITS_SUPPORTED
2465
- PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr,
2599
+ PNG_EXPORT(186, void, png_set_user_limits,
2600
+ (png_structrp png_ptr,
2466
2601
  png_uint_32 user_width_max, png_uint_32 user_height_max));
2467
2602
  PNG_EXPORT(187, png_uint_32, png_get_user_width_max,
2468
- (png_const_structrp png_ptr));
2603
+ (png_const_structrp png_ptr));
2469
2604
  PNG_EXPORT(188, png_uint_32, png_get_user_height_max,
2470
- (png_const_structrp png_ptr));
2605
+ (png_const_structrp png_ptr));
2471
2606
  /* Added in libpng-1.4.0 */
2472
- PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr,
2473
- png_uint_32 user_chunk_cache_max));
2607
+ PNG_EXPORT(189, void, png_set_chunk_cache_max,
2608
+ (png_structrp png_ptr, png_uint_32 user_chunk_cache_max));
2474
2609
  PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max,
2475
- (png_const_structrp png_ptr));
2610
+ (png_const_structrp png_ptr));
2476
2611
  /* Added in libpng-1.4.1 */
2477
- PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr,
2478
- png_alloc_size_t user_chunk_cache_max));
2612
+ PNG_EXPORT(191, void, png_set_chunk_malloc_max,
2613
+ (png_structrp png_ptr, png_alloc_size_t user_chunk_cache_max));
2479
2614
  PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max,
2480
- (png_const_structrp png_ptr));
2615
+ (png_const_structrp png_ptr));
2481
2616
  #endif
2482
2617
 
2483
2618
  #if defined(PNG_INCH_CONVERSIONS_SUPPORTED)
2484
2619
  PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch,
2485
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2620
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2486
2621
 
2487
2622
  PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch,
2488
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2623
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2489
2624
 
2490
2625
  PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch,
2491
- (png_const_structrp png_ptr, png_const_inforp info_ptr));
2626
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2492
2627
 
2493
2628
  PNG_FP_EXPORT(196, float, png_get_x_offset_inches,
2494
- (png_const_structrp png_ptr, png_const_inforp info_ptr))
2629
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2495
2630
  #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
2496
2631
  PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed,
2497
- (png_const_structrp png_ptr, png_const_inforp info_ptr))
2632
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2498
2633
  #endif
2499
2634
 
2500
- PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr,
2501
- png_const_inforp info_ptr))
2635
+ PNG_FP_EXPORT(197, float, png_get_y_offset_inches,
2636
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2502
2637
  #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
2503
2638
  PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
2504
- (png_const_structrp png_ptr, png_const_inforp info_ptr))
2639
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2505
2640
  #endif
2506
2641
 
2507
2642
  # ifdef PNG_pHYs_SUPPORTED
2508
- PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr,
2509
- png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
2510
- int *unit_type));
2643
+ PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi,
2644
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2645
+ png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
2511
2646
  # endif /* pHYs */
2512
2647
  #endif /* INCH_CONVERSIONS */
2513
2648
 
2514
2649
  /* Added in libpng-1.4.0 */
2515
2650
  #ifdef PNG_IO_STATE_SUPPORTED
2516
- PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr));
2651
+ PNG_EXPORT(199, png_uint_32, png_get_io_state,
2652
+ (png_const_structrp png_ptr));
2517
2653
 
2518
2654
  /* Removed from libpng 1.6; use png_get_io_chunk_type. */
2519
- PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr),
2520
- PNG_DEPRECATED)
2655
+ PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name,
2656
+ (png_structrp png_ptr),
2657
+ PNG_DEPRECATED)
2521
2658
 
2522
2659
  PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
2523
- (png_const_structrp png_ptr));
2660
+ (png_const_structrp png_ptr));
2524
2661
 
2525
2662
  /* The flags returned by png_get_io_state() are the following: */
2526
2663
  # define PNG_IO_NONE 0x0000 /* no I/O at this moment */
@@ -2645,21 +2782,26 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
2645
2782
  #endif /* READ_COMPOSITE_NODIV */
2646
2783
 
2647
2784
  #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
2648
- PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
2649
- PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf));
2650
- PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf));
2785
+ PNG_EXPORT(201, png_uint_32, png_get_uint_32,
2786
+ (png_const_bytep buf));
2787
+ PNG_EXPORT(202, png_uint_16, png_get_uint_16,
2788
+ (png_const_bytep buf));
2789
+ PNG_EXPORT(203, png_int_32, png_get_int_32,
2790
+ (png_const_bytep buf));
2651
2791
  #endif
2652
2792
 
2653
- PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr,
2654
- png_const_bytep buf));
2793
+ PNG_EXPORT(204, png_uint_32, png_get_uint_31,
2794
+ (png_const_structrp png_ptr, png_const_bytep buf));
2655
2795
  /* No png_get_int_16 -- may be added if there's a real need for it. */
2656
2796
 
2657
2797
  /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
2658
2798
  #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
2659
- PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i));
2799
+ PNG_EXPORT(205, void, png_save_uint_32,
2800
+ (png_bytep buf, png_uint_32 i));
2660
2801
  #endif
2661
2802
  #ifdef PNG_SAVE_INT_32_SUPPORTED
2662
- PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i));
2803
+ PNG_EXPORT(206, void, png_save_int_32,
2804
+ (png_bytep buf, png_int_32 i));
2663
2805
  #endif
2664
2806
 
2665
2807
  /* Place a 16-bit number into a buffer in PNG byte order.
@@ -2667,7 +2809,8 @@ PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i));
2667
2809
  * just to avoid potential problems on pre-ANSI C compilers.
2668
2810
  */
2669
2811
  #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
2670
- PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2812
+ PNG_EXPORT(207, void, png_save_uint_16,
2813
+ (png_bytep buf, unsigned int i));
2671
2814
  /* No png_save_int_16 -- may be added if there's a real need for it. */
2672
2815
  #endif
2673
2816
 
@@ -2714,10 +2857,10 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2714
2857
 
2715
2858
  #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
2716
2859
  PNG_EXPORT(242, void, png_set_check_for_invalid_index,
2717
- (png_structrp png_ptr, int allowed));
2860
+ (png_structrp png_ptr, int allowed));
2718
2861
  # ifdef PNG_GET_PALETTE_MAX_SUPPORTED
2719
- PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
2720
- png_const_infop info_ptr));
2862
+ PNG_EXPORT(243, int, png_get_palette_max,
2863
+ (png_const_structp png_ptr, png_const_infop info_ptr));
2721
2864
  # endif
2722
2865
  #endif /* CHECK_FOR_INVALID_INDEX */
2723
2866
 
@@ -3081,24 +3224,25 @@ typedef struct
3081
3224
  * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.)
3082
3225
  */
3083
3226
  #ifdef PNG_STDIO_SUPPORTED
3084
- PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
3085
- const char *file_name));
3227
+ PNG_EXPORT(234, int, png_image_begin_read_from_file,
3228
+ (png_imagep image, const char *file_name));
3086
3229
  /* The named file is opened for read and the image header is filled in
3087
3230
  * from the PNG header in the file.
3088
3231
  */
3089
3232
 
3090
- PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
3091
- FILE *file));
3233
+ PNG_EXPORT(235, int, png_image_begin_read_from_stdio,
3234
+ (png_imagep image, FILE *file));
3092
3235
  /* The PNG header is read from the stdio FILE object. */
3093
3236
  #endif /* STDIO */
3094
3237
 
3095
- PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
3096
- png_const_voidp memory, size_t size));
3238
+ PNG_EXPORT(236, int, png_image_begin_read_from_memory,
3239
+ (png_imagep image, png_const_voidp memory, size_t size));
3097
3240
  /* The PNG header is read from the given memory buffer. */
3098
3241
 
3099
- PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
3100
- png_const_colorp background, void *buffer, png_int_32 row_stride,
3101
- void *colormap));
3242
+ PNG_EXPORT(237, int, png_image_finish_read,
3243
+ (png_imagep image,
3244
+ png_const_colorp background, void *buffer, png_int_32 row_stride,
3245
+ void *colormap));
3102
3246
  /* Finish reading the image into the supplied buffer and clean up the
3103
3247
  * png_image structure.
3104
3248
  *
@@ -3131,7 +3275,8 @@ PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
3131
3275
  * written to the colormap; this may be less than the original value.
3132
3276
  */
3133
3277
 
3134
- PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3278
+ PNG_EXPORT(238, void, png_image_free,
3279
+ (png_imagep image));
3135
3280
  /* Free any data allocated by libpng in image->opaque, setting the pointer to
3136
3281
  * NULL. May be called at any time after the structure is initialized.
3137
3282
  */
@@ -3155,14 +3300,16 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3155
3300
  * colormap_entries: set to the number of entries in the color-map (0 to 256)
3156
3301
  */
3157
3302
  #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
3158
- PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
3159
- const char *file, int convert_to_8bit, const void *buffer,
3160
- png_int_32 row_stride, const void *colormap));
3303
+ PNG_EXPORT(239, int, png_image_write_to_file,
3304
+ (png_imagep image,
3305
+ const char *file, int convert_to_8bit, const void *buffer,
3306
+ png_int_32 row_stride, const void *colormap));
3161
3307
  /* Write the image to the named file. */
3162
3308
 
3163
- PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3164
- int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
3165
- const void *colormap));
3309
+ PNG_EXPORT(240, int, png_image_write_to_stdio,
3310
+ (png_imagep image,
3311
+ FILE *file, int convert_to_8_bit, const void *buffer,
3312
+ png_int_32 row_stride, const void *colormap));
3166
3313
  /* Write the image to the given FILE object. */
3167
3314
  #endif /* SIMPLIFIED_WRITE_STDIO */
3168
3315
 
@@ -3187,9 +3334,11 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3187
3334
  * notices) you need to use one of the other APIs.
3188
3335
  */
3189
3336
 
3190
- PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
3191
- png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit,
3192
- const void *buffer, png_int_32 row_stride, const void *colormap));
3337
+ PNG_EXPORT(245, int, png_image_write_to_memory,
3338
+ (png_imagep image,
3339
+ void *memory, png_alloc_size_t * PNG_RESTRICT memory_bytes,
3340
+ int convert_to_8_bit,
3341
+ const void *buffer, png_int_32 row_stride, const void *colormap));
3193
3342
  /* Write the image to the given memory buffer. The function both writes the
3194
3343
  * whole PNG data stream to *memory and updates *memory_bytes with the count
3195
3344
  * of bytes written.
@@ -3365,7 +3514,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
3365
3514
  * one to use is one more than this.)
3366
3515
  */
3367
3516
  #ifdef PNG_EXPORT_LAST_ORDINAL
3368
- PNG_EXPORT_LAST_ORDINAL(259);
3517
+ PNG_EXPORT_LAST_ORDINAL(259);
3369
3518
  #endif
3370
3519
 
3371
3520
  #ifdef __cplusplus