cairo 1.14.3-x64-mingw32 → 1.14.6-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +11 -0
  3. data/Rakefile +11 -9
  4. data/ext/cairo/rb_cairo.h +2 -2
  5. data/ext/cairo/rb_cairo_font_options.c +5 -1
  6. data/ext/cairo/rb_cairo_surface.c +28 -5
  7. data/lib/2.2/cairo.so +0 -0
  8. data/lib/2.3/cairo.so +0 -0
  9. data/test/test_font_options.rb +47 -2
  10. data/vendor/local/bin/fc-cache.exe +0 -0
  11. data/vendor/local/bin/fc-cat.exe +0 -0
  12. data/vendor/local/bin/fc-list.exe +0 -0
  13. data/vendor/local/bin/fc-match.exe +0 -0
  14. data/vendor/local/bin/fc-pattern.exe +0 -0
  15. data/vendor/local/bin/fc-query.exe +0 -0
  16. data/vendor/local/bin/fc-scan.exe +0 -0
  17. data/vendor/local/bin/fc-validate.exe +0 -0
  18. data/vendor/local/bin/freetype-config +6 -8
  19. data/vendor/local/bin/libcairo-2.dll +0 -0
  20. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  21. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  22. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  23. data/vendor/local/bin/libfreetype-6.dll +0 -0
  24. data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
  25. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  26. data/vendor/local/bin/libpng-config +1 -1
  27. data/vendor/local/bin/libpng16-16.dll +0 -0
  28. data/vendor/local/bin/libpng16-config +1 -1
  29. data/vendor/local/bin/libstdc++-6.dll +0 -0
  30. data/vendor/local/bin/libwinpthread-1.dll +0 -0
  31. data/vendor/local/bin/libxml2-2.dll +0 -0
  32. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  33. data/vendor/local/bin/pngfix.exe +0 -0
  34. data/vendor/local/bin/xmlcatalog.exe +0 -0
  35. data/vendor/local/bin/xmllint.exe +0 -0
  36. data/vendor/local/bin/zlib1.dll +0 -0
  37. data/vendor/local/include/cairo/cairo-features.h +15 -0
  38. data/vendor/local/include/cairo/cairo-version.h +1 -1
  39. data/vendor/local/include/freetype2/{config → freetype/config}/ftconfig.h +15 -9
  40. data/vendor/local/include/freetype2/{config → freetype/config}/ftheader.h +64 -65
  41. data/vendor/local/include/freetype2/{config → freetype/config}/ftmodule.h +0 -0
  42. data/vendor/local/include/freetype2/{config → freetype/config}/ftoption.h +29 -64
  43. data/vendor/local/include/freetype2/{config → freetype/config}/ftstdlib.h +6 -6
  44. data/vendor/local/include/freetype2/{freetype.h → freetype/freetype.h} +270 -67
  45. data/vendor/local/include/freetype2/{ftadvanc.h → freetype/ftadvanc.h} +4 -4
  46. data/vendor/local/include/freetype2/{ftautoh.h → freetype/ftautoh.h} +59 -6
  47. data/vendor/local/include/freetype2/{ftbbox.h → freetype/ftbbox.h} +4 -4
  48. data/vendor/local/include/freetype2/{ftbdf.h → freetype/ftbdf.h} +4 -4
  49. data/vendor/local/include/freetype2/{ftbitmap.h → freetype/ftbitmap.h} +4 -4
  50. data/vendor/local/include/freetype2/{ftbzip2.h → freetype/ftbzip2.h} +4 -4
  51. data/vendor/local/include/freetype2/{ftcache.h → freetype/ftcache.h} +4 -4
  52. data/vendor/local/include/freetype2/{ftcffdrv.h → freetype/ftcffdrv.h} +8 -8
  53. data/vendor/local/include/freetype2/{ftchapters.h → freetype/ftchapters.h} +14 -0
  54. data/vendor/local/include/freetype2/{ftcid.h → freetype/ftcid.h} +4 -4
  55. data/vendor/local/include/freetype2/{fterrdef.h → freetype/fterrdef.h} +39 -12
  56. data/vendor/local/include/freetype2/{fterrors.h → freetype/fterrors.h} +73 -45
  57. data/vendor/local/include/freetype2/{ftfntfmt.h → freetype/ftfntfmt.h} +7 -4
  58. data/vendor/local/include/freetype2/{ftgasp.h → freetype/ftgasp.h} +4 -4
  59. data/vendor/local/include/freetype2/{ftglyph.h → freetype/ftglyph.h} +4 -4
  60. data/vendor/local/include/freetype2/{ftgxval.h → freetype/ftgxval.h} +4 -4
  61. data/vendor/local/include/freetype2/{ftgzip.h → freetype/ftgzip.h} +4 -4
  62. data/vendor/local/include/freetype2/{ftimage.h → freetype/ftimage.h} +6 -6
  63. data/vendor/local/include/freetype2/{ftincrem.h → freetype/ftincrem.h} +4 -4
  64. data/vendor/local/include/freetype2/{ftlcdfil.h → freetype/ftlcdfil.h} +111 -76
  65. data/vendor/local/include/freetype2/{ftlist.h → freetype/ftlist.h} +4 -4
  66. data/vendor/local/include/freetype2/{ftlzw.h → freetype/ftlzw.h} +4 -4
  67. data/vendor/local/include/freetype2/{ftmac.h → freetype/ftmac.h} +4 -4
  68. data/vendor/local/include/freetype2/{ftmm.h → freetype/ftmm.h} +10 -5
  69. data/vendor/local/include/freetype2/{ftmodapi.h → freetype/ftmodapi.h} +15 -17
  70. data/vendor/local/include/freetype2/{ftmoderr.h → freetype/ftmoderr.h} +5 -5
  71. data/vendor/local/include/freetype2/{ftotval.h → freetype/ftotval.h} +4 -4
  72. data/vendor/local/include/freetype2/{ftoutln.h → freetype/ftoutln.h} +6 -6
  73. data/vendor/local/include/freetype2/{ftpfr.h → freetype/ftpfr.h} +4 -4
  74. data/vendor/local/include/freetype2/{ftrender.h → freetype/ftrender.h} +4 -4
  75. data/vendor/local/include/freetype2/{ftsizes.h → freetype/ftsizes.h} +4 -4
  76. data/vendor/local/include/freetype2/{ftsnames.h → freetype/ftsnames.h} +4 -4
  77. data/vendor/local/include/freetype2/{ftstroke.h → freetype/ftstroke.h} +4 -4
  78. data/vendor/local/include/freetype2/{ftsynth.h → freetype/ftsynth.h} +4 -4
  79. data/vendor/local/include/freetype2/{ftsystem.h → freetype/ftsystem.h} +4 -4
  80. data/vendor/local/include/freetype2/{fttrigon.h → freetype/fttrigon.h} +6 -6
  81. data/vendor/local/include/freetype2/{ftttdrv.h → freetype/ftttdrv.h} +81 -4
  82. data/vendor/local/include/freetype2/{fttypes.h → freetype/fttypes.h} +4 -4
  83. data/vendor/local/include/freetype2/{ftwinfnt.h → freetype/ftwinfnt.h} +4 -4
  84. data/vendor/local/include/freetype2/{t1tables.h → freetype/t1tables.h} +4 -4
  85. data/vendor/local/include/freetype2/{ttnameid.h → freetype/ttnameid.h} +4 -4
  86. data/vendor/local/include/freetype2/{tttables.h → freetype/tttables.h} +4 -4
  87. data/vendor/local/include/freetype2/{tttags.h → freetype/tttags.h} +4 -4
  88. data/vendor/local/include/freetype2/{ttunpat.h → freetype/ttunpat.h} +11 -8
  89. data/vendor/local/include/freetype2/ft2build.h +5 -5
  90. data/vendor/local/include/libpng16/png.h +310 -318
  91. data/vendor/local/include/libpng16/pngconf.h +8 -8
  92. data/vendor/local/include/libpng16/pnglibconf.h +3 -4
  93. data/vendor/local/include/png.h +310 -318
  94. data/vendor/local/include/pngconf.h +8 -8
  95. data/vendor/local/include/pnglibconf.h +3 -4
  96. data/vendor/local/lib/libcairo-gobject.a +0 -0
  97. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  98. data/vendor/local/lib/libcairo-gobject.la +2 -2
  99. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  100. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  101. data/vendor/local/lib/libcairo-script-interpreter.la +1 -1
  102. data/vendor/local/lib/libcairo.a +0 -0
  103. data/vendor/local/lib/libcairo.dll.a +0 -0
  104. data/vendor/local/lib/libcairo.la +1 -1
  105. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  106. data/vendor/local/lib/libfreetype.a +0 -0
  107. data/vendor/local/lib/libfreetype.dll.a +0 -0
  108. data/vendor/local/lib/libfreetype.la +1 -1
  109. data/vendor/local/lib/libpixman-1.a +0 -0
  110. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  111. data/vendor/local/lib/libpng.a +0 -0
  112. data/vendor/local/lib/libpng.dll.a +0 -0
  113. data/vendor/local/lib/libpng.la +2 -2
  114. data/vendor/local/lib/libpng16.a +0 -0
  115. data/vendor/local/lib/libpng16.dll.a +0 -0
  116. data/vendor/local/lib/libpng16.la +2 -2
  117. data/vendor/local/lib/libxml2.a +0 -0
  118. data/vendor/local/lib/libxml2.dll.a +0 -0
  119. data/vendor/local/lib/libz.a +0 -0
  120. data/vendor/local/lib/libz.dll.a +0 -0
  121. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  122. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  123. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  124. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  125. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  126. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  127. data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
  128. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  129. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  130. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  131. data/vendor/local/lib/pkgconfig/cairo.pc +1 -1
  132. data/vendor/local/lib/pkgconfig/freetype2.pc +3 -3
  133. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  134. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  135. data/vendor/local/share/aclocal/freetype2.m4 +1 -1
  136. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +1 -1
  137. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +1 -1
  138. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +1 -1
  139. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +4 -4
  140. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +3 -3
  141. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +6 -6
  142. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +3 -3
  143. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +10 -10
  144. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +3 -3
  145. data/vendor/local/share/gtk-doc/html/cairo/cairo-Script-Surfaces.html +1 -1
  146. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +14 -14
  147. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -1
  148. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +5 -5
  149. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +1 -1
  150. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +1 -1
  151. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +3 -3
  152. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +4 -4
  153. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +2 -2
  154. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +31 -31
  155. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +12 -12
  156. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +18 -18
  157. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +8 -8
  158. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +11 -11
  159. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +1 -0
  160. data/vendor/local/share/gtk-doc/html/cairo/index-1.12.html +2 -2
  161. data/vendor/local/share/gtk-doc/html/cairo/index-1.14.html +52 -0
  162. data/vendor/local/share/gtk-doc/html/cairo/index.html +2 -1
  163. data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +2 -2
  164. data/vendor/local/share/license/freetype/README +7 -6
  165. data/vendor/local/share/license/freetype/README.git +1 -1
  166. data/vendor/local/share/license/libpng/README +1 -1
  167. data/vendor/local/share/man/man1/freetype-config.1 +1 -1
  168. data/vendor/local/share/man/man3/libpng.3 +308 -352
  169. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  170. data/vendor/local/share/man/man5/png.5 +4 -4
  171. metadata +72 -72
  172. data/lib/2.0/cairo.so +0 -0
  173. data/lib/2.1/cairo.so +0 -0
