image_compressor_pack 0.1.3-universal-darwin-15 → 1.0.0.1-universal-darwin-15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/lib/.paths.yml +11 -11
  3. data/lib/image_compressor_pack/dynamically_linked_recipes.yml +24 -21
  4. data/lib/image_compressor_pack/statically_linked_recipes.yml +25 -22
  5. data/lib/image_compressor_pack/version.rb +1 -1
  6. data/ports/{advancecomp-1.2-x86_64-apple-darwin15.0.0.installed → advancecomp-1.22-x86_64-apple-darwin15.6.0.installed} +0 -0
  7. data/ports/{gifsicle-1.88-x86_64-apple-darwin15.0.0.installed → gifsicle-1.88-x86_64-apple-darwin15.6.0.installed} +0 -0
  8. data/ports/{jhead-3.0-x86_64-apple-darwin15.0.0.installed → jhead-3.0-x86_64-apple-darwin15.6.0.installed} +0 -0
  9. data/ports/{jpeg-archive-2.1.1-x86_64-apple-darwin15.0.0.installed → jpeg-archive-2.1.1-x86_64-apple-darwin15.6.0.installed} +0 -0
  10. data/ports/{jpegoptim-1.4.3-x86_64-apple-darwin15.0.0.installed → jpegoptim-1.4.4-x86_64-apple-darwin15.6.0.installed} +0 -0
  11. data/ports/{lcms2-2.7-x86_64-apple-darwin15.0.0.installed → lcms2-2.8-x86_64-apple-darwin15.6.0.installed} +0 -0
  12. data/ports/{libpng-1.6.21-x86_64-apple-darwin15.0.0.installed → libpng-1.6.26-x86_64-apple-darwin15.6.0.installed} +0 -0
  13. data/ports/{mozjpeg-3.1-x86_64-apple-darwin15.0.0.installed → mozjpeg-3.1-x86_64-apple-darwin15.6.0.installed} +0 -0
  14. data/ports/{nasm-2.12.01-x86_64-apple-darwin15.0.0.installed → nasm-2.12.02-x86_64-apple-darwin15.6.0.installed} +0 -0
  15. data/ports/{optipng-0.7.6-x86_64-apple-darwin15.0.0.installed → optipng-0.7.6-x86_64-apple-darwin15.6.0.installed} +0 -0
  16. data/ports/{pngcrush-1.8.1-x86_64-apple-darwin15.0.0.installed → pngcrush-1.8.10-x86_64-apple-darwin15.6.0.installed} +0 -0
  17. data/ports/{pngquant-2.7.1-x86_64-apple-darwin15.0.0.installed → pngquant-2.8.0-x86_64-apple-darwin15.6.0.installed} +0 -0
  18. data/ports/x86_64-apple-darwin15.6.0/advancecomp/1.22/bin/advdef +0 -0
  19. data/ports/x86_64-apple-darwin15.6.0/advancecomp/1.22/bin/advmng +0 -0
  20. data/ports/x86_64-apple-darwin15.6.0/advancecomp/1.22/bin/advpng +0 -0
  21. data/ports/x86_64-apple-darwin15.6.0/advancecomp/1.22/bin/advzip +0 -0
  22. data/ports/{x86_64-apple-darwin15.0.0/advancecomp/1.2 → x86_64-apple-darwin15.6.0/advancecomp/1.22}/share/man/man1/advdef.1 +1 -1
  23. data/ports/{x86_64-apple-darwin15.0.0/advancecomp/1.2 → x86_64-apple-darwin15.6.0/advancecomp/1.22}/share/man/man1/advmng.1 +1 -1
  24. data/ports/{x86_64-apple-darwin15.0.0/advancecomp/1.2 → x86_64-apple-darwin15.6.0/advancecomp/1.22}/share/man/man1/advpng.1 +1 -1
  25. data/ports/{x86_64-apple-darwin15.0.0/advancecomp/1.2 → x86_64-apple-darwin15.6.0/advancecomp/1.22}/share/man/man1/advzip.1 +6 -6
  26. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/gifsicle/1.88/bin/gifsicle +0 -0
  27. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/gifsicle/1.88/share/man/man1/gifsicle.1 +0 -0
  28. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/jhead/3.0/bin/jhead +0 -0
  29. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/jpeg-archive/2.1.1/bin/jpeg-archive +0 -0
  30. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/jpeg-archive/2.1.1/bin/jpeg-compare +0 -0
  31. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/jpeg-archive/2.1.1/bin/jpeg-hash +0 -0
  32. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/jpeg-archive/2.1.1/bin/jpeg-recompress +0 -0
  33. data/ports/{x86_64-apple-darwin15.0.0/jpegoptim/1.4.3 → x86_64-apple-darwin15.6.0/jpegoptim/1.4.4}/bin/jpegoptim +0 -0
  34. data/ports/{x86_64-apple-darwin15.0.0/jpegoptim/1.4.3 → x86_64-apple-darwin15.6.0/jpegoptim/1.4.4}/share/man/man1/jpegoptim.1 +2 -2
  35. data/ports/x86_64-apple-darwin15.6.0/lcms2/2.8/bin/linkicc +0 -0
  36. data/ports/x86_64-apple-darwin15.6.0/lcms2/2.8/bin/psicc +0 -0
  37. data/ports/x86_64-apple-darwin15.6.0/lcms2/2.8/bin/transicc +0 -0
  38. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/include/lcms2.h +58 -44
  39. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/include/lcms2_plugin.h +35 -7
  40. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/lib/liblcms2.a +0 -0
  41. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/lib/liblcms2.la +2 -2
  42. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/lib/pkgconfig/lcms2.pc +2 -2
  43. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/share/man/man1/jpgicc.1 +0 -0
  44. data/ports/{x86_64-apple-darwin15.0.0/lcms2/2.7 → x86_64-apple-darwin15.6.0/lcms2/2.8}/share/man/man1/tificc.1 +0 -0
  45. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/libpng16/png.h +259 -123
  46. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/libpng16/pngconf.h +25 -25
  47. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/libpng16/pnglibconf.h +2 -1
  48. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/png.h +259 -123
  49. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/pngconf.h +25 -25
  50. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/include/pnglibconf.h +2 -1
  51. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/lib/libpng.a +0 -0
  52. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/lib/libpng.la +3 -3
  53. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/lib/libpng16.a +0 -0
  54. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/lib/libpng16.la +3 -3
  55. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/lib/pkgconfig/libpng16.pc +2 -2
  56. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/share/man/man3/libpng.3 +82 -27
  57. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/share/man/man3/libpngpf.3 +2 -2
  58. data/ports/{x86_64-apple-darwin15.0.0/libpng/1.6.21 → x86_64-apple-darwin15.6.0/libpng/1.6.26}/share/man/man5/png.5 +2 -2
  59. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/cjpeg +0 -0
  60. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/djpeg +0 -0
  61. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/jpegtran +0 -0
  62. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/rdjpgcom +0 -0
  63. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/tjbench +0 -0
  64. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/bin/wrjpgcom +0 -0
  65. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/include/jconfig.h +0 -0
  66. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/include/jerror.h +0 -0
  67. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/include/jmorecfg.h +0 -0
  68. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/include/jpeglib.h +0 -0
  69. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/include/turbojpeg.h +0 -0
  70. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/lib/libjpeg.a +0 -0
  71. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/lib/libjpeg.la +1 -1
  72. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/lib/libturbojpeg.a +0 -0
  73. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/lib/libturbojpeg.la +1 -1
  74. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/README +0 -0
  75. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/README-mozilla.txt +0 -0
  76. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/README-turbo.txt +0 -0
  77. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/example.c +0 -0
  78. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/libjpeg.txt +0 -0
  79. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/structure.txt +0 -0
  80. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/usage.txt +0 -0
  81. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/doc/wizard.txt +0 -0
  82. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/man/man1/cjpeg.1 +0 -0
  83. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/man/man1/djpeg.1 +0 -0
  84. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/man/man1/jpegtran.1 +0 -0
  85. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/man/man1/rdjpgcom.1 +0 -0
  86. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/mozjpeg/3.1/share/man/man1/wrjpgcom.1 +0 -0
  87. data/ports/x86_64-apple-darwin15.6.0/nasm/2.12.02/bin/nasm +0 -0
  88. data/ports/{x86_64-apple-darwin15.0.0/nasm/2.12.01 → x86_64-apple-darwin15.6.0/nasm/2.12.02}/bin/ndisasm +0 -0
  89. data/ports/{x86_64-apple-darwin15.0.0/nasm/2.12.01 → x86_64-apple-darwin15.6.0/nasm/2.12.02}/share/man/man1/nasm.1 +2 -2
  90. data/ports/{x86_64-apple-darwin15.0.0/nasm/2.12.01 → x86_64-apple-darwin15.6.0/nasm/2.12.02}/share/man/man1/ndisasm.1 +2 -2
  91. data/ports/x86_64-apple-darwin15.6.0/optipng/0.7.6/bin/optipng +0 -0
  92. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/optipng/0.7.6/man/man1/optipng.1 +0 -0
  93. data/ports/x86_64-apple-darwin15.6.0/pngcrush/1.8.10/bin/pngcrush +0 -0
  94. data/ports/x86_64-apple-darwin15.6.0/pngquant/2.8.0/bin/pngquant +0 -0
  95. data/ports/{x86_64-apple-darwin15.0.0/pngquant/2.7.1 → x86_64-apple-darwin15.6.0/pngquant/2.8.0}/share/man/man1/pngquant.1 +0 -0
  96. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/zlib/1.2.8/include/zconf.h +0 -0
  97. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/zlib/1.2.8/include/zlib.h +0 -0
  98. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/zlib/1.2.8/lib/libz.a +0 -0
  99. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/zlib/1.2.8/lib/pkgconfig/zlib.pc +1 -1
  100. data/ports/{x86_64-apple-darwin15.0.0 → x86_64-apple-darwin15.6.0}/zlib/1.2.8/share/man/man3/zlib.3 +0 -0
  101. data/ports/{zlib-1.2.8-x86_64-apple-darwin15.0.0.installed → zlib-1.2.8-x86_64-apple-darwin15.6.0.installed} +0 -0
  102. metadata +99 -107
  103. data/ports/archives/2.1.1.tar.gz +0 -0
  104. data/ports/archives/gifsicle-1.88.tar.gz +0 -0
  105. data/ports/archives/jhead-3.00.tar.gz +0 -0
  106. data/ports/archives/mozjpeg-3.1-release-source.tar.gz +0 -0
  107. data/ports/archives/optipng-0.7.6.tar.gz +0 -0
  108. data/ports/archives/zlib-1.2.8.tar.gz +0 -0
  109. data/ports/x86_64-apple-darwin15.0.0/advancecomp/1.2/bin/advdef +0 -0
  110. data/ports/x86_64-apple-darwin15.0.0/advancecomp/1.2/bin/advmng +0 -0
  111. data/ports/x86_64-apple-darwin15.0.0/advancecomp/1.2/bin/advpng +0 -0
  112. data/ports/x86_64-apple-darwin15.0.0/advancecomp/1.2/bin/advzip +0 -0
  113. data/ports/x86_64-apple-darwin15.0.0/lcms2/2.7/bin/jpgicc +0 -0
  114. data/ports/x86_64-apple-darwin15.0.0/lcms2/2.7/bin/linkicc +0 -0
  115. data/ports/x86_64-apple-darwin15.0.0/lcms2/2.7/bin/psicc +0 -0
  116. data/ports/x86_64-apple-darwin15.0.0/lcms2/2.7/bin/tificc +0 -0
  117. data/ports/x86_64-apple-darwin15.0.0/lcms2/2.7/bin/transicc +0 -0
  118. data/ports/x86_64-apple-darwin15.0.0/nasm/2.12.01/bin/nasm +0 -0
  119. data/ports/x86_64-apple-darwin15.0.0/optipng/0.7.6/bin/optipng +0 -0
  120. data/ports/x86_64-apple-darwin15.0.0/pngcrush/1.8.1/bin/pngcrush +0 -0
  121. data/ports/x86_64-apple-darwin15.0.0/pngquant/2.7.1/bin/pngquant +0 -0