@@ -1,9 +1,9 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.6.18, July 23, 2015
4
+ * libpng version 1.6.23, June 9, 2016
5
5
  *
6
- * Copyright (c) 1998-2015 Glenn Randers-Pehrson
6
+ * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
7
7
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
8
8
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
9
9
  *
@@ -12,234 +12,9 @@
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.18, July 23, 2015: Glenn
15
+ * libpng versions 0.97, January 1998, through 1.6.23, June 9, 2016:
16
+ * Glenn Randers-Pehrson.
16
17
  * See also "Contributing Authors", below.
17
- *
18
- * Note about libpng version numbers:
19
- *
20
- * Due to various miscommunications, unforeseen code incompatibilities
21
- * and occasional factors outside the authors' control, version numbering
22
- * on the library has not always been consistent and straightforward.
23
- * The following table summarizes matters since version 0.89c, which was
24
- * the first widely used release:
25
- *
26
- * source png.h png.h shared-lib
27
- * version string int version
28
- * ------- ------ ----- ----------
29
- * 0.89c "1.0 beta 3" 0.89 89 1.0.89
30
- * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
31
- * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
32
- * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
33
- * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
34
- * 0.97c 0.97 97 2.0.97
35
- * 0.98 0.98 98 2.0.98
36
- * 0.99 0.99 98 2.0.99
37
- * 0.99a-m 0.99 99 2.0.99
38
- * 1.00 1.00 100 2.1.0 [100 should be 10000]
39
- * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
40
- * 1.0.1 png.h string is 10001 2.1.0
41
- * 1.0.1a-e identical to the 10002 from here on, the shared library
42
- * 1.0.2 source version) 10002 is 2.V where V is the source code
43
- * 1.0.2a-b 10003 version, except as noted.
44
- * 1.0.3 10003
45
- * 1.0.3a-d 10004
46
- * 1.0.4 10004
47
- * 1.0.4a-f 10005
48
- * 1.0.5 (+ 2 patches) 10005
49
- * 1.0.5a-d 10006
50
- * 1.0.5e-r 10100 (not source compatible)
51
- * 1.0.5s-v 10006 (not binary compatible)
52
- * 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
53
- * 1.0.6d-f 10007 (still binary incompatible)
54
- * 1.0.6g 10007
55
- * 1.0.6h 10007 10.6h (testing xy.z so-numbering)
56
- * 1.0.6i 10007 10.6i
57
- * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
58
- * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
59
- * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
60
- * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
61
- * 1.0.7 1 10007 (still compatible)
62
- * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4
63
- * 1.0.8rc1 1 10008 2.1.0.8rc1
64
- * 1.0.8 1 10008 2.1.0.8
65
- * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6
66
- * 1.0.9rc1 1 10009 2.1.0.9rc1
67
- * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10
68
- * 1.0.9rc2 1 10009 2.1.0.9rc2
69
- * 1.0.9 1 10009 2.1.0.9
70
- * 1.0.10beta1 1 10010 2.1.0.10beta1
71
- * 1.0.10rc1 1 10010 2.1.0.10rc1
72
- * 1.0.10 1 10010 2.1.0.10
73
- * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
74
- * 1.0.11rc1 1 10011 2.1.0.11rc1
75
- * 1.0.11 1 10011 2.1.0.11
76
- * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2
77
- * 1.0.12rc1 2 10012 2.1.0.12rc1
78
- * 1.0.12 2 10012 2.1.0.12
79
- * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned)
80
- * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
81
- * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5
82
- * 1.2.0rc1 3 10200 3.1.2.0rc1
83
- * 1.2.0 3 10200 3.1.2.0
84
- * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4
85
- * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2
86
- * 1.2.1 3 10201 3.1.2.1
87
- * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6
88
- * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1
89
- * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1
90
- * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1
91
- * 1.0.13 10 10013 10.so.0.1.0.13
92
- * 1.2.2 12 10202 12.so.0.1.2.2
93
- * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
94
- * 1.2.3 12 10203 12.so.0.1.2.3
95
- * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3
96
- * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1
97
- * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1
98
- * 1.0.14 10 10014 10.so.0.1.0.14
99
- * 1.2.4 13 10204 12.so.0.1.2.4
100
- * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2
101
- * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3
102
- * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3
103
- * 1.0.15 10 10015 10.so.0.1.0.15
104
- * 1.2.5 13 10205 12.so.0.1.2.5
105
- * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4
106
- * 1.0.16 10 10016 10.so.0.1.0.16
107
- * 1.2.6 13 10206 12.so.0.1.2.6
108
- * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
109
- * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
110
- * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
111
- * 1.0.17 10 10017 12.so.0.1.0.17
112
- * 1.2.7 13 10207 12.so.0.1.2.7
113
- * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
114
- * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
115
- * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
116
- * 1.0.18 10 10018 12.so.0.1.0.18
117
- * 1.2.8 13 10208 12.so.0.1.2.8
118
- * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
119
- * 1.2.9beta4-11 13 10209 12.so.0.9[.0]
120
- * 1.2.9rc1 13 10209 12.so.0.9[.0]
121
- * 1.2.9 13 10209 12.so.0.9[.0]
122
- * 1.2.10beta1-7 13 10210 12.so.0.10[.0]
123
- * 1.2.10rc1-2 13 10210 12.so.0.10[.0]
124
- * 1.2.10 13 10210 12.so.0.10[.0]
125
- * 1.4.0beta1-5 14 10400 14.so.0.0[.0]
126
- * 1.2.11beta1-4 13 10211 12.so.0.11[.0]
127
- * 1.4.0beta7-8 14 10400 14.so.0.0[.0]
128
- * 1.2.11 13 10211 12.so.0.11[.0]
129
- * 1.2.12 13 10212 12.so.0.12[.0]
130
- * 1.4.0beta9-14 14 10400 14.so.0.0[.0]
131
- * 1.2.13 13 10213 12.so.0.13[.0]
132
- * 1.4.0beta15-36 14 10400 14.so.0.0[.0]
133
- * 1.4.0beta37-87 14 10400 14.so.14.0[.0]
134
- * 1.4.0rc01 14 10400 14.so.14.0[.0]
135
- * 1.4.0beta88-109 14 10400 14.so.14.0[.0]
136
- * 1.4.0rc02-08 14 10400 14.so.14.0[.0]
137
- * 1.4.0 14 10400 14.so.14.0[.0]
138
- * 1.4.1beta01-03 14 10401 14.so.14.1[.0]
139
- * 1.4.1rc01 14 10401 14.so.14.1[.0]
140
- * 1.4.1beta04-12 14 10401 14.so.14.1[.0]
141
- * 1.4.1 14 10401 14.so.14.1[.0]
142
- * 1.4.2 14 10402 14.so.14.2[.0]
143
- * 1.4.3 14 10403 14.so.14.3[.0]
144
- * 1.4.4 14 10404 14.so.14.4[.0]
145
- * 1.5.0beta01-58 15 10500 15.so.15.0[.0]
146
- * 1.5.0rc01-07 15 10500 15.so.15.0[.0]
147
- * 1.5.0 15 10500 15.so.15.0[.0]
148
- * 1.5.1beta01-11 15 10501 15.so.15.1[.0]
149
- * 1.5.1rc01-02 15 10501 15.so.15.1[.0]
150
- * 1.5.1 15 10501 15.so.15.1[.0]
151
- * 1.5.2beta01-03 15 10502 15.so.15.2[.0]
152
- * 1.5.2rc01-03 15 10502 15.so.15.2[.0]
153
- * 1.5.2 15 10502 15.so.15.2[.0]
154
- * 1.5.3beta01-10 15 10503 15.so.15.3[.0]
155
- * 1.5.3rc01-02 15 10503 15.so.15.3[.0]
156
- * 1.5.3beta11 15 10503 15.so.15.3[.0]
157
- * 1.5.3 [omitted]
158
- * 1.5.4beta01-08 15 10504 15.so.15.4[.0]
159
- * 1.5.4rc01 15 10504 15.so.15.4[.0]
160
- * 1.5.4 15 10504 15.so.15.4[.0]
161
- * 1.5.5beta01-08 15 10505 15.so.15.5[.0]
162
- * 1.5.5rc01 15 10505 15.so.15.5[.0]
163
- * 1.5.5 15 10505 15.so.15.5[.0]
164
- * 1.5.6beta01-07 15 10506 15.so.15.6[.0]
165
- * 1.5.6rc01-03 15 10506 15.so.15.6[.0]
166
- * 1.5.6 15 10506 15.so.15.6[.0]
167
- * 1.5.7beta01-05 15 10507 15.so.15.7[.0]
168
- * 1.5.7rc01-03 15 10507 15.so.15.7[.0]
169
- * 1.5.7 15 10507 15.so.15.7[.0]
170
- * 1.6.0beta01-40 16 10600 16.so.16.0[.0]
171
- * 1.6.0rc01-08 16 10600 16.so.16.0[.0]
172
- * 1.6.0 16 10600 16.so.16.0[.0]
173
- * 1.6.1beta01-09 16 10601 16.so.16.1[.0]
174
- * 1.6.1rc01 16 10601 16.so.16.1[.0]
175
- * 1.6.1 16 10601 16.so.16.1[.0]
176
- * 1.6.2beta01 16 10602 16.so.16.2[.0]
177
- * 1.6.2rc01-06 16 10602 16.so.16.2[.0]
178
- * 1.6.2 16 10602 16.so.16.2[.0]
179
- * 1.6.3beta01-11 16 10603 16.so.16.3[.0]
180
- * 1.6.3rc01 16 10603 16.so.16.3[.0]
181
- * 1.6.3 16 10603 16.so.16.3[.0]
182
- * 1.6.4beta01-02 16 10604 16.so.16.4[.0]
183
- * 1.6.4rc01 16 10604 16.so.16.4[.0]
184
- * 1.6.4 16 10604 16.so.16.4[.0]
185
- * 1.6.5 16 10605 16.so.16.5[.0]
186
- * 1.6.6 16 10606 16.so.16.6[.0]
187
- * 1.6.7beta01-04 16 10607 16.so.16.7[.0]
188
- * 1.6.7rc01-03 16 10607 16.so.16.7[.0]
189
- * 1.6.7 16 10607 16.so.16.7[.0]
190
- * 1.6.8beta01-02 16 10608 16.so.16.8[.0]
191
- * 1.6.8rc01-02 16 10608 16.so.16.8[.0]
192
- * 1.6.8 16 10608 16.so.16.8[.0]
193
- * 1.6.9beta01-04 16 10609 16.so.16.9[.0]
194
- * 1.6.9rc01-02 16 10609 16.so.16.9[.0]
195
- * 1.6.9 16 10609 16.so.16.9[.0]
196
- * 1.6.10beta01-03 16 10610 16.so.16.10[.0]
197
- * 1.6.10rc01-03 16 10610 16.so.16.10[.0]
198
- * 1.6.10 16 10610 16.so.16.10[.0]
199
- * 1.6.11beta01-06 16 10611 16.so.16.11[.0]
200
- * 1.6.11rc01-02 16 10611 16.so.16.11[.0]
201
- * 1.6.11 16 10611 16.so.16.11[.0]
202
- * 1.6.12rc01-03 16 10612 16.so.16.12[.0]
203
- * 1.6.12 16 10612 16.so.16.12[.0]
204
- * 1.6.13beta01-04 16 10613 16.so.16.13[.0]
205
- * 1.6.13rc01-02 16 10613 16.so.16.13[.0]
206
- * 1.6.13 16 10613 16.so.16.13[.0]
207
- * 1.6.14beta01-07 16 10614 16.so.16.14[.0]
208
- * 1.6.14rc01-02 16 10614 16.so.16.14[.0]
209
- * 1.6.14 16 10614 16.so.16.14[.0]
210
- * 1.6.15beta01-08 16 10615 16.so.16.15[.0]
211
- * 1.6.15rc01-03 16 10615 16.so.16.15[.0]
212
- * 1.6.15 16 10615 16.so.16.15[.0]
213
- * 1.6.16beta01-03 16 10616 16.so.16.16[.0]
214
- * 1.6.16rc01-02 16 10616 16.so.16.16[.0]
215
- * 1.6.16 16 10616 16.so.16.16[.0]
216
- * 1.6.17beta01-06 16 10617 16.so.16.17[.0]
217
- * 1.6.17rc01-06 16 10617 16.so.16.17[.0]
218
- * 1.6.17 16 10617 16.so.16.17[.0]
219
- * 1.6.18beta01-09 16 10618 16.so.16.18[.0]
220
- * 1.6.18rc01-03 16 10618 16.so.16.18[.0]
221
- * 1.6.18 16 10618 16.so.16.18[.0]
222
- *
223
- * Henceforth the source version will match the shared-library major
224
- * and minor numbers; the shared-library major version number will be
225
- * used for changes in backward compatibility, as it is intended. The
226
- * PNG_LIBPNG_VER macro, which is not used within libpng but is available
227
- * for applications, is an unsigned integer of the form xyyzz corresponding
228
- * to the source version x.y.z (leading zeros in y and z). Beta versions
229
- * were given the previous public release number plus a letter, until
230
- * version 1.0.6j; from then on they were given the upcoming public
231
- * release number plus "betaNN" or "rcNN".
232
- *
233
- * Binary incompatibility exists only when applications make direct access
234
- * to the info_ptr or png_ptr members through png.h, and the compiled
235
- * application is loaded with a different version of the library.
236
- *
237
- * DLLNUM will change each time there are forward or backward changes
238
- * in binary compatibility (e.g., when a new feature is added).
239
- *
240
- * See libpng-manual.txt or libpng.3 for more information. The PNG
241
- * specification is available as a W3C Recommendation and as an ISO
242
- * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/
243
18
  */
244
19
 
245
20
  /*
@@ -250,12 +25,18 @@
250
25
  *
251
26
  * This code is released under the libpng license.
252
27
  *
253
- * libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are
254
- * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
255
- * distributed according to the same disclaimer and license as libpng-1.0.6
256
- * with the following individuals added to the list of Contributing Authors:
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.23, June 9, 2016 are
33
+ * Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
34
+ * derived from libpng-1.0.6, and are distributed according to the same
35
+ * disclaimer and license as libpng-1.0.6 with the following individuals
36
+ * added to the list of Contributing Authors:
257
37
  *
258
38
  * Simon-Pierre Cadieux
39
+ * Eric S. Raymond
259
40
  * Mans Rullgard
260
41
  * Cosmin Truta
261
42
  * Gilles Vollant
@@ -270,20 +51,28 @@
270
51
  * risk of satisfactory quality, performance, accuracy, and effort is with
271
52
  * the user.
272
53
  *
54
+ * Some files in the "contrib" directory have other copyright owners and
55
+ * are released under other open source licenses.
56
+ *
57
+ *
273
58
  * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
274
- * Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according
275
- * to the same disclaimer and license as libpng-0.96, with the following
276
- * individuals added to the list of Contributing Authors:
59
+ * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
60
+ * libpng-0.96, and are distributed according to the same disclaimer and
61
+ * license as libpng-0.96, with the following individuals added to the list
62
+ * of Contributing Authors:
277
63
  *
278
64
  * Tom Lane
279
65
  * Glenn Randers-Pehrson
280
- * Eric S. Raymond
281
66
  * Willem van Schaik
282
67
  *
68
+ * Some files in the "scripts" directory have different copyright owners
69
+ * but are also released under this license.
70
+ *
283
71
  * libpng versions 0.89, June 1996, through 0.96, May 1997, are
284
- * Copyright (c) 1996-1997 Andreas Dilger, and are
285
- * distributed according to the same disclaimer and license as libpng-0.88,
286
- * with the following individuals added to the list of Contributing Authors:
72
+ * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
73
+ * and are distributed according to the same disclaimer and license as
74
+ * libpng-0.88, with the following individuals added to the list of
75
+ * Contributing Authors:
287
76
  *
288
77
  * John Bowler
289
78
  * Kevin Bracey
@@ -292,6 +81,9 @@
292
81
  * Greg Roelofs
293
82
  * Tom Tanner
294
83
  *
84
+ * Some files in the "scripts" directory have other copyright owners
85
+ * but are released under this license.
86
+ *
295
87
  * libpng versions 0.5, May 1995, through 0.88, January 1996, are
296
88
  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
297
89
  *
@@ -329,6 +121,31 @@
329
121
  * supporting the PNG file format in commercial products. If you use this
330
122
  * source code in a product, acknowledgment is not required but would be
331
123
  * appreciated.
124
+ *
125
+ * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
126
+ *
127
+ * TRADEMARK:
128
+ *
129
+ * The name "libpng" has not been registered by the Copyright owner
130
+ * as a trademark in any jurisdiction. However, because libpng has
131
+ * been distributed and maintained world-wide, continually since 1995,
132
+ * the Copyright owner claims "common-law trademark protection" in any
133
+ * jurisdiction where common-law trademark is recognized.
134
+ *
135
+ * OSI CERTIFICATION:
136
+ *
137
+ * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
138
+ * a certification mark of the Open Source Initiative. OSI has not addressed
139
+ * the additional disclaimers inserted at version 1.0.7.
140
+ *
141
+ * EXPORT CONTROL:
142
+ *
143
+ * The Copyright owner believes that the Export Control Classification
144
+ * Number (ECCN) for libpng is EAR99, which means not subject to export
145
+ * controls or International Traffic in Arms Regulations (ITAR) because
146
+ * it is open source, publicly available software, that does not contain
147
+ * any encryption software. See the EAR, paragraphs 734.3(b)(3) and
148
+ * 734.7(b).
332
149
  */