@@ -1,7 +1,7 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.6.21, January 15, 2016
4
+ * libpng version 1.6.26, October 20, 2016
5
5
  *
6
6
  * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
12
12
  * Authors and maintainers:
13
13
  * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
14
14
  * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
15
- * libpng versions 0.97, January 1998, through 1.6.21, January 15, 2016:
15
+ * libpng versions 0.97, January 1998, through 1.6.26, October 20, 2016:
16
16
  * Glenn Randers-Pehrson.
17
17
  * See also "Contributing Authors", below.
18
18
  */
@@ -25,7 +25,11 @@
25
25
  *
26
26
  * This code is released under the libpng license.
27
27
  *
28
- * libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are
28
+ * Some files in the "contrib" directory and some configure-generated
29
+ * files that are distributed with libpng have other copyright owners and
30
+ * are released under other open source licenses.
31
+ *
32
+ * libpng versions 1.0.7, July 1, 2000 through 1.6.26, October 20, 2016 are
29
33
  * Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
30
34
  * derived from libpng-1.0.6, and are distributed according to the same
31
35
  * disclaimer and license as libpng-1.0.6 with the following individuals
@@ -37,6 +41,7 @@
37
41
  * Cosmin Truta
38
42
  * Gilles Vollant
39
43
  * James Yu