333
150
 
334
151
  /*
@@ -341,12 +158,6 @@
341
158
  * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
342
159
  */
343
160
 
344
- /*
345
- * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
346
- * a certification mark of the Open Source Initiative. OSI has not addressed
347
- * the additional disclaimers inserted at version 1.0.7.
348
- */
349
-
350
161
  /*
351
162
  * The contributing authors would like to thank all those who helped
352
163
  * with testing, bug fixes, and patience. This wouldn't have been
@@ -355,17 +166,92 @@
355
166
  * Thanks to Frank J. T. Wojcik for helping with the documentation.
356
167
  */
357
168
 
169
+ /* Note about libpng version numbers:
170
+ *
171
+ * Due to various miscommunications, unforeseen code incompatibilities
172
+ * and occasional factors outside the authors' control, version numbering
173
+ * on the library has not always been consistent and straightforward.
174
+ * The following table summarizes matters since version 0.89c, which was
175
+ * the first widely used release:
176
+ *
177
+ * source png.h png.h shared-lib
178
+ * version string int version
179
+ * ------- ------ ----- ----------
180
+ * 0.89c "1.0 beta 3" 0.89 89 1.0.89
181
+ * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90]
182
+ * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95]
183
+ * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96]
184
+ * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97]
185
+ * 0.97c 0.97 97 2.0.97
186
+ * 0.98 0.98 98 2.0.98
187
+ * 0.99 0.99 98 2.0.99
188
+ * 0.99a-m 0.99 99 2.0.99
189
+ * 1.00 1.00 100 2.1.0 [100 should be 10000]
190
+ * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000]
191
+ * 1.0.1 png.h string is 10001 2.1.0
192
+ * 1.0.1a-e identical to the 10002 from here on, the shared library
193
+ * 1.0.2 source version) 10002 is 2.V where V is the source code
194
+ * 1.0.2a-b 10003 version, except as noted.
195
+ * 1.0.3 10003
196
+ * 1.0.3a-d 10004
197
+ * 1.0.4 10004
198
+ * 1.0.4a-f 10005
199
+ * 1.0.5 (+ 2 patches) 10005
200
+ * 1.0.5a-d 10006
201
+ * 1.0.5e-r 10100 (not source compatible)
202
+ * 1.0.5s-v 10006 (not binary compatible)
203
+ * 1.0.6 (+ 3 patches) 10006 (still binary incompatible)
204
+ * 1.0.6d-f 10007 (still binary incompatible)
205
+ * 1.0.6g 10007
206
+ * 1.0.6h 10007 10.6h (testing xy.z so-numbering)
207
+ * 1.0.6i 10007 10.6i
208
+ * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
209
+ * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible)
210
+ * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible)
211
+ * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
212
+ * 1.0.7 1 10007 (still compatible)
213
+ * ...
214
+ * 1.0.19 10 10019 10.so.0.19[.0]
215
+ * ...
216
+ * 1.2.56 13 10256 12.so.0.56[.0]
217
+ * ...
218
+ * 1.5.27 15 10527 15.so.15.27[.0]
219
+ * ...
220
+ * 1.6.23 16 10623 16.so.16.23[.0]
221
+ *
222
+ * Henceforth the source version will match the shared-library major
223
+ * and minor numbers; the shared-library major version number will be
224
+ * used for changes in backward compatibility, as it is intended. The
225
+ * PNG_LIBPNG_VER macro, which is not used within libpng but is available
226
+ * for applications, is an unsigned integer of the form xyyzz corresponding
227
+ * to the source version x.y.z (leading zeros in y and z). Beta versions
228
+ * were given the previous public release number plus a letter, until
229
+ * version 1.0.6j; from then on they were given the upcoming public
230
+ * release number plus "betaNN" or "rcNN".
231
+ *
232
+ * Binary incompatibility exists only when applications make direct access
233
+ * to the info_ptr or png_ptr members through png.h, and the compiled
234
+ * application is loaded with a different version of the library.
235
+ *
236
+ * DLLNUM will change each time there are forward or backward changes
237
+ * in binary compatibility (e.g., when a new feature is added).
238
+ *
239
+ * See libpng.txt or libpng.3 for more information. The PNG specification
240
+ * is available as a W3C Recommendation and as an ISO Specification,
241
+ * <http://www.w3.org/TR/2003/REC-PNG-20031110/
242
+ */
243
+
358
244
  /*
359
245
  * Y2K compliance in libpng:
360
246
  * =========================
361
247
  *
362
- * July 23, 2015
248
+ * June 9, 2016
363
249
  *
364
250
  * Since the PNG Development group is an ad-hoc body, we can't make
365
251
  * an official declaration.
366
252
  *
367
253
  * This is your unofficial assurance that libpng from version 0.71 and
368
- * upward through 1.6.18 are Y2K compliant. It is my belief that
254
+ * upward through 1.6.23 are Y2K compliant. It is my belief that
369
255
  * earlier versions were also Y2K compliant.
370
256
  *
371
257
  * Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -427,9 +313,9 @@
427
313
  */
428
314
 
429
315
  /* Version information for png.h - this should match the version in png.c */
430
- #define PNG_LIBPNG_VER_STRING "1.6.18"
316
+ #define PNG_LIBPNG_VER_STRING "1.6.23"
431
317
  #define PNG_HEADER_VERSION_STRING \
432
- " libpng version 1.6.18 - July 23, 2015\n"
318
+ " libpng version 1.6.23 - June 9, 2016\n"
433
319
 
434
320
  #define PNG_LIBPNG_VER_SONUM 16
435
321
  #define PNG_LIBPNG_VER_DLLNUM 16
@@ -437,7 +323,7 @@
437
323
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
438
324
  #define PNG_LIBPNG_VER_MAJOR 1
439
325
  #define PNG_LIBPNG_VER_MINOR 6
440
- #define PNG_LIBPNG_VER_RELEASE 18
326
+ #define PNG_LIBPNG_VER_RELEASE 23
441
327
 
442
328
  /* This should match the numeric part of the final component of
443
329
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -468,7 +354,7 @@
468
354
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
469
355
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
470
356
  */
471
- #define PNG_LIBPNG_VER 10618 /* 1.6.18 */
357
+ #define PNG_LIBPNG_VER 10623 /* 1.6.23 */
472
358
 
473
359
  /* Library configuration: these options cannot be changed after
474
360
  * the library has been built.
@@ -525,17 +411,22 @@ extern "C" {
525
411
 
526
412
  /* This file is arranged in several sections:
527
413
  *
528
- * 1. Any configuration options that can be specified by for the application
414
+ * 1. [omitted]
415
+ * 2. Any configuration options that can be specified by for the application
529
416
  * code when it is built. (Build time configuration is in pnglibconf.h)
530
- * 2. Type definitions (base types are defined in pngconf.h), structure
417
+ * 3. Type definitions (base types are defined in pngconf.h), structure
531
418
  * definitions.
532
- * 3. Exported library functions.
533
- * 4. Simplified API.
419
+ * 4. Exported library functions.
420
+ * 5. Simplified API.
421
+ * 6. Implementation options.
534
422
  *
535
423
  * The library source code has additional files (principally pngpriv.h) that
536
424
  * allow configuration of the library.
537
425
  */