44
+ * Mandar Sahastrabuddhe
40
45
  *
41
46
  * and with the following additions to the disclaimer:
42
47
  *
@@ -47,6 +52,10 @@
47
52
  * risk of satisfactory quality, performance, accuracy, and effort is with
48
53
  * the user.
49
54
  *
55
+ * Some files in the "contrib" directory have other copyright owners and
56
+ * are released under other open source licenses.
57
+ *
58
+ *
50
59
  * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
51
60
  * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
52
61
  * libpng-0.96, and are distributed according to the same disclaimer and
@@ -57,6 +66,9 @@
57
66
  * Glenn Randers-Pehrson
58
67
  * Willem van Schaik
59
68
  *
69
+ * Some files in the "scripts" directory have different copyright owners
70
+ * but are also released under this license.
71
+ *
60
72
  * libpng versions 0.89, June 1996, through 0.96, May 1997, are
61
73
  * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
62
74
  * and are distributed according to the same disclaimer and license as
@@ -70,6 +82,9 @@
70
82
  * Greg Roelofs
71
83
  * Tom Tanner
72
84
  *
85
+ * Some files in the "scripts" directory have other copyright owners
86
+ * but are released under this license.
87
+ *
73
88
  * libpng versions 0.5, May 1995, through 0.88, January 1996, are
74
89
  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
75
90
  *
@@ -109,6 +124,29 @@
109
124
  * appreciated.
110
125
  *
111
126
  * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