538
- /* Section 1: run time configuration
426
+
427
+ /* Section 1: [omitted] */
428
+
429
+ /* Section 2: run time configuration
539
430
  * See pnglibconf.h for build time configuration
540
431
  *
541
432
  * Run time configuration allows the application to choose between
@@ -565,7 +456,7 @@ extern "C" {
565
456
  * Otherwise the calls are mapped to png_error.
566
457
  */
567
458
 
568
- /* Section 2: type definitions, including structures and compile time
459
+ /* Section 3: type definitions, including structures and compile time
569
460
  * constants.
570
461
  * See pngconf.h for base types that vary by machine/system
571
462
  */
@@ -573,7 +464,7 @@ extern "C" {
573
464
  /* This triggers a compiler error in png.c, if png.c and png.h
574
465
  * do not agree upon the version number.
575
466
  */
576
- typedef char* png_libpng_version_1_6_18;
467
+ typedef char* png_libpng_version_1_6_23;
577
468
 
578
469
  /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
579
470
  *
@@ -874,22 +765,22 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
874
765
  * data in the info_struct to be written into the output file. The values
875
766
  * of the PNG_INFO_<chunk> defines should NOT be changed.
876
767
  */
877
- #define PNG_INFO_gAMA 0x0001
878
- #define PNG_INFO_sBIT 0x0002
879
- #define PNG_INFO_cHRM 0x0004
880
- #define PNG_INFO_PLTE 0x0008
881
- #define PNG_INFO_tRNS 0x0010
882
- #define PNG_INFO_bKGD 0x0020
883
- #define PNG_INFO_hIST 0x0040
884
- #define PNG_INFO_pHYs 0x0080
885
- #define PNG_INFO_oFFs 0x0100
886
- #define PNG_INFO_tIME 0x0200
887
- #define PNG_INFO_pCAL 0x0400
888
- #define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */
889
- #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
890
- #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
891
- #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
892
- #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
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 */
893
784
 
894
785
  /* This is used for the transformation routines, as some of them
895
786
  * change these values for the row. It also should enable using
@@ -993,7 +884,9 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
993
884
  #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
994
885
  /* Added to libpng-1.5.4 */
995
886
  #define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */
887
+ #if INT_MAX >= 0x8000 /* else this might break */
996
888
  #define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */
889
+ #endif
997
890
 
998
891
  /* Flags for MNG supported features */
999
892
  #define PNG_FLAG_MNG_EMPTY_PLTE 0x01
@@ -1010,7 +903,7 @@ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
1010
903
  png_alloc_size_t));
1011
904
  typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
1012
905
 
1013
- /* Section 3: exported functions
906
+ /* Section 4: exported functions
1014
907
  * Here are the function definitions most commonly used. This is not
1015
908
  * the place to find out how to use libpng. See libpng-manual.txt for the
1016
909
  * full explanation, see example.c for the summary. This just provides
@@ -1383,13 +1276,13 @@ PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr));
1383
1276
  #endif
1384
1277
 
1385
1278
  #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
1386
- /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
1279
+ /* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
1387
1280
  PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
1388
1281
  int flags));
1389
1282
  /* The values of the PNG_FILLER_ defines should NOT be changed */
1390
1283
  # define PNG_FILLER_BEFORE 0
1391
1284
  # define PNG_FILLER_AFTER 1
1392
- /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
1285
+ /* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
1393
1286
  PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
1394
1287
  png_uint_32 filler, int flags));
1395
1288
  #endif /* READ_FILLER || WRITE_FILLER */