127
+ *
128
+ * TRADEMARK:
129
+ *
130
+ * The name "libpng" has not been registered by the Copyright owner
131
+ * as a trademark in any jurisdiction. However, because libpng has
132
+ * been distributed and maintained world-wide, continually since 1995,
133
+ * the Copyright owner claims "common-law trademark protection" in any
134
+ * jurisdiction where common-law trademark is recognized.
135
+ *
136
+ * OSI CERTIFICATION:
137
+ *
138
+ * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
139
+ * a certification mark of the Open Source Initiative. OSI has not addressed
140
+ * the additional disclaimers inserted at version 1.0.7.
141
+ *
142
+ * EXPORT CONTROL:
143
+ *
144
+ * The Copyright owner believes that the Export Control Classification
145
+ * Number (ECCN) for libpng is EAR99, which means not subject to export
146
+ * controls or International Traffic in Arms Regulations (ITAR) because
147
+ * it is open source, publicly available software, that does not contain
148
+ * any encryption software. See the EAR, paragraphs 734.3(b)(3) and
149
+ * 734.7(b).
112
150
  */
113
151
 
114
152
  /*
@@ -121,12 +159,6 @@
121
159
  * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
122
160
  */
123
161
 
124
- /*
125
- * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
126
- * a certification mark of the Open Source Initiative. OSI has not addressed
127
- * the additional disclaimers inserted at version 1.0.7.
128
- */
129
-
130
162
  /*
131
163
  * The contributing authors would like to thank all those who helped
132
164
  * with testing, bug fixes, and patience. This wouldn't have been
@@ -182,11 +214,11 @@
182
214
  * ...
183
215
  * 1.0.19 10 10019 10.so.0.19[.0]
184
216
  * ...
185
- * 1.2.53 13 10253 12.so.0.53[.0]
217
+ * 1.2.56 13 10256 12.so.0.56[.0]
186
218
  * ...
187
- * 1.5.23 15 10523 15.so.15.23[.0]
219
+ * 1.5.27 15 10527 15.so.15.27[.0]
188
220
  * ...
189
- * 1.6.21 16 10621 16.so.16.21[.0]
221
+ * 1.6.26 16 10626 16.so.16.26[.0]
190
222
  *
191
223
  * Henceforth the source version will match the shared-library major
192
224
  * and minor numbers; the shared-library major version number will be
@@ -214,13 +246,13 @@
214
246
  * Y2K compliance in libpng:
215
247
  * =========================
216
248
  *
217
- * January 15, 2016
249
+ * October 20, 2016
218
250
  *
219
251
  * Since the PNG Development group is an ad-hoc body, we can't make
220
252
  * an official declaration.
221
253
  *
222
254
  * This is your unofficial assurance that libpng from version 0.71 and
223
- * upward through 1.6.21 are Y2K compliant. It is my belief that
255
+ * upward through 1.6.26 are Y2K compliant. It is my belief that
224
256
  * earlier versions were also Y2K compliant.
225
257
  *
226
258
  * Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -282,9 +314,8 @@
282
314
  */
283
315
 
284
316
  /* Version information for png.h - this should match the version in png.c */
285
- #define PNG_LIBPNG_VER_STRING "1.6.21"
286
- #define PNG_HEADER_VERSION_STRING \
287
- " libpng version 1.6.21 - January 15, 2016\n"
317
+ #define PNG_LIBPNG_VER_STRING "1.6.26"
318
+ #define PNG_HEADER_VERSION_STRING " libpng version 1.6.26 - October 20, 2016\n"
288
319
 
289
320
  #define PNG_LIBPNG_VER_SONUM 16
290
321
  #define PNG_LIBPNG_VER_DLLNUM 16
@@ -292,7 +323,7 @@
292
323
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
293
324
  #define PNG_LIBPNG_VER_MAJOR 1
294
325
  #define PNG_LIBPNG_VER_MINOR 6
295
- #define PNG_LIBPNG_VER_RELEASE 21
326
+ #define PNG_LIBPNG_VER_RELEASE 26
296
327
 
297
328
  /* This should match the numeric part of the final component of
298
329
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -323,20 +354,20 @@
323
354
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
324
355
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
325
356
  */
326
- #define PNG_LIBPNG_VER 10621 /* 1.6.21 */
357
+ #define PNG_LIBPNG_VER 10626 /* 1.6.26 */
327
358
 
328
359
  /* Library configuration: these options cannot be changed after
329
360
  * the library has been built.
330
361
  */
331
362
  #ifndef PNGLCONF_H
332
- /* If pnglibconf.h is missing, you can
333
- * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h
334
- */
363
+ /* If pnglibconf.h is missing, you can
364
+ * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h
365
+ */
335
366
  # include "pnglibconf.h"
336
367
  #endif
337
368
 
338
369
  #ifndef PNG_VERSION_INFO_ONLY
339
- /* Machine specific configuration. */
370
+ /* Machine specific configuration. */
340
371
  # include "pngconf.h"
341
372
  #endif
342
373
 