@@ -1458,7 +1351,7 @@ PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr));
1458
1351
  #endif
1459
1352
 
1460
1353
  #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1461
- #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 */
1462
1355
  /* Strip the second byte of information from a 16-bit depth file. */
1463
1356
  PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr));
1464
1357
  #endif
@@ -1609,8 +1502,8 @@ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1609
1502
  #define PNG_FILTER_UP 0x20
1610
1503
  #define PNG_FILTER_AVG 0x40
1611
1504
  #define PNG_FILTER_PAETH 0x80
1612
- #define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
1613
- 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)
1614
1507
 
1615
1508
  /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
1616
1509
  * These defines should NOT be changed.
@@ -1887,21 +1780,21 @@ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
1887
1780
  #define PNG_SET_WILL_FREE_DATA 1
1888
1781
  #define PNG_USER_WILL_FREE_DATA 2
1889
1782
  /* Flags for png_ptr->free_me and info_ptr->free_me */
1890
- #define PNG_FREE_HIST 0x0008
1891
- #define PNG_FREE_ICCP 0x0010
1892
- #define PNG_FREE_SPLT 0x0020
1893
- #define PNG_FREE_ROWS 0x0040
1894
- #define PNG_FREE_PCAL 0x0080
1895
- #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
1896
1789
  #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1897
- # define PNG_FREE_UNKN 0x0200
1790
+ # define PNG_FREE_UNKN 0x0200U
1898
1791
  #endif
1899
- /* PNG_FREE_LIST 0x0400 removed in 1.6.0 because it is ignored */
1900
- #define PNG_FREE_PLTE 0x1000
1901
- #define PNG_FREE_TRNS 0x2000
1902
- #define PNG_FREE_TEXT 0x4000
1903
- #define PNG_FREE_ALL 0x7fff
1904
- #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 */
1905
1798
 
1906
1799
  #ifdef PNG_USER_MEM_SUPPORTED
1907
1800
  PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr,
@@ -2714,7 +2607,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2714
2607
 
2715
2608
  # define PNG_get_int_32(buf) \
2716
2609
  ((png_int_32)((*(buf) & 0x80) \
2717
- ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \
2610
+ ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \
2718
2611
  : (png_int_32)png_get_uint_32(buf)))
2719
2612
 
2720
2613
  /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h,
@@ -2734,10 +2627,17 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2734
2627
  # endif
2735
2628
  #endif
2736
2629
 
2737
- #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
2738
- defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
2630
+ #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
2631
+ PNG_EXPORT(242, void, png_set_check_for_invalid_index,
2632
+ (png_structrp png_ptr, int allowed));
2633
+ # ifdef PNG_GET_PALETTE_MAX_SUPPORTED
2634
+ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
2635
+ png_const_infop info_ptr));
2636
+ # endif
2637
+ #endif /* CHECK_FOR_INVALID_INDEX */
2638
+
2739
2639
  /*******************************************************************************
2740
- * SIMPLIFIED API
2640
+ * Section 5: SIMPLIFIED API
2741
2641
  *******************************************************************************
2742
2642
  *
2743
2643
  * Please read the documentation in libpng-manual.txt (TODO: write said
@@ -2782,6 +2682,9 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2782
2682
  * when it is being read or defines the in-memory format of an image that you
2783
2683
  * need to write:
2784
2684
  */
2685
+ #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
2686
+ defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
2687
+
2785
2688
  #define PNG_IMAGE_VERSION 1
2786
2689
 
2787
2690
  typedef struct png_control *png_controlp;
@@ -2881,7 +2784,7 @@ typedef struct
2881
2784
  * called to read or write the color-map and set the format correctly for the
2882
2785
  * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly!
2883
2786
  *
2884
- * NOTE: libpng can be built with particular features disabled, if you see
2787
+ * NOTE: libpng can be built with particular features disabled. If you see
2885
2788
  * compiler errors because the definition of one of the following flags has been
2886
2789
  * compiled out it is because libpng does not have the required support. It is
2887
2790
  * possible, however, for the libpng configuration to enable the format on just
@@ -2893,7 +2796,7 @@ typedef struct
2893
2796
  */
2894
2797
  #define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */
2895
2798
  #define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */
2896
- #define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2 byte channels else 1 byte */
2799
+ #define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */
2897
2800
  #define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */
2898
2801
 
2899
2802
  #ifdef PNG_FORMAT_BGR_SUPPORTED
@@ -3015,12 +2918,19 @@ typedef struct
3015
2918
  * is the minimum 'row stride', the minimum count of components between each
3016
2919
  * row. For a color-mapped image this is the minimum number of bytes in a
3017
2920
  * row.
2921
+ *
2922
+ * WARNING: this macro overflows for some images with more than one component
2923
+ * and very large image widths. libpng will refuse to process an image where
2924
+ * this macro would overflow.
3018
2925
  */
3019
2926
 
3020
2927
  #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
3021
2928
  (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride))
3022
2929
  /* Return the size, in bytes, of an image buffer given a png_image and a row
3023
2930
  * stride - the number of components to leave space for in each row.
2931
+ *
2932
+ * WARNING: this macro overflows a 32-bit integer for some large PNG images,
2933
+ * libpng will refuse to process an image where such an overflow would occur.
3024
2934
  */
3025
2935
 
3026
2936
  #define PNG_IMAGE_SIZE(image)\
@@ -3141,7 +3051,6 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3141
3051
  #endif /* SIMPLIFIED_READ */
3142
3052
 
3143
3053
  #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
3144
- #ifdef PNG_STDIO_SUPPORTED
3145
3054
  /* WRITE APIS
3146
3055
  * ----------
3147
3056
  * For write you must initialize a png_image structure to describe the image to
@@ -3158,6 +3067,7 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3158
3067
  * values do not correspond to the colors in sRGB.
3159
3068
  * colormap_entries: set to the number of entries in the color-map (0 to 256)
3160
3069
  */
3070
+ #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
3161
3071
  PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
3162
3072
  const char *file, int convert_to_8bit, const void *buffer,
3163
3073
  png_int_32 row_stride, const void *colormap));
@@ -3167,8 +3077,9 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3167
3077
  int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
3168
3078
  const void *colormap));
3169
3079
  /* Write the image to the given (FILE*). */
3080
+ #endif /* SIMPLIFIED_WRITE_STDIO */
3170
3081
 