@@ -433,7 +464,7 @@ extern "C" {
433
464
  /* This triggers a compiler error in png.c, if png.c and png.h
434
465
  * do not agree upon the version number.
435
466
  */
436
- typedef char* png_libpng_version_1_6_21;
467
+ typedef char* png_libpng_version_1_6_26;
437
468
 
438
469
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
439
470
  *
@@ -626,17 +657,17 @@ typedef png_time * * png_timepp;
626
657
  */
627
658
  typedef struct png_unknown_chunk_t
628
659
  {
629
- png_byte name[5]; /* Textual chunk name with '\0' terminator */
630
- png_byte *data; /* Data, should not be modified on read! */
631
- png_size_t size;
632
-
633
- /* On write 'location' must be set using the flag values listed below.
634
- * Notice that on read it is set by libpng however the values stored have
635
- * more bits set than are listed below. Always treat the value as a
636
- * bitmask. On write set only one bit - setting multiple bits may cause the
637
- * chunk to be written in multiple places.
638
- */
639
- png_byte location; /* mode of operation at read time */
660
+ png_byte name[5]; /* Textual chunk name with '\0' terminator */
661
+ png_byte *data; /* Data, should not be modified on read! */
662
+ png_size_t size;
663
+
664
+ /* On write 'location' must be set using the flag values listed below.
665
+ * Notice that on read it is set by libpng however the values stored have
666
+ * more bits set than are listed below. Always treat the value as a
667
+ * bitmask. On write set only one bit - setting multiple bits may cause the
668
+ * chunk to be written in multiple places.
669
+ */
670
+ png_byte location; /* mode of operation at read time */
640
671
  }
641
672
  png_unknown_chunk;
642
673
 
@@ -734,24 +765,22 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
734
765
  * data in the info_struct to be written into the output file. The values
735
766
  * of the PNG_INFO_<chunk> defines should NOT be changed.
736
767
  */
737
- #define PNG_INFO_gAMA 0x0001
738
- #define PNG_INFO_sBIT 0x0002
739
- #define PNG_INFO_cHRM 0x0004
740
- #define PNG_INFO_PLTE 0x0008
741
- #define PNG_INFO_tRNS 0x0010
742
- #define PNG_INFO_bKGD 0x0020
743
- #define PNG_INFO_hIST 0x0040
744
- #define PNG_INFO_pHYs 0x0080
745
- #define PNG_INFO_oFFs 0x0100
746
- #define PNG_INFO_tIME 0x0200
747
- #define PNG_INFO_pCAL 0x0400
748
- #define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */
749
- #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
750
- #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
751
- #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
752
- #if INT_MAX >= 0x8000 /* else this might break */
753
- #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
754
- #endif
768
+ #define PNG_INFO_gAMA 0x0001U
769
+ #define PNG_INFO_sBIT 0x0002U
770
+ #define PNG_INFO_cHRM 0x0004U
771
+ #define PNG_INFO_PLTE 0x0008U
772
+ #define PNG_INFO_tRNS 0x0010U
773
+ #define PNG_INFO_bKGD 0x0020U
774
+ #define PNG_INFO_hIST 0x0040U
775
+ #define PNG_INFO_pHYs 0x0080U
776
+ #define PNG_INFO_oFFs 0x0100U
777
+ #define PNG_INFO_tIME 0x0200U
778
+ #define PNG_INFO_pCAL 0x0400U
779
+ #define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */
780
+ #define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */
781
+ #define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */
782
+ #define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */
783
+ #define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */
755
784
 
756
785
  /* This is used for the transformation routines, as some of them
757
786
  * change these values for the row. It also should enable using
@@ -1322,7 +1351,7 @@ PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr));
1322
1351
  #endif
1323
1352
 
1324
1353
  #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1325
- #define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */
1354
+ #define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */
1326
1355
  /* Strip the second byte of information from a 16-bit depth file. */
1327
1356
  PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr));
1328
1357
  #endif
@@ -1473,8 +1502,8 @@ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1473
1502
  #define PNG_FILTER_UP 0x20
1474
1503
  #define PNG_FILTER_AVG 0x40
1475
1504
  #define PNG_FILTER_PAETH 0x80
1476
- #define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
1477
- PNG_FILTER_AVG | PNG_FILTER_PAETH)
1505
+ #define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP)
1506
+ #define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH)
1478
1507
 
1479
1508
  /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
1480
1509
  * These defines should NOT be changed.
@@ -1751,21 +1780,21 @@ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1751
1780
  #define PNG_SET_WILL_FREE_DATA 1
1752
1781
  #define PNG_USER_WILL_FREE_DATA 2
1753
1782
  /* Flags for png_ptr->free_me and info_ptr->free_me */
1754
- #define PNG_FREE_HIST 0x0008
1755
- #define PNG_FREE_ICCP 0x0010
1756
- #define PNG_FREE_SPLT 0x0020
1757
- #define PNG_FREE_ROWS 0x0040
1758
- #define PNG_FREE_PCAL 0x0080
1759
- #define PNG_FREE_SCAL 0x0100
1783
+ #define PNG_FREE_HIST 0x0008U
1784
+ #define PNG_FREE_ICCP 0x0010U
1785
+ #define PNG_FREE_SPLT 0x0020U
1786
+ #define PNG_FREE_ROWS 0x0040U
1787
+ #define PNG_FREE_PCAL 0x0080U
1788
+ #define PNG_FREE_SCAL 0x0100U
1760
1789
  #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1761
- # define PNG_FREE_UNKN 0x0200
1790
+ # define PNG_FREE_UNKN 0x0200U
1762
1791
  #endif
1763
- /* PNG_FREE_LIST 0x0400 removed in 1.6.0 because it is ignored */
1764
- #define PNG_FREE_PLTE 0x1000
1765
- #define PNG_FREE_TRNS 0x2000
1766
- #define PNG_FREE_TEXT 0x4000
1767
- #define PNG_FREE_ALL 0x7fff
1768
- #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
1792
+ /* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */
1793
+ #define PNG_FREE_PLTE 0x1000U
1794
+ #define PNG_FREE_TRNS 0x2000U
1795
+ #define PNG_FREE_TEXT 0x4000U
1796
+ #define PNG_FREE_ALL 0x7fffU
1797
+ #define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
1769
1798
 
1770
1799
  #ifdef PNG_USER_MEM_SUPPORTED
1771
1800
  PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr,
@@ -2271,8 +2300,10 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
2271
2300
  * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to
2272
2301
  * be processed by libpng.
2273
2302
  */
2303
+ #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
2274
2304
  PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr,
2275
2305
  int keep, png_const_bytep chunk_list, int num_chunks));
2306
+ #endif /* HANDLE_AS_UNKNOWN */
2276
2307
 
2277
2308
  /* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned;
2278
2309
  * the result is therefore true (non-zero) if special handling is required,
@@ -2280,7 +2311,7 @@ PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr,
2280
2311
  */
2281
2312
  PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr,
2282
2313
  png_const_bytep chunk_name));
2283
- #endif
2314
+ #endif /* SET_UNKNOWN_CHUNKS */
2284
2315
 
2285
2316
  #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
2286
2317
  PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr,
@@ -2501,33 +2532,37 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
2501
2532
 
2502
2533
  /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
2503
2534
 
2504
- # define png_composite(composite, fg, alpha, bg) \
2505
- { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \
2506
- * (png_uint_16)(alpha) \
2507
- + (png_uint_16)(bg)*(png_uint_16)(255 \
2508
- - (png_uint_16)(alpha)) + 128); \
2509
- (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); }
2510
-
2511
- # define png_composite_16(composite, fg, alpha, bg) \
2512
- { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \
2513
- * (png_uint_32)(alpha) \
2514
- + (png_uint_32)(bg)*(65535 \
2515
- - (png_uint_32)(alpha)) + 32768); \
2516
- (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); }
2535
+ # define png_composite(composite, fg, alpha, bg) \
2536
+ { \
2537
+ png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \
2538
+ * (png_uint_16)(alpha) \
2539
+ + (png_uint_16)(bg)*(png_uint_16)(255 \
2540
+ - (png_uint_16)(alpha)) + 128); \
2541
+ (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \
2542
+ }
2543
+
2544
+ # define png_composite_16(composite, fg, alpha, bg) \
2545
+ { \
2546
+ png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \
2547
+ * (png_uint_32)(alpha) \
2548
+ + (png_uint_32)(bg)*(65535 \
2549
+ - (png_uint_32)(alpha)) + 32768); \
2550
+ (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \
2551
+ }
2517
2552
 
2518
2553
  #else /* Standard method using integer division */
2519
2554
 
2520
- # define png_composite(composite, fg, alpha, bg) \
2521
- (composite) = \
2522
- (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \
2523
- (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
2524
- 127) / 255))
2525
-
2526
- # define png_composite_16(composite, fg, alpha, bg) \
2527
- (composite) = \
2528
- (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \
2529
- (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \
2530
- 32767) / 65535))
2555
+ # define png_composite(composite, fg, alpha, bg) \
2556
+ (composite) = \
2557
+ (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \
2558
+ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
2559
+ 127) / 255))
2560
+
2561
+ # define png_composite_16(composite, fg, alpha, bg) \
2562
+ (composite) = \
2563
+ (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \
2564
+ (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \
2565
+ 32767) / 65535))
2531
2566
  #endif /* READ_COMPOSITE_NODIV */
2532
2567
 
2533
2568
  #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
@@ -2563,38 +2598,38 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2563
2598
  * format for negative values, which is almost certainly true.
2564
2599
  */
2565
2600
  # define PNG_get_uint_32(buf) \
2566
- (((png_uint_32)(*(buf)) << 24) + \
2567
- ((png_uint_32)(*((buf) + 1)) << 16) + \
2568
- ((png_uint_32)(*((buf) + 2)) << 8) + \
2569
- ((png_uint_32)(*((buf) + 3))))
2601
+ (((png_uint_32)(*(buf)) << 24) + \
2602
+ ((png_uint_32)(*((buf) + 1)) << 16) + \
2603
+ ((png_uint_32)(*((buf) + 2)) << 8) + \
2604
+ ((png_uint_32)(*((buf) + 3))))
2570
2605
 
2571
2606
  /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
2572
2607
  * function) incorrectly returned a value of type png_uint_32.
2573
2608
  */
2574
2609
  # define PNG_get_uint_16(buf) \
2575
- ((png_uint_16) \
2576
- (((unsigned int)(*(buf)) << 8) + \
2577
- ((unsigned int)(*((buf) + 1)))))
2610
+ ((png_uint_16) \
2611
+ (((unsigned int)(*(buf)) << 8) + \
2612
+ ((unsigned int)(*((buf) + 1)))))
2578
2613
 
2579
2614
  # define PNG_get_int_32(buf) \