3171
- /* With both write APIs if image is in one of the linear formats with 16-bit
3082
+ /* With all write APIs if image is in one of the linear formats with 16-bit
3172
3083
  * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG
3173
3084
  * gamma encoded according to the sRGB specification, otherwise a 16-bit linear
3174
3085
  * encoded PNG file is written.
@@ -3180,30 +3091,111 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3180
3091
  *
3181
3092
  * With all APIs row_stride is handled as in the read APIs - it is the spacing
3182
3093
  * from one row to the next in component sized units (1 or 2 bytes) and if
3183
- * negative indicates a bottom-up row layout in the buffer. If row_stride is zero,
3184
- * libpng will calculate it for you from the image width and number of channels.
3094
+ * negative indicates a bottom-up row layout in the buffer. If row_stride is
3095
+ * zero, libpng will calculate it for you from the image width and number of
3096
+ * channels.
3185
3097
  *
3186
- * Note that the write API does not support interlacing, sub-8-bit pixels, indexed
3187
- * PNG (color_type 3) or most ancillary chunks.
3098
+ * Note that the write API does not support interlacing, sub-8-bit pixels or
3099
+ * most ancillary chunks. If you need to write text chunks (e.g. for copyright
3100
+ * notices) you need to use one of the other APIs.
3188
3101
  */
3189
- #endif /* STDIO */
3102
+
3103
+ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
3104
+ png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit,
3105
+ const void *buffer, png_int_32 row_stride, const void *colormap));
3106
+ /* Write the image to the given memory buffer. The function both writes the
3107
+ * whole PNG data stream to *memory and updates *memory_bytes with the count
3108
+ * of bytes written.
3109
+ *
3110
+ * 'memory' may be NULL. In this case *memory_bytes is not read however on
3111
+ * success the number of bytes which would have been written will still be
3112
+ * stored in *memory_bytes. On failure *memory_bytes will contain 0.
3113
+ *
3114
+ * If 'memory' is not NULL it must point to memory[*memory_bytes] of
3115
+ * writeable memory.
3116
+ *
3117
+ * If the function returns success memory[*memory_bytes] (if 'memory' is not
3118
+ * NULL) contains the written PNG data. *memory_bytes will always be less
3119
+ * than or equal to the original value.
3120
+ *
3121
+ * If the function returns false and *memory_bytes was not changed an error
3122
+ * occured during write. If *memory_bytes was changed, or is not 0 if
3123
+ * 'memory' was NULL, the write would have succeeded but for the memory
3124
+ * buffer being too small. *memory_bytes contains the required number of
3125
+ * bytes and will be bigger that the original value.
3126
+ */
3127
+
3128
+ #define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\
3129
+ row_stride, colormap)\
3130
+ png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\
3131
+ row_stride, colormap)
3132
+ /* Return the amount of memory in 'size' required to compress this image.
3133
+ * The png_image structure 'image' must be filled in as in the above
3134
+ * function and must not be changed before the actual write call, the buffer
3135
+ * and all other parameters must also be identical to that in the final
3136
+ * write call. The 'size' variable need not be initialized.
3137
+ *
3138
+ * NOTE: the macro returns true/false, if false is returned 'size' will be
3139
+ * set to zero and the write failed and probably will fail if tried again.
3140
+ */
3141
+
3142
+ /* You can pre-allocate the buffer by making sure it is of sufficient size
3143
+ * regardless of the amount of compression achieved. The buffer size will
3144
+ * always be bigger than the original image and it will never be filled. The
3145
+ * following macros are provided to assist in allocating the buffer.
3146
+ */
3147
+ #define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height)
3148
+ /* The number of uncompressed bytes in the PNG byte encoding of the image;
3149
+ * uncompressing the PNG IDAT data will give this number of bytes.
3150
+ *
3151
+ * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this
3152
+ * macro can because of the extra bytes used in the PNG byte encoding. You
3153
+ * need to avoid this macro if your image size approaches 2^30 in width or
3154
+ * height. The same goes for the remainder of these macros; they all produce
3155
+ * bigger numbers than the actual in-memory image size.
3156
+ */
3157
+ #ifndef PNG_ZLIB_MAX_SIZE
3158
+ # define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U)
3159
+ /* An upper bound on the number of compressed bytes given 'b' uncompressed
3160
+ * bytes. This is based on deflateBounds() in zlib; different
3161
+ * implementations of zlib compression may conceivably produce more data so
3162
+ * if your zlib implementation is not zlib itself redefine this macro
3163
+ * appropriately.
3164
+ */
3165
+ #endif
3166
+
3167
+ #define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\
3168
+ PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image))
3169
+ /* An upper bound on the size of the data in the PNG IDAT chunks. */
3170
+
3171
+ #define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\
3172
+ ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\
3173
+ (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\
3174
+ 12U+3U*(image).colormap_entries/*PLTE data*/+\
3175
+ (((image).format&PNG_FORMAT_FLAG_ALPHA)?\
3176
+ 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\
3177
+ 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size))
3178
+ /* A helper for the following macro; if your compiler cannot handle the
3179
+ * following macro use this one with the result of
3180
+ * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most
3181
+ * compilers should handle this just fine.)
3182
+ */
3183
+
3184
+ #define PNG_IMAGE_PNG_SIZE_MAX(image)\
3185
+ PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image))
3186
+ /* An upper bound on the total length of the PNG data stream for 'image'.
3187
+ * The result is of type png_alloc_size_t, on 32-bit systems this may
3188
+ * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will
3189
+ * run out of buffer space but return a corrected size which should work.
3190
+ */
3190
3191
  #endif /* SIMPLIFIED_WRITE */
3191
3192
  /*******************************************************************************
3192
3193
  * END OF SIMPLIFIED API
3193
3194
  ******************************************************************************/
3194
3195
  #endif /* SIMPLIFIED_{READ|WRITE} */
3195
3196
 
3196
- #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
3197
- PNG_EXPORT(242, void, png_set_check_for_invalid_index,
3198
- (png_structrp png_ptr, int allowed));
3199
- # ifdef PNG_GET_PALETTE_MAX_SUPPORTED
3200
- PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
3201
- png_const_infop info_ptr));
3202
- # endif
3203
- #endif /* CHECK_FOR_INVALID_INDEX */
3204
-
3205
3197
  /*******************************************************************************
3206
- * IMPLEMENTATION OPTIONS
3198
+ * Section 6: IMPLEMENTATION OPTIONS
3207
3199
  *******************************************************************************
3208
3200
  *
3209
3201
  * Support for arbitrary implementation-specific optimizations. The API allows
@@ -3253,7 +3245,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
3253
3245
  * one to use is one more than this.)
3254
3246
  */
3255
3247
  #ifdef PNG_EXPORT_LAST_ORDINAL
3256
- PNG_EXPORT_LAST_ORDINAL(244);
3248
+ PNG_EXPORT_LAST_ORDINAL(245);
3257
3249
  #endif
3258
3250
 
3259
3251
  #ifdef __cplusplus