2580
- ((png_int_32)((*(buf) & 0x80) \
2581
- ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \
2582
- : (png_int_32)png_get_uint_32(buf)))
2615
+ ((png_int_32)((*(buf) & 0x80) \
2616
+ ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \
2617
+ : (png_int_32)png_get_uint_32(buf)))
2583
2618
 
2584
- /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h,
2585
- * but defining a macro name prefixed with PNG_PREFIX.
2586
- */
2619
+ /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h,
2620
+ * but defining a macro name prefixed with PNG_PREFIX.
2621
+ */
2587
2622
  # ifndef PNG_PREFIX
2588
- # define png_get_uint_32(buf) PNG_get_uint_32(buf)
2589
- # define png_get_uint_16(buf) PNG_get_uint_16(buf)
2590
- # define png_get_int_32(buf) PNG_get_int_32(buf)
2623
+ # define png_get_uint_32(buf) PNG_get_uint_32(buf)
2624
+ # define png_get_uint_16(buf) PNG_get_uint_16(buf)
2625
+ # define png_get_int_32(buf) PNG_get_int_32(buf)
2591
2626
  # endif
2592
2627
  #else
2593
2628
  # ifdef PNG_PREFIX
2594
- /* No macros; revert to the (redefined) function */
2595
- # define PNG_get_uint_32 (png_get_uint_32)
2596
- # define PNG_get_uint_16 (png_get_uint_16)
2597
- # define PNG_get_int_32 (png_get_int_32)
2629
+ /* No macros; revert to the (redefined) function */
2630
+ # define PNG_get_uint_32 (png_get_uint_32)
2631
+ # define PNG_get_uint_16 (png_get_uint_16)
2632
+ # define PNG_get_int_32 (png_get_int_32)
2598
2633
  # endif
2599
2634
  #endif
2600
2635
 
@@ -2889,12 +2924,19 @@ typedef struct
2889
2924
  * is the minimum 'row stride', the minimum count of components between each
2890
2925
  * row. For a color-mapped image this is the minimum number of bytes in a
2891
2926
  * row.
2927
+ *
2928
+ * WARNING: this macro overflows for some images with more than one component
2929
+ * and very large image widths. libpng will refuse to process an image where
2930
+ * this macro would overflow.
2892
2931
  */
2893
2932
 
2894
2933
  #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
2895
2934
  (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride))
2896
2935
  /* Return the size, in bytes, of an image buffer given a png_image and a row
2897
2936
  * stride - the number of components to leave space for in each row.
2937
+ *
2938
+ * WARNING: this macro overflows a 32-bit integer for some large PNG images,
2939
+ * libpng will refuse to process an image where such an overflow would occur.
2898
2940
  */
2899
2941
 
2900
2942
  #define PNG_IMAGE_SIZE(image)\
@@ -3015,7 +3057,6 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3015
3057
  #endif /* SIMPLIFIED_READ */
3016
3058
 
3017
3059
  #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
3018
- #ifdef PNG_STDIO_SUPPORTED
3019
3060
  /* WRITE APIS
3020
3061
  * ----------
3021
3062
  * For write you must initialize a png_image structure to describe the image to
@@ -3032,6 +3073,7 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3032
3073
  * values do not correspond to the colors in sRGB.
3033
3074
  * colormap_entries: set to the number of entries in the color-map (0 to 256)
3034
3075
  */
3076
+ #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
3035
3077
  PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
3036
3078
  const char *file, int convert_to_8bit, const void *buffer,
3037
3079
  png_int_32 row_stride, const void *colormap));
@@ -3041,8 +3083,9 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3041
3083
  int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
3042
3084
  const void *colormap));
3043
3085
  /* Write the image to the given (FILE*). */
3086
+ #endif /* SIMPLIFIED_WRITE_STDIO */
3044
3087
 
3045
- /* With both write APIs if image is in one of the linear formats with 16-bit
3088
+ /* With all write APIs if image is in one of the linear formats with 16-bit
3046
3089
  * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG
3047
3090
  * gamma encoded according to the sRGB specification, otherwise a 16-bit linear
3048
3091
  * encoded PNG file is written.
@@ -3054,13 +3097,103 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3054
3097
  *
3055
3098
  * With all APIs row_stride is handled as in the read APIs - it is the spacing
3056
3099
  * from one row to the next in component sized units (1 or 2 bytes) and if
3057
- * negative indicates a bottom-up row layout in the buffer. If row_stride is zero,
3058
- * libpng will calculate it for you from the image width and number of channels.
3100
+ * negative indicates a bottom-up row layout in the buffer. If row_stride is
3101
+ * zero, libpng will calculate it for you from the image width and number of
3102
+ * channels.
3059
3103
  *
3060
- * Note that the write API does not support interlacing, sub-8-bit pixels, indexed
3061
- * PNG (color_type 3) or most ancillary chunks.
3104
+ * Note that the write API does not support interlacing, sub-8-bit pixels or
3105
+ * most ancillary chunks. If you need to write text chunks (e.g. for copyright
3106
+ * notices) you need to use one of the other APIs.
3062
3107
  */
3063
- #endif /* STDIO */
3108
+
3109
+ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
3110
+ png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit,
3111
+ const void *buffer, png_int_32 row_stride, const void *colormap));
3112
+ /* Write the image to the given memory buffer. The function both writes the
3113
+ * whole PNG data stream to *memory and updates *memory_bytes with the count
3114
+ * of bytes written.
3115
+ *
3116
+ * 'memory' may be NULL. In this case *memory_bytes is not read however on
3117
+ * success the number of bytes which would have been written will still be
3118
+ * stored in *memory_bytes. On failure *memory_bytes will contain 0.
3119
+ *
3120
+ * If 'memory' is not NULL it must point to memory[*memory_bytes] of
3121
+ * writeable memory.
3122
+ *
3123
+ * If the function returns success memory[*memory_bytes] (if 'memory' is not
3124
+ * NULL) contains the written PNG data. *memory_bytes will always be less
3125
+ * than or equal to the original value.
3126
+ *
3127
+ * If the function returns false and *memory_bytes was not changed an error
3128
+ * occured during write. If *memory_bytes was changed, or is not 0 if
3129
+ * 'memory' was NULL, the write would have succeeded but for the memory
3130
+ * buffer being too small. *memory_bytes contains the required number of
3131
+ * bytes and will be bigger that the original value.
3132
+ */
3133
+
3134
+ #define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\
3135
+ row_stride, colormap)\
3136
+ png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\
3137
+ row_stride, colormap)
3138
+ /* Return the amount of memory in 'size' required to compress this image.
3139
+ * The png_image structure 'image' must be filled in as in the above
3140
+ * function and must not be changed before the actual write call, the buffer
3141
+ * and all other parameters must also be identical to that in the final
3142
+ * write call. The 'size' variable need not be initialized.
3143
+ *
3144
+ * NOTE: the macro returns true/false, if false is returned 'size' will be
3145
+ * set to zero and the write failed and probably will fail if tried again.
3146
+ */
3147
+
3148
+ /* You can pre-allocate the buffer by making sure it is of sufficient size
3149
+ * regardless of the amount of compression achieved. The buffer size will
3150
+ * always be bigger than the original image and it will never be filled. The
3151
+ * following macros are provided to assist in allocating the buffer.
3152
+ */
3153
+ #define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height)
3154
+ /* The number of uncompressed bytes in the PNG byte encoding of the image;
3155
+ * uncompressing the PNG IDAT data will give this number of bytes.
3156
+ *
3157
+ * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this
3158
+ * macro can because of the extra bytes used in the PNG byte encoding. You
3159
+ * need to avoid this macro if your image size approaches 2^30 in width or
3160
+ * height. The same goes for the remainder of these macros; they all produce
3161
+ * bigger numbers than the actual in-memory image size.
3162
+ */
3163
+ #ifndef PNG_ZLIB_MAX_SIZE
3164
+ # define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U)
3165
+ /* An upper bound on the number of compressed bytes given 'b' uncompressed
3166
+ * bytes. This is based on deflateBounds() in zlib; different
3167
+ * implementations of zlib compression may conceivably produce more data so
3168
+ * if your zlib implementation is not zlib itself redefine this macro
3169
+ * appropriately.
3170
+ */
3171
+ #endif
3172
+
3173
+ #define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\
3174
+ PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image))
3175
+ /* An upper bound on the size of the data in the PNG IDAT chunks. */
3176
+
3177
+ #define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\
3178
+ ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\
3179
+ (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\
3180
+ 12U+3U*(image).colormap_entries/*PLTE data*/+\
3181
+ (((image).format&PNG_FORMAT_FLAG_ALPHA)?\
3182
+ 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\
3183
+ 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size))
3184
+ /* A helper for the following macro; if your compiler cannot handle the
3185
+ * following macro use this one with the result of
3186
+ * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most
3187
+ * compilers should handle this just fine.)
3188
+ */
3189
+
3190
+ #define PNG_IMAGE_PNG_SIZE_MAX(image)\
3191
+ PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image))
3192
+ /* An upper bound on the total length of the PNG data stream for 'image'.
3193
+ * The result is of type png_alloc_size_t, on 32-bit systems this may
3194
+ * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will
3195
+ * run out of buffer space but return a corrected size which should work.
3196
+ */
3064
3197
  #endif /* SIMPLIFIED_WRITE */
3065
3198
  /*******************************************************************************
3066
3199
  * END OF SIMPLIFIED API
@@ -3094,7 +3227,10 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3094
3227
  #endif
3095
3228
  #define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */
3096
3229
  #define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */
3097
- #define PNG_OPTION_NEXT 6 /* Next option - numbers must be even */
3230
+ #ifdef PNG_MIPS_MSA_API_SUPPORTED
3231
+ # define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */
3232
+ #endif
3233
+ #define PNG_OPTION_NEXT 8 /* Next option - numbers must be even */
3098
3234
 
3099
3235
  /* Return values: NOTE: there are four values and 'off' is *not* zero */
3100
3236
  #define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
@@ -3118,7 +3254,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
3118
3254
  * one to use is one more than this.)
3119
3255
  */
3120
3256
  #ifdef PNG_EXPORT_LAST_ORDINAL
3121
- PNG_EXPORT_LAST_ORDINAL(244);
3257
+ PNG_EXPORT_LAST_ORDINAL(245);
3122
3258
  #endif
3123
3259
 
3124
3260
  #ifdef __cplusplus