cairo 1.12.4-x86-mingw32 → 1.12.5-x86-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 (931) hide show
  1. data/NEWS +8 -0
  2. data/Rakefile +357 -31
  3. data/ext/cairo/rb_cairo.h +1 -1
  4. data/lib/1.9/cairo.so +0 -0
  5. data/lib/2.0/cairo.so +0 -0
  6. data/vendor/local/bin/fc-cache.exe +0 -0
  7. data/vendor/local/bin/fc-cat.exe +0 -0
  8. data/vendor/local/bin/fc-list.exe +0 -0
  9. data/vendor/local/bin/fc-match.exe +0 -0
  10. data/vendor/local/bin/fc-pattern.exe +0 -0
  11. data/vendor/local/bin/fc-query.exe +0 -0
  12. data/vendor/local/bin/fc-scan.exe +0 -0
  13. data/vendor/local/bin/fc-validate.exe +0 -0
  14. data/vendor/local/bin/freetype-config +14 -16
  15. data/vendor/local/bin/libcairo-2.dll +0 -0
  16. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  17. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  18. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  19. data/vendor/local/bin/libfreetype-6.dll +0 -0
  20. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  21. data/vendor/local/bin/libpng-config +127 -0
  22. data/vendor/local/bin/libpng16-16.dll +0 -0
  23. data/vendor/local/bin/libpng16-config +127 -0
  24. data/vendor/local/bin/libxml2-2.dll +0 -0
  25. data/vendor/local/bin/xml2-config +106 -0
  26. data/vendor/local/bin/xmlcatalog.exe +0 -0
  27. data/vendor/local/bin/xmllint.exe +0 -0
  28. data/vendor/local/bin/zlib1.dll +0 -0
  29. data/vendor/local/etc/fonts/conf.d/10-scale-bitmap-fonts.conf +81 -0
  30. data/vendor/local/etc/fonts/conf.d/20-unhint-small-vera.conf +48 -0
  31. data/vendor/local/etc/fonts/conf.d/30-metric-aliases.conf +291 -0
  32. data/vendor/local/etc/fonts/conf.d/30-urw-aliases.conf +40 -0
  33. data/vendor/local/etc/fonts/conf.d/40-nonlatin.conf +231 -0
  34. data/vendor/local/etc/fonts/conf.d/45-latin.conf +173 -0
  35. data/vendor/local/etc/fonts/conf.d/49-sansserif.conf +21 -0
  36. data/vendor/local/etc/fonts/conf.d/50-user.conf +15 -0
  37. data/vendor/local/etc/fonts/conf.d/51-local.conf +6 -0
  38. data/vendor/local/etc/fonts/conf.d/60-latin.conf +70 -0
  39. data/vendor/local/etc/fonts/conf.d/65-fonts-persian.conf +419 -0
  40. data/vendor/local/etc/fonts/conf.d/65-nonlatin.conf +196 -0
  41. data/vendor/local/etc/fonts/conf.d/69-unifont.conf +28 -0
  42. data/vendor/local/etc/fonts/conf.d/80-delicious.conf +19 -0
  43. data/vendor/local/etc/fonts/conf.d/90-synthetic.conf +64 -0
  44. data/vendor/local/etc/fonts/conf.d/README +23 -0
  45. data/vendor/local/etc/fonts/fonts.conf +8 -4
  46. data/vendor/local/include/cairo/cairo-features.h +4 -0
  47. data/vendor/local/include/cairo/cairo-ft.h +36 -0
  48. data/vendor/local/include/cairo/cairo-gobject.h +3 -1
  49. data/vendor/local/include/cairo/cairo-pdf.h +4 -4
  50. data/vendor/local/include/cairo/cairo-ps.h +5 -3
  51. data/vendor/local/include/cairo/cairo-script-interpreter.h +7 -0
  52. data/vendor/local/include/cairo/cairo-script.h +98 -0
  53. data/vendor/local/include/cairo/cairo-svg.h +5 -3
  54. data/vendor/local/include/cairo/cairo-version.h +2 -2
  55. data/vendor/local/include/cairo/cairo.h +642 -209
  56. data/vendor/local/include/fontconfig/fcfreetype.h +2 -2
  57. data/vendor/local/include/fontconfig/fcprivate.h +2 -2
  58. data/vendor/local/include/fontconfig/fontconfig.h +59 -19
  59. data/vendor/local/include/freetype2/freetype/config/ftconfig.h +74 -5
  60. data/vendor/local/include/freetype2/freetype/config/ftheader.h +27 -1
  61. data/vendor/local/include/freetype2/freetype/config/ftoption.h +24 -2
  62. data/vendor/local/include/freetype2/freetype/config/ftstdlib.h +2 -2
  63. data/vendor/local/include/freetype2/freetype/freetype.h +46 -16
  64. data/vendor/local/include/freetype2/freetype/ftautoh.h +349 -0
  65. data/vendor/local/include/freetype2/freetype/ftcffdrv.h +150 -0
  66. data/vendor/local/include/freetype2/freetype/ftchapters.h +28 -0
  67. data/vendor/local/include/freetype2/freetype/fterrdef.h +5 -1
  68. data/vendor/local/include/freetype2/freetype/fterrors.h +7 -16
  69. data/vendor/local/include/freetype2/freetype/ftglyph.h +1 -1
  70. data/vendor/local/include/freetype2/freetype/ftimage.h +1 -1
  71. data/vendor/local/include/freetype2/freetype/ftlcdfil.h +38 -0
  72. data/vendor/local/include/freetype2/freetype/ftmodapi.h +156 -5
  73. data/vendor/local/include/freetype2/freetype/ftmoderr.h +51 -13
  74. data/vendor/local/include/freetype2/freetype/ftoutln.h +2 -0
  75. data/vendor/local/include/freetype2/freetype/ftstroke.h +1 -1
  76. data/vendor/local/include/freetype2/freetype/fttrigon.h +5 -5
  77. data/vendor/local/include/freetype2/freetype/fttypes.h +19 -9
  78. data/vendor/local/include/freetype2/freetype/ttnameid.h +5 -15
  79. data/vendor/local/include/freetype2/freetype/tttables.h +14 -1
  80. data/vendor/local/include/libpng16/png.h +3304 -0
  81. data/vendor/local/include/libpng16/pngconf.h +616 -0
  82. data/vendor/local/include/libpng16/pnglibconf.h +209 -0
  83. data/vendor/local/include/libxml2/libxml/DOCBparser.h +96 -0
  84. data/vendor/local/include/libxml2/libxml/HTMLparser.h +306 -0
  85. data/vendor/local/include/libxml2/libxml/HTMLtree.h +147 -0
  86. data/vendor/local/include/libxml2/libxml/SAX.h +173 -0
  87. data/vendor/local/include/libxml2/libxml/SAX2.h +176 -0
  88. data/vendor/local/include/libxml2/libxml/c14n.h +126 -0
  89. data/vendor/local/include/libxml2/libxml/catalog.h +182 -0
  90. data/vendor/local/include/libxml2/libxml/chvalid.h +230 -0
  91. data/vendor/local/include/libxml2/libxml/debugXML.h +217 -0
  92. data/vendor/local/include/libxml2/libxml/dict.h +80 -0
  93. data/vendor/local/include/libxml2/libxml/encoding.h +240 -0
  94. data/vendor/local/include/libxml2/libxml/entities.h +151 -0
  95. data/vendor/local/include/libxml2/libxml/globals.h +502 -0
  96. data/vendor/local/include/libxml2/libxml/hash.h +233 -0
  97. data/vendor/local/include/libxml2/libxml/list.h +137 -0
  98. data/vendor/local/include/libxml2/libxml/nanoftp.h +163 -0
  99. data/vendor/local/include/libxml2/libxml/nanohttp.h +81 -0
  100. data/vendor/local/include/libxml2/libxml/parser.h +1241 -0
  101. data/vendor/local/include/libxml2/libxml/parserInternals.h +644 -0
  102. data/vendor/local/include/libxml2/libxml/pattern.h +100 -0
  103. data/vendor/local/include/libxml2/libxml/relaxng.h +213 -0
  104. data/vendor/local/include/libxml2/libxml/schemasInternals.h +958 -0
  105. data/vendor/local/include/libxml2/libxml/schematron.h +142 -0
  106. data/vendor/local/include/libxml2/libxml/threads.h +84 -0
  107. data/vendor/local/include/libxml2/libxml/tree.h +1303 -0
  108. data/vendor/local/include/libxml2/libxml/uri.h +94 -0
  109. data/vendor/local/include/libxml2/libxml/valid.h +458 -0
  110. data/vendor/local/include/libxml2/libxml/xinclude.h +129 -0
  111. data/vendor/local/include/libxml2/libxml/xlink.h +189 -0
  112. data/vendor/local/include/libxml2/libxml/xmlIO.h +366 -0
  113. data/vendor/local/include/libxml2/libxml/xmlautomata.h +146 -0
  114. data/vendor/local/include/libxml2/libxml/xmlerror.h +945 -0
  115. data/vendor/local/include/libxml2/libxml/xmlexports.h +162 -0
  116. data/vendor/local/include/libxml2/libxml/xmlmemory.h +224 -0
  117. data/vendor/local/include/libxml2/libxml/xmlmodule.h +57 -0
  118. data/vendor/local/include/libxml2/libxml/xmlreader.h +428 -0
  119. data/vendor/local/include/libxml2/libxml/xmlregexp.h +222 -0
  120. data/vendor/local/include/libxml2/libxml/xmlsave.h +88 -0
  121. data/vendor/local/include/libxml2/libxml/xmlschemas.h +246 -0
  122. data/vendor/local/include/libxml2/libxml/xmlschemastypes.h +151 -0
  123. data/vendor/local/include/libxml2/libxml/xmlstring.h +140 -0
  124. data/vendor/local/include/libxml2/libxml/xmlunicode.h +202 -0
  125. data/vendor/local/include/libxml2/libxml/xmlversion.h +489 -0
  126. data/vendor/local/include/libxml2/libxml/xmlwriter.h +488 -0
  127. data/vendor/local/include/libxml2/libxml/xpath.h +557 -0
  128. data/vendor/local/include/libxml2/libxml/xpathInternals.h +632 -0
  129. data/vendor/local/include/libxml2/libxml/xpointer.h +114 -0
  130. data/vendor/local/include/pixman-1/pixman-version.h +50 -0
  131. data/vendor/local/include/pixman-1/pixman.h +1111 -0
  132. data/vendor/local/include/png.h +1993 -1426
  133. data/vendor/local/include/pngconf.h +462 -1398
  134. data/vendor/local/include/pnglibconf.h +209 -0
  135. data/vendor/local/include/zconf.h +141 -91
  136. data/vendor/local/include/zlib.h +273 -94
  137. data/vendor/local/lib/fontconfig.def +11 -1
  138. data/vendor/local/lib/libcairo-gobject.a +0 -0
  139. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  140. data/vendor/local/lib/libcairo-gobject.la +41 -0
  141. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  142. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  143. data/vendor/local/lib/libcairo-script-interpreter.la +41 -0
  144. data/vendor/local/lib/libcairo.a +0 -0
  145. data/vendor/local/lib/libcairo.dll.a +0 -0
  146. data/vendor/local/lib/libcairo.la +41 -0
  147. data/vendor/local/lib/libfontconfig.a +0 -0
  148. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  149. data/vendor/local/lib/libfontconfig.la +41 -0
  150. data/vendor/local/lib/libfreetype.a +0 -0
  151. data/vendor/local/lib/libfreetype.dll.a +0 -0
  152. data/vendor/local/lib/libfreetype.la +41 -0
  153. data/vendor/local/lib/libpixman-1.a +0 -0
  154. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  155. data/vendor/local/lib/libpixman-1.la +41 -0
  156. data/vendor/local/lib/libpng.a +0 -0
  157. data/vendor/local/lib/libpng.dll.a +0 -0
  158. data/vendor/local/lib/libpng.la +41 -0
  159. data/vendor/local/lib/libpng16.a +0 -0
  160. data/vendor/local/lib/libpng16.dll.a +0 -0
  161. data/vendor/local/lib/libpng16.la +41 -0
  162. data/vendor/local/lib/libxml2.a +0 -0
  163. data/vendor/local/lib/libxml2.dll.a +0 -0
  164. data/vendor/local/lib/libxml2.la +41 -0
  165. data/vendor/local/lib/libz.a +0 -0
  166. data/vendor/local/lib/libz.dll.a +0 -0
  167. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  168. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  169. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  170. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  171. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  172. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  173. data/vendor/local/lib/pkgconfig/cairo-script.pc +12 -0
  174. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  175. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  176. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  177. data/vendor/local/lib/pkgconfig/cairo.pc +3 -3
  178. data/vendor/local/lib/pkgconfig/fontconfig.pc +7 -2
  179. data/vendor/local/lib/pkgconfig/freetype2.pc +6 -6
  180. data/vendor/local/lib/pkgconfig/libpng.pc +3 -3
  181. data/vendor/local/lib/pkgconfig/libpng16.pc +11 -0
  182. data/vendor/local/lib/pkgconfig/libxml-2.0.pc +13 -0
  183. data/vendor/local/lib/pkgconfig/pixman-1.pc +11 -0
  184. data/vendor/local/lib/pkgconfig/zlib.pc +13 -0
  185. data/vendor/local/lib/xml2Conf.sh +8 -0
  186. data/vendor/local/share/aclocal/libxml.m4 +188 -0
  187. data/vendor/local/share/doc/libxml2-2.9.1/Copyright +23 -0
  188. data/vendor/local/share/doc/libxml2-2.9.1/examples/testHTML.c +880 -0
  189. data/vendor/local/share/doc/libxml2-2.9.1/examples/testSAX.c +1198 -0
  190. data/vendor/local/share/doc/libxml2-2.9.1/examples/testXPath.c +229 -0
  191. data/vendor/local/share/doc/libxml2-2.9.1/examples/xmllint.c +3776 -0
  192. data/vendor/local/share/doc/libxml2-2.9.1/html/DOM.gif +0 -0
  193. data/vendor/local/share/doc/libxml2-2.9.1/html/FAQ.html +282 -0
  194. data/vendor/local/share/doc/libxml2-2.9.1/html/Libxml2-Logo-180x168.gif +0 -0
  195. data/vendor/local/share/doc/libxml2-2.9.1/html/Libxml2-Logo-90x34.gif +0 -0
  196. data/vendor/local/share/doc/libxml2-2.9.1/html/encoding.html +207 -0
  197. data/vendor/local/share/doc/libxml2-2.9.1/html/examples.xml +751 -0
  198. data/vendor/local/share/doc/libxml2-2.9.1/html/examples.xsl +174 -0
  199. data/vendor/local/share/doc/libxml2-2.9.1/html/html/book1.html +13 -0
  200. data/vendor/local/share/doc/libxml2-2.9.1/html/html/home.png +0 -0
  201. data/vendor/local/share/doc/libxml2-2.9.1/html/html/index.html +13 -0
  202. data/vendor/local/share/doc/libxml2-2.9.1/html/html/left.png +0 -0
  203. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-DOCBparser.html +51 -0
  204. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-HTMLparser.html +184 -0
  205. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-HTMLtree.html +73 -0
  206. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-SAX.html +125 -0
  207. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-SAX2.html +128 -0
  208. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-c14n.html +38 -0
  209. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-catalog.html +142 -0
  210. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-chvalid.html +72 -0
  211. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-debugXML.html +120 -0
  212. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-dict.html +58 -0
  213. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-encoding.html +124 -0
  214. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-entities.html +79 -0
  215. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-globals.html +152 -0
  216. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-hash.html +116 -0
  217. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-lib.html +13 -0
  218. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-list.html +120 -0
  219. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-nanoftp.html +94 -0
  220. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-nanohttp.html +65 -0
  221. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-parser.html +559 -0
  222. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-parserInternals.html +322 -0
  223. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-pattern.html +76 -0
  224. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-relaxng.html +162 -0
  225. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-schemasInternals.html +373 -0
  226. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-schematron.html +81 -0
  227. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-threads.html +72 -0
  228. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-tree.html +990 -0
  229. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-uri.html +73 -0
  230. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-valid.html +289 -0
  231. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xinclude.html +59 -0
  232. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xlink.html +82 -0
  233. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlIO.html +212 -0
  234. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlautomata.html +85 -0
  235. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlerror.html +865 -0
  236. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlexports.html +20 -0
  237. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlmemory.html +107 -0
  238. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlmodule.html +38 -0
  239. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlreader.html +330 -0
  240. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlregexp.html +143 -0
  241. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlsave.html +60 -0
  242. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlschemas.html +185 -0
  243. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlschemastypes.html +123 -0
  244. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlstring.html +108 -0
  245. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlunicode.html +512 -0
  246. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlversion.html +63 -0
  247. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xmlwriter.html +261 -0
  248. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xpath.html +316 -0
  249. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xpathInternals.html +394 -0
  250. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xpointer.html +83 -0
  251. data/vendor/local/share/doc/libxml2-2.9.1/html/html/libxml-xzlib.html +16 -0
  252. data/vendor/local/share/doc/libxml2-2.9.1/html/html/right.png +0 -0
  253. data/vendor/local/share/doc/libxml2-2.9.1/html/html/up.png +0 -0
  254. data/vendor/local/share/doc/libxml2-2.9.1/html/index.html +14 -0
  255. data/vendor/local/share/doc/libxml2-2.9.1/html/io1.c +166 -0
  256. data/vendor/local/share/doc/libxml2-2.9.1/html/io1.res +5 -0
  257. data/vendor/local/share/doc/libxml2-2.9.1/html/io2.c +58 -0
  258. data/vendor/local/share/doc/libxml2-2.9.1/html/io2.res +2 -0
  259. data/vendor/local/share/doc/libxml2-2.9.1/html/libxml.gif +0 -0
  260. data/vendor/local/share/doc/libxml2-2.9.1/html/parse1.c +56 -0
  261. data/vendor/local/share/doc/libxml2-2.9.1/html/parse2.c +72 -0
  262. data/vendor/local/share/doc/libxml2-2.9.1/html/parse3.c +60 -0
  263. data/vendor/local/share/doc/libxml2-2.9.1/html/parse4.c +143 -0
  264. data/vendor/local/share/doc/libxml2-2.9.1/html/reader1.c +107 -0
  265. data/vendor/local/share/doc/libxml2-2.9.1/html/reader1.res +14 -0
  266. data/vendor/local/share/doc/libxml2-2.9.1/html/reader2.c +122 -0
  267. data/vendor/local/share/doc/libxml2-2.9.1/html/reader3.c +120 -0
  268. data/vendor/local/share/doc/libxml2-2.9.1/html/reader3.res +13 -0
  269. data/vendor/local/share/doc/libxml2-2.9.1/html/reader4.c +122 -0
  270. data/vendor/local/share/doc/libxml2-2.9.1/html/reader4.res +3 -0
  271. data/vendor/local/share/doc/libxml2-2.9.1/html/redhat.gif +0 -0
  272. data/vendor/local/share/doc/libxml2-2.9.1/html/smallfootonly.gif +0 -0
  273. data/vendor/local/share/doc/libxml2-2.9.1/html/structure.gif +0 -0
  274. data/vendor/local/share/doc/libxml2-2.9.1/html/test1.xml +1 -0
  275. data/vendor/local/share/doc/libxml2-2.9.1/html/test2.xml +13 -0
  276. data/vendor/local/share/doc/libxml2-2.9.1/html/test3.xml +39 -0
  277. data/vendor/local/share/doc/libxml2-2.9.1/html/testWriter.c +1198 -0
  278. data/vendor/local/share/doc/libxml2-2.9.1/html/tree1.c +94 -0
  279. data/vendor/local/share/doc/libxml2-2.9.1/html/tree1.res +4 -0
  280. data/vendor/local/share/doc/libxml2-2.9.1/html/tree2.c +118 -0
  281. data/vendor/local/share/doc/libxml2-2.9.1/html/tree2.res +18 -0
  282. data/vendor/local/share/doc/libxml2-2.9.1/html/tst.xml +7 -0
  283. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apa.html +8 -0
  284. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apb.html +14 -0
  285. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apc.html +82 -0
  286. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apd.html +76 -0
  287. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ape.html +78 -0
  288. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apf.html +67 -0
  289. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/apg.html +75 -0
  290. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/aph.html +76 -0
  291. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/api.html +4 -0
  292. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s02.html +14 -0
  293. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s03.html +47 -0
  294. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s04.html +54 -0
  295. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s05.html +55 -0
  296. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s06.html +35 -0
  297. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s07.html +30 -0
  298. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s08.html +38 -0
  299. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ar01s09.html +63 -0
  300. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/blank.png +0 -0
  301. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/1.png +0 -0
  302. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/10.png +0 -0
  303. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/2.png +0 -0
  304. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/3.png +0 -0
  305. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/4.png +0 -0
  306. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/5.png +0 -0
  307. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/6.png +0 -0
  308. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/7.png +0 -0
  309. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/8.png +0 -0
  310. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/callouts/9.png +0 -0
  311. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/caution.png +0 -0
  312. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/draft.png +0 -0
  313. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/home.png +0 -0
  314. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/important.png +0 -0
  315. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/next.png +0 -0
  316. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/note.png +0 -0
  317. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/prev.png +0 -0
  318. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/tip.png +0 -0
  319. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/toc-blank.png +0 -0
  320. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/toc-minus.png +0 -0
  321. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/toc-plus.png +0 -0
  322. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/up.png +0 -0
  323. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/images/warning.png +0 -0
  324. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includeaddattribute.c +64 -0
  325. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includeaddkeyword.c +75 -0
  326. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includeconvert.c +73 -0
  327. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includegetattribute.c +72 -0
  328. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includekeyword.c +79 -0
  329. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/includexpath.c +74 -0
  330. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/index.html +14 -0
  331. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/ix01.html +1 -0
  332. data/vendor/local/share/doc/libxml2-2.9.1/html/tutorial/xmltutorial.pdf +1336 -0
  333. data/vendor/local/share/doc/libxml2-2.9.1/html/w3c.png +0 -0
  334. data/vendor/local/share/doc/libxml2-2.9.1/html/writer.xml +2 -0
  335. data/vendor/local/share/doc/libxml2-2.9.1/html/xml.html +5715 -0
  336. data/vendor/local/share/doc/libxml2-2.9.1/html/xpath1.c +250 -0
  337. data/vendor/local/share/doc/libxml2-2.9.1/html/xpath1.res +5 -0
  338. data/vendor/local/share/doc/libxml2-2.9.1/html/xpath2.c +190 -0
  339. data/vendor/local/share/doc/libxml2-2.9.1/html/xpath2.res +30 -0
  340. data/vendor/local/share/fontconfig/conf.avail/10-autohint.conf +14 -0
  341. data/vendor/local/share/fontconfig/conf.avail/10-no-sub-pixel.conf +14 -0
  342. data/vendor/local/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf +81 -0
  343. data/vendor/local/share/fontconfig/conf.avail/10-sub-pixel-bgr.conf +14 -0
  344. data/vendor/local/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf +14 -0
  345. data/vendor/local/share/fontconfig/conf.avail/10-sub-pixel-vbgr.conf +14 -0
  346. data/vendor/local/share/fontconfig/conf.avail/10-sub-pixel-vrgb.conf +14 -0
  347. data/vendor/local/share/fontconfig/conf.avail/10-unhinted.conf +14 -0
  348. data/vendor/local/share/fontconfig/conf.avail/11-lcdfilter-default.conf +16 -0
  349. data/vendor/local/share/fontconfig/conf.avail/11-lcdfilter-legacy.conf +16 -0
  350. data/vendor/local/share/fontconfig/conf.avail/11-lcdfilter-light.conf +16 -0
  351. data/vendor/local/share/fontconfig/conf.avail/20-unhint-small-vera.conf +48 -0
  352. data/vendor/local/share/fontconfig/conf.avail/25-unhint-nonlatin.conf +128 -0
  353. data/vendor/local/share/fontconfig/conf.avail/30-metric-aliases.conf +291 -0
  354. data/vendor/local/share/fontconfig/conf.avail/30-urw-aliases.conf +40 -0
  355. data/vendor/local/share/fontconfig/conf.avail/40-nonlatin.conf +231 -0
  356. data/vendor/local/share/fontconfig/conf.avail/45-latin.conf +173 -0
  357. data/vendor/local/share/fontconfig/conf.avail/49-sansserif.conf +21 -0
  358. data/vendor/local/share/fontconfig/conf.avail/50-user.conf +15 -0
  359. data/vendor/local/share/fontconfig/conf.avail/51-local.conf +6 -0
  360. data/vendor/local/share/fontconfig/conf.avail/60-latin.conf +70 -0
  361. data/vendor/local/share/fontconfig/conf.avail/65-fonts-persian.conf +419 -0
  362. data/vendor/local/share/fontconfig/conf.avail/65-khmer.conf +16 -0
  363. data/vendor/local/share/fontconfig/conf.avail/65-nonlatin.conf +196 -0
  364. data/vendor/local/share/fontconfig/conf.avail/69-unifont.conf +28 -0
  365. data/vendor/local/share/fontconfig/conf.avail/70-no-bitmaps.conf +12 -0
  366. data/vendor/local/share/fontconfig/conf.avail/70-yes-bitmaps.conf +12 -0
  367. data/vendor/local/share/fontconfig/conf.avail/80-delicious.conf +19 -0
  368. data/vendor/local/share/fontconfig/conf.avail/90-synthetic.conf +64 -0
  369. data/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +10 -10
  370. data/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +4 -4
  371. data/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +4 -4
  372. data/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +4 -4
  373. data/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +4 -4
  374. data/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +17 -4
  375. data/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +6 -6
  376. data/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +7 -7
  377. data/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +6 -6
  378. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +54 -38
  379. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +193 -61
  380. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +95 -89
  381. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +45 -66
  382. data/vendor/local/share/gtk-doc/html/cairo/cairo-PNG-Support.html +58 -63
  383. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +249 -232
  384. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +118 -113
  385. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html +20 -24
  386. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +51 -45
  387. data/vendor/local/share/gtk-doc/html/cairo/cairo-Raster-Sources.html +600 -0
  388. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +73 -35
  389. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +102 -126
  390. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +42 -58
  391. data/vendor/local/share/gtk-doc/html/cairo/cairo-Script-Surfaces.html +360 -0
  392. data/vendor/local/share/gtk-doc/html/cairo/cairo-Transformations.html +57 -73
  393. data/vendor/local/share/gtk-doc/html/cairo/cairo-Types.html +37 -30
  394. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +91 -129
  395. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +53 -61
  396. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +47 -57
  397. data/vendor/local/share/gtk-doc/html/cairo/cairo-XCB-Surfaces.html +535 -0
  398. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +148 -83
  399. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +170 -0
  400. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +127 -96
  401. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +55 -59
  402. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +96 -87
  403. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +64 -79
  404. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +1069 -229
  405. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +274 -220
  406. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +395 -216
  407. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +409 -409
  408. data/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +7 -4
  409. data/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +6 -6
  410. data/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +7 -9
  411. data/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +13 -4
  412. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +128 -165
  413. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +326 -249
  414. data/vendor/local/share/gtk-doc/html/cairo/index-1.10.html +29 -8
  415. data/vendor/local/share/gtk-doc/html/cairo/index-1.12.html +193 -0
  416. data/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +19 -4
  417. data/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +4 -15
  418. data/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +32 -7
  419. data/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +15 -4
  420. data/vendor/local/share/gtk-doc/html/cairo/index-all.html +140 -27
  421. data/vendor/local/share/gtk-doc/html/cairo/index.html +18 -8
  422. data/vendor/local/share/gtk-doc/html/cairo/index.sgml +104 -13
  423. data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +7 -7
  424. data/vendor/local/share/gtk-doc/html/cairo/style.css +2 -1
  425. data/vendor/local/share/gtk-doc/html/libxml2/general.html +38 -0
  426. data/vendor/local/share/gtk-doc/html/libxml2/home.png +0 -0
  427. data/vendor/local/share/gtk-doc/html/libxml2/index.html +67 -0
  428. data/vendor/local/share/gtk-doc/html/libxml2/left.png +0 -0
  429. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-DOCBparser.html +138 -0
  430. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-HTMLparser.html +373 -0
  431. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-HTMLtree.html +172 -0
  432. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-SAX.html +243 -0
  433. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-SAX2.html +247 -0
  434. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-c14n.html +91 -0
  435. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-catalog.html +278 -0
  436. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-chvalid.html +241 -0
  437. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-debugXML.html +225 -0
  438. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-dict.html +134 -0
  439. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-encoding.html +218 -0
  440. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-entities.html +166 -0
  441. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-globals.html +383 -0
  442. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-hash.html +214 -0
  443. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-list.html +226 -0
  444. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-nanoftp.html +187 -0
  445. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-nanohttp.html +142 -0
  446. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-parser.html +766 -0
  447. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-parserInternals.html +688 -0
  448. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-pattern.html +166 -0
  449. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-relaxng.html +278 -0
  450. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-schemasInternals.html +860 -0
  451. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-schematron.html +166 -0
  452. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-threads.html +161 -0
  453. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-tree.html +1597 -0
  454. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-uri.html +154 -0
  455. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-valid.html +528 -0
  456. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xinclude.html +169 -0
  457. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xlink.html +160 -0
  458. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlIO.html +347 -0
  459. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlautomata.html +176 -0
  460. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlerror.html +953 -0
  461. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlexports.html +87 -0
  462. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlmemory.html +186 -0
  463. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlmodule.html +97 -0
  464. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlreader.html +565 -0
  465. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlregexp.html +280 -0
  466. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlsave.html +133 -0
  467. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlschemas.html +314 -0
  468. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlschemastypes.html +237 -0
  469. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlstring.html +217 -0
  470. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlunicode.html +887 -0
  471. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlversion.html +292 -0
  472. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlwriter.html +479 -0
  473. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpath.html +542 -0
  474. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpathInternals.html +787 -0
  475. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpointer.html +171 -0
  476. data/vendor/local/share/gtk-doc/html/libxml2/libxml2.devhelp +3573 -0
  477. data/vendor/local/share/gtk-doc/html/libxml2/right.png +0 -0
  478. data/vendor/local/share/gtk-doc/html/libxml2/style.css +66 -0
  479. data/vendor/local/share/gtk-doc/html/libxml2/up.png +0 -0
  480. data/vendor/local/share/license/cairo/AUTHORS +111 -0
  481. data/vendor/local/share/{doc/cairo_1.10.2-2_win32 → license/cairo}/COPYING +0 -0
  482. data/vendor/local/share/{doc/cairo_1.10.2-2_win32 → license/cairo}/COPYING-LGPL-2.1 +0 -0
  483. data/vendor/local/share/{doc/cairo_1.10.2-2_win32 → license/cairo}/COPYING-MPL-1.1 +0 -0
  484. data/vendor/local/share/license/cairo/README +194 -0
  485. data/vendor/local/share/license/cairo/README.win32 +66 -0
  486. data/vendor/local/share/license/fontconfig/AUTHORS +3 -0
  487. data/vendor/local/share/license/fontconfig/COPYING +28 -0
  488. data/vendor/local/share/license/fontconfig/README +1350 -0
  489. data/vendor/local/share/license/freetype/README +83 -0
  490. data/vendor/local/share/license/freetype/README.git +46 -0
  491. data/vendor/local/share/license/libpng/README +202 -0
  492. data/vendor/local/share/license/libxml2/AUTHORS +5 -0
  493. data/vendor/local/share/license/libxml2/COPYING +23 -0
  494. data/vendor/local/share/license/libxml2/README +39 -0
  495. data/vendor/local/share/license/libxml2/README.tests +39 -0
  496. data/vendor/local/share/license/pixman/AUTHORS +0 -0
  497. data/vendor/local/share/license/pixman/COPYING +42 -0
  498. data/vendor/local/share/license/pixman/README +116 -0
  499. data/vendor/local/share/license/zlib/README +115 -0
  500. data/vendor/local/share/man/man1/xml2-config.1 +30 -0
  501. data/vendor/local/share/man/man1/xmlcatalog.1 +340 -0
  502. data/vendor/local/share/man/man1/xmllint.1 +650 -0
  503. data/vendor/local/share/man/man3/libpng.3 +2332 -863
  504. data/vendor/local/share/man/man3/libpngpf.3 +6 -790
  505. data/vendor/local/share/man/man3/libxml.3 +71 -0
  506. data/vendor/local/share/man/man5/png.5 +1 -1
  507. data/vendor/local/share/xml/fontconfig/fonts.dtd +233 -0
  508. metadata +447 -490
  509. data/vendor/local/bin/freetype6.dll +0 -0
  510. data/vendor/local/bin/libexpat-1.dll +0 -0
  511. data/vendor/local/bin/libpng14-14.dll +0 -0
  512. data/vendor/local/bin/xmlwf.exe +0 -0
  513. data/vendor/local/etc/fonts/fonts.dtd +0 -224
  514. data/vendor/local/include/expat.h +0 -1047
  515. data/vendor/local/include/expat_external.h +0 -115
  516. data/vendor/local/include/libpng14/png.h +0 -2737
  517. data/vendor/local/include/libpng14/pngconf.h +0 -1552
  518. data/vendor/local/lib/cairo.def +0 -322
  519. data/vendor/local/lib/cairo.lib +0 -0
  520. data/vendor/local/lib/expat.lib +0 -0
  521. data/vendor/local/lib/fontconfig.lib +0 -0
  522. data/vendor/local/lib/freetype.def +0 -189
  523. data/vendor/local/lib/freetype.lib +0 -0
  524. data/vendor/local/lib/libexpat.def +0 -73
  525. data/vendor/local/lib/libexpat.dll.a +0 -0
  526. data/vendor/local/lib/libpng.def +0 -192
  527. data/vendor/local/lib/libpng.lib +0 -0
  528. data/vendor/local/lib/libpng14.dll.a +0 -0
  529. data/vendor/local/lib/pkgconfig/libpng14.pc +0 -11
  530. data/vendor/local/lib/zdll.lib +0 -0
  531. data/vendor/local/lib/zlib.def +0 -67
  532. data/vendor/local/manifest/cairo-dev_1.10.2-2_win32.mft +0 -86
  533. data/vendor/local/manifest/cairo_1.10.2-2_win32.mft +0 -7
  534. data/vendor/local/manifest/expat-dev_2.1.0-1_win32.mft +0 -10
  535. data/vendor/local/manifest/expat_2.1.0-1_win32.mft +0 -2
  536. data/vendor/local/manifest/fontconfig-dev_2.8.0-2_win32.mft +0 -387
  537. data/vendor/local/manifest/fontconfig_2.8.0-2_win32.mft +0 -3
  538. data/vendor/local/manifest/freetype-dev_2.4.10-1_win32.mft +0 -57
  539. data/vendor/local/manifest/freetype_2.4.10-1_win32.mft +0 -2
  540. data/vendor/local/manifest/libpng-dev_1.4.12-1_win32.mft +0 -15
  541. data/vendor/local/manifest/libpng_1.4.12-1_win32.mft +0 -2
  542. data/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +0 -8
  543. data/vendor/local/manifest/zlib_1.2.5-2_win32.mft +0 -2
  544. data/vendor/local/share/doc/fontconfig/fontconfig-devel.pdf +4 -42484
  545. data/vendor/local/share/doc/fontconfig/fontconfig-devel.txt +0 -5046
  546. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomiccreate.html +0 -224
  547. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicdeletenew.html +0 -216
  548. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicdestroy.html +0 -210
  549. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomiclock.html +0 -223
  550. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicnewfile.html +0 -222
  551. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicorigfile.html +0 -221
  552. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicreplaceorig.html +0 -223
  553. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicunlock.html +0 -216
  554. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksadd.html +0 -222
  555. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblankscreate.html +0 -216
  556. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksdestroy.html +0 -216
  557. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksismember.html +0 -211
  558. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachecopyset.html +0 -228
  559. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachedir.html +0 -221
  560. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachenumfont.html +0 -211
  561. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachenumsubdir.html +0 -221
  562. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachesubdir.html +0 -244
  563. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetaddchar.html +0 -226
  564. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcopy.html +0 -227
  565. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcount.html +0 -221
  566. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcoverage.html +0 -249
  567. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcreate.html +0 -220
  568. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetdestroy.html +0 -226
  569. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetequal.html +0 -232
  570. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetfirstpage.html +0 -238
  571. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsethaschar.html +0 -231
  572. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetintersect.html +0 -232
  573. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetintersectcount.html +0 -231
  574. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetissubset.html +0 -231
  575. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetmerge.html +0 -261
  576. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetnew.html +0 -208
  577. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetnextpage.html +0 -243
  578. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetsubtract.html +0 -231
  579. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetsubtractcount.html +0 -231
  580. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetunion.html +0 -231
  581. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontadddir.html +0 -229
  582. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontaddfile.html +0 -228
  583. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontclear.html +0 -222
  584. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigbuildfonts.html +0 -224
  585. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigcreate.html +0 -216
  586. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigdestroy.html +0 -219
  587. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigenablehome.html +0 -230
  588. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigfilename.html +0 -237
  589. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetblanks.html +0 -225
  590. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcache.html +0 -217
  591. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcachedirs.html +0 -227
  592. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetconfigdirs.html +0 -228
  593. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetconfigfiles.html +0 -227
  594. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcurrent.html +0 -216
  595. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetfontdirs.html +0 -229
  596. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetfonts.html +0 -234
  597. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetrescaninterval.html +0 -230
  598. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfighome.html +0 -221
  599. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigparseandload.html +0 -220
  600. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigreference.html +0 -231
  601. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsetcurrent.html +0 -222
  602. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsetrescaninterval.html +0 -229
  603. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsubstitute.html +0 -233
  604. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsubstitutewithpat.html +0 -251
  605. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiguptodate.html +0 -228
  606. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdefaultsubstitute.html +0 -234
  607. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheload.html +0 -239
  608. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheloadfile.html +0 -233
  609. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheread.html +0 -239
  610. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheunlink.html +0 -239
  611. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheunload.html +0 -211
  612. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircachevalid.html +0 -222
  613. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdirsave.html +0 -245
  614. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdirscan.html +0 -266
  615. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfileisdir.html +0 -222
  616. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfilescan.html +0 -276
  617. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfini.html +0 -219
  618. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontlist.html +0 -244
  619. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontmatch.html +0 -262
  620. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontrenderprepare.html +0 -259
  621. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetadd.html +0 -223
  622. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetcreate.html +0 -216
  623. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetdestroy.html +0 -217
  624. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetlist.html +0 -261
  625. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetmatch.html +0 -273
  626. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetprint.html +0 -224
  627. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetsort.html +0 -303
  628. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetsortdestroy.html +0 -222
  629. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsort.html +0 -289
  630. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharindex.html +0 -226
  631. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharset.html +0 -225
  632. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharsetandspacing.html +0 -241
  633. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypequery.html +0 -233
  634. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypequeryface.html +0 -222
  635. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcgetlangs.html +0 -216
  636. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcgetversion.html +0 -216
  637. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinit.html +0 -219
  638. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitbringuptodate.html +0 -208
  639. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitloadconfig.html +0 -217
  640. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitloadconfigandfonts.html +0 -217
  641. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitreinitialize.html +0 -219
  642. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcislower.html +0 -222
  643. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcisupper.html +0 -222
  644. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclanggetcharset.html +0 -205
  645. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetadd.html +0 -239
  646. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcompare.html +0 -239
  647. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcontains.html +0 -259
  648. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcopy.html +0 -225
  649. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcreate.html +0 -219
  650. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetdestroy.html +0 -220
  651. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetequal.html +0 -232
  652. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetgetlangs.html +0 -221
  653. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsethash.html +0 -233
  654. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsethaslang.html +0 -255
  655. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixcopy.html +0 -225
  656. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixequal.html +0 -236
  657. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixinit.html +0 -225
  658. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixmultiply.html +0 -246
  659. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixrotate.html +0 -261
  660. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixscale.html +0 -261
  661. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixshear.html +0 -250
  662. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameconstant.html +0 -221
  663. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnamegetconstant.html +0 -221
  664. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnamegetobjecttype.html +0 -210
  665. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameparse.html +0 -221
  666. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameregisterconstants.html +0 -228
  667. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameregisterobjecttypes.html +0 -228
  668. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunparse.html +0 -218
  669. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunregisterconstants.html +0 -228
  670. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunregisterobjecttypes.html +0 -226
  671. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetadd.html +0 -222
  672. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetbuild.html +0 -262
  673. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetcreate.html +0 -216
  674. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetdestroy.html +0 -216
  675. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternadd-type.html +0 -404
  676. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternadd.html +0 -240
  677. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternaddweak.html +0 -242
  678. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternbuild.html +0 -313
  679. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterncreate.html +0 -216
  680. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterndel.html +0 -222
  681. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterndestroy.html +0 -217
  682. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternduplicate.html +0 -223
  683. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternequal.html +0 -231
  684. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternequalsubset.html +0 -242
  685. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternfilter.html +0 -244
  686. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternformat.html +0 -602
  687. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternget-type.html +0 -435
  688. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternget.html +0 -249
  689. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternhash.html +0 -217
  690. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternprint.html +0 -218
  691. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternreference.html +0 -222
  692. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternremove.html +0 -227
  693. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrbasename.html +0 -212
  694. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcmp.html +0 -232
  695. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcmpignorecase.html +0 -233
  696. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcopy.html +0 -226
  697. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcopyfilename.html +0 -234
  698. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrdirname.html +0 -223
  699. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrdowncase.html +0 -222
  700. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrfree.html +0 -217
  701. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistcreate.html +0 -221
  702. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistdone.html +0 -210
  703. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistnext.html +0 -221
  704. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrplus.html +0 -233
  705. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetadd.html +0 -231
  706. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetaddfilename.html +0 -233
  707. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetcreate.html +0 -216
  708. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetdel.html +0 -237
  709. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetdestroy.html +0 -221
  710. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetequal.html +0 -233
  711. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetmember.html +0 -232
  712. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrstr.html +0 -244
  713. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrstrignorecase.html +0 -244
  714. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fctolower.html +0 -222
  715. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcucs4toutf8.html +0 -233
  716. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf16len.html +0 -278
  717. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf16toucs4.html +0 -265
  718. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf8len.html +0 -261
  719. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf8toucs4.html +0 -249
  720. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvaluedestroy.html +0 -222
  721. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvalueequal.html +0 -212
  722. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvalueprint.html +0 -223
  723. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvaluesave.html +0 -227
  724. data/vendor/local/share/doc/fontconfig/fontconfig-devel/ln12.html +0 -128
  725. data/vendor/local/share/doc/fontconfig/fontconfig-devel/t1.html +0 -133
  726. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x102.html +0 -1463
  727. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x19.html +0 -264
  728. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x31.html +0 -590
  729. data/vendor/local/share/doc/fontconfig/fontconfig-user.html +0 -1352
  730. data/vendor/local/share/doc/fontconfig/fontconfig-user.pdf +0 -0
  731. data/vendor/local/share/doc/fontconfig/fontconfig-user.txt +0 -644
  732. data/vendor/local/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -340
  733. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +0 -477
  734. data/vendor/local/share/man/man1/fc-cache.1 +0 -70
  735. data/vendor/local/share/man/man1/fc-cat.1 +0 -44
  736. data/vendor/local/share/man/man1/fc-list.1 +0 -72
  737. data/vendor/local/share/man/man1/fc-match.1 +0 -73
  738. data/vendor/local/share/man/man1/fc-query.1 +0 -57
  739. data/vendor/local/share/man/man1/fc-scan.1 +0 -52
  740. data/vendor/local/share/man/man1/xmlwf.1 +0 -251
  741. data/vendor/local/share/man/man3/FcAtomicCreate.3 +0 -19
  742. data/vendor/local/share/man/man3/FcAtomicDeleteNew.3 +0 -16
  743. data/vendor/local/share/man/man3/FcAtomicDestroy.3 +0 -16
  744. data/vendor/local/share/man/man3/FcAtomicLock.3 +0 -18
  745. data/vendor/local/share/man/man3/FcAtomicNewFile.3 +0 -17
  746. data/vendor/local/share/man/man3/FcAtomicOrigFile.3 +0 -16
  747. data/vendor/local/share/man/man3/FcAtomicReplaceOrig.3 +0 -18
  748. data/vendor/local/share/man/man3/FcAtomicUnlock.3 +0 -16
  749. data/vendor/local/share/man/man3/FcBlanksAdd.3 +0 -18
  750. data/vendor/local/share/man/man3/FcBlanksCreate.3 +0 -16
  751. data/vendor/local/share/man/man3/FcBlanksDestroy.3 +0 -16
  752. data/vendor/local/share/man/man3/FcBlanksIsMember.3 +0 -18
  753. data/vendor/local/share/man/man3/FcCacheCopySet.3 +0 -18
  754. data/vendor/local/share/man/man3/FcCacheDir.3 +0 -16
  755. data/vendor/local/share/man/man3/FcCacheNumFont.3 +0 -17
  756. data/vendor/local/share/man/man3/FcCacheNumSubdir.3 +0 -16
  757. data/vendor/local/share/man/man3/FcCacheSubdir.3 +0 -20
  758. data/vendor/local/share/man/man3/FcCharSetAddChar.3 +0 -19
  759. data/vendor/local/share/man/man3/FcCharSetCopy.3 +0 -17
  760. data/vendor/local/share/man/man3/FcCharSetCount.3 +0 -16
  761. data/vendor/local/share/man/man3/FcCharSetCoverage.3 +0 -23
  762. data/vendor/local/share/man/man3/FcCharSetCreate.3 +0 -17
  763. data/vendor/local/share/man/man3/FcCharSetDestroy.3 +0 -18
  764. data/vendor/local/share/man/man3/FcCharSetEqual.3 +0 -18
  765. data/vendor/local/share/man/man3/FcCharSetFirstPage.3 +0 -20
  766. data/vendor/local/share/man/man3/FcCharSetHasChar.3 +0 -17
  767. data/vendor/local/share/man/man3/FcCharSetIntersect.3 +0 -18
  768. data/vendor/local/share/man/man3/FcCharSetIntersectCount.3 +0 -17
  769. data/vendor/local/share/man/man3/FcCharSetIsSubset.3 +0 -17
  770. data/vendor/local/share/man/man3/FcCharSetMerge.3 +0 -23
  771. data/vendor/local/share/man/man3/FcCharSetNew.3 +0 -16
  772. data/vendor/local/share/man/man3/FcCharSetNextPage.3 +0 -20
  773. data/vendor/local/share/man/man3/FcCharSetSubtract.3 +0 -17
  774. data/vendor/local/share/man/man3/FcCharSetSubtractCount.3 +0 -17
  775. data/vendor/local/share/man/man3/FcCharSetUnion.3 +0 -17
  776. data/vendor/local/share/man/man3/FcConfigAppFontAddDir.3 +0 -20
  777. data/vendor/local/share/man/man3/FcConfigAppFontAddFile.3 +0 -19
  778. data/vendor/local/share/man/man3/FcConfigAppFontClear.3 +0 -17
  779. data/vendor/local/share/man/man3/FcConfigBuildFonts.3 +0 -19
  780. data/vendor/local/share/man/man3/FcConfigCreate.3 +0 -16
  781. data/vendor/local/share/man/man3/FcConfigDestroy.3 +0 -19
  782. data/vendor/local/share/man/man3/FcConfigEnableHome.3 +0 -20
  783. data/vendor/local/share/man/man3/FcConfigFilename.3 +0 -26
  784. data/vendor/local/share/man/man3/FcConfigGetBlanks.3 +0 -20
  785. data/vendor/local/share/man/man3/FcConfigGetCache.3 +0 -17
  786. data/vendor/local/share/man/man3/FcConfigGetCacheDirs.3 +0 -19
  787. data/vendor/local/share/man/man3/FcConfigGetConfigDirs.3 +0 -18
  788. data/vendor/local/share/man/man3/FcConfigGetConfigFiles.3 +0 -17
  789. data/vendor/local/share/man/man3/FcConfigGetCurrent.3 +0 -16
  790. data/vendor/local/share/man/man3/FcConfigGetFontDirs.3 +0 -19
  791. data/vendor/local/share/man/man3/FcConfigGetFonts.3 +0 -20
  792. data/vendor/local/share/man/man3/FcConfigGetRescanInterval.3 +0 -20
  793. data/vendor/local/share/man/man3/FcConfigHome.3 +0 -18
  794. data/vendor/local/share/man/man3/FcConfigParseAndLoad.3 +0 -23
  795. data/vendor/local/share/man/man3/FcConfigReference.3 +0 -21
  796. data/vendor/local/share/man/man3/FcConfigSetCurrent.3 +0 -17
  797. data/vendor/local/share/man/man3/FcConfigSetRescanInterval.3 +0 -20
  798. data/vendor/local/share/man/man3/FcConfigSubstitute.3 +0 -20
  799. data/vendor/local/share/man/man3/FcConfigSubstituteWithPat.3 +0 -24
  800. data/vendor/local/share/man/man3/FcConfigUptoDate.3 +0 -18
  801. data/vendor/local/share/man/man3/FcDefaultSubstitute.3 +0 -27
  802. data/vendor/local/share/man/man3/FcDirCacheLoad.3 +0 -21
  803. data/vendor/local/share/man/man3/FcDirCacheLoadFile.3 +0 -19
  804. data/vendor/local/share/man/man3/FcDirCacheRead.3 +0 -21
  805. data/vendor/local/share/man/man3/FcDirCacheUnlink.3 +0 -20
  806. data/vendor/local/share/man/man3/FcDirCacheUnload.3 +0 -17
  807. data/vendor/local/share/man/man3/FcDirCacheValid.3 +0 -17
  808. data/vendor/local/share/man/man3/FcDirSave.3 +0 -22
  809. data/vendor/local/share/man/man3/FcDirScan.3 +0 -26
  810. data/vendor/local/share/man/man3/FcFileIsDir.3 +0 -17
  811. data/vendor/local/share/man/man3/FcFileScan.3 +0 -31
  812. data/vendor/local/share/man/man3/FcFini.3 +0 -19
  813. data/vendor/local/share/man/man3/FcFontList.3 +0 -21
  814. data/vendor/local/share/man/man3/FcFontMatch.3 +0 -25
  815. data/vendor/local/share/man/man3/FcFontRenderPrepare.3 +0 -21
  816. data/vendor/local/share/man/man3/FcFontSetAdd.3 +0 -19
  817. data/vendor/local/share/man/man3/FcFontSetCreate.3 +0 -16
  818. data/vendor/local/share/man/man3/FcFontSetDestroy.3 +0 -17
  819. data/vendor/local/share/man/man3/FcFontSetList.3 +0 -25
  820. data/vendor/local/share/man/man3/FcFontSetMatch.3 +0 -28
  821. data/vendor/local/share/man/man3/FcFontSetPrint.3 +0 -19
  822. data/vendor/local/share/man/man3/FcFontSetSort.3 +0 -39
  823. data/vendor/local/share/man/man3/FcFontSetSortDestroy.3 +0 -19
  824. data/vendor/local/share/man/man3/FcFontSort.3 +0 -33
  825. data/vendor/local/share/man/man3/FcFreeTypeCharIndex.3 +0 -22
  826. data/vendor/local/share/man/man3/FcFreeTypeCharSet.3 +0 -21
  827. data/vendor/local/share/man/man3/FcFreeTypeCharSetAndSpacing.3 +0 -28
  828. data/vendor/local/share/man/man3/FcFreeTypeQuery.3 +0 -21
  829. data/vendor/local/share/man/man3/FcFreeTypeQueryFace.3 +0 -21
  830. data/vendor/local/share/man/man3/FcGetLangs.3 +0 -16
  831. data/vendor/local/share/man/man3/FcGetVersion.3 +0 -16
  832. data/vendor/local/share/man/man3/FcInit.3 +0 -19
  833. data/vendor/local/share/man/man3/FcInitBringUptoDate.3 +0 -19
  834. data/vendor/local/share/man/man3/FcInitLoadConfig.3 +0 -17
  835. data/vendor/local/share/man/man3/FcInitLoadConfigAndFonts.3 +0 -17
  836. data/vendor/local/share/man/man3/FcInitReinitialize.3 +0 -19
  837. data/vendor/local/share/man/man3/FcIsLower.3 +0 -17
  838. data/vendor/local/share/man/man3/FcIsUpper.3 +0 -17
  839. data/vendor/local/share/man/man3/FcLangGetCharSet.3 +0 -16
  840. data/vendor/local/share/man/man3/FcLangSetAdd.3 +0 -20
  841. data/vendor/local/share/man/man3/FcLangSetCompare.3 +0 -22
  842. data/vendor/local/share/man/man3/FcLangSetContains.3 +0 -22
  843. data/vendor/local/share/man/man3/FcLangSetCopy.3 +0 -17
  844. data/vendor/local/share/man/man3/FcLangSetCreate.3 +0 -16
  845. data/vendor/local/share/man/man3/FcLangSetDestroy.3 +0 -17
  846. data/vendor/local/share/man/man3/FcLangSetEqual.3 +0 -18
  847. data/vendor/local/share/man/man3/FcLangSetGetLangs.3 +0 -16
  848. data/vendor/local/share/man/man3/FcLangSetHasLang.3 +0 -23
  849. data/vendor/local/share/man/man3/FcLangSetHash.3 +0 -20
  850. data/vendor/local/share/man/man3/FcMatrixCopy.3 +0 -17
  851. data/vendor/local/share/man/man3/FcMatrixEqual.3 +0 -19
  852. data/vendor/local/share/man/man3/FcMatrixInit.3 +0 -17
  853. data/vendor/local/share/man/man3/FcMatrixMultiply.3 +0 -20
  854. data/vendor/local/share/man/man3/FcMatrixRotate.3 +0 -27
  855. data/vendor/local/share/man/man3/FcMatrixScale.3 +0 -27
  856. data/vendor/local/share/man/man3/FcMatrixShear.3 +0 -27
  857. data/vendor/local/share/man/man3/FcNameConstant.3 +0 -18
  858. data/vendor/local/share/man/man3/FcNameGetConstant.3 +0 -16
  859. data/vendor/local/share/man/man3/FcNameGetObjectType.3 +0 -16
  860. data/vendor/local/share/man/man3/FcNameParse.3 +0 -16
  861. data/vendor/local/share/man/man3/FcNameRegisterConstants.3 +0 -19
  862. data/vendor/local/share/man/man3/FcNameRegisterObjectTypes.3 +0 -19
  863. data/vendor/local/share/man/man3/FcNameUnparse.3 +0 -18
  864. data/vendor/local/share/man/man3/FcNameUnregisterConstants.3 +0 -19
  865. data/vendor/local/share/man/man3/FcNameUnregisterObjectTypes.3 +0 -17
  866. data/vendor/local/share/man/man3/FcObjectSetAdd.3 +0 -18
  867. data/vendor/local/share/man/man3/FcObjectSetBuild.3 +0 -26
  868. data/vendor/local/share/man/man3/FcObjectSetCreate.3 +0 -16
  869. data/vendor/local/share/man/man3/FcObjectSetDestroy.3 +0 -16
  870. data/vendor/local/share/man/man3/FcPatternAdd-Type.3 +0 -49
  871. data/vendor/local/share/man/man3/FcPatternAdd.3 +0 -23
  872. data/vendor/local/share/man/man3/FcPatternAddWeak.3 +0 -20
  873. data/vendor/local/share/man/man3/FcPatternBuild.3 +0 -50
  874. data/vendor/local/share/man/man3/FcPatternCreate.3 +0 -16
  875. data/vendor/local/share/man/man3/FcPatternDel.3 +0 -18
  876. data/vendor/local/share/man/man3/FcPatternDestroy.3 +0 -17
  877. data/vendor/local/share/man/man3/FcPatternDuplicate.3 +0 -18
  878. data/vendor/local/share/man/man3/FcPatternEqual.3 +0 -17
  879. data/vendor/local/share/man/man3/FcPatternEqualSubset.3 +0 -19
  880. data/vendor/local/share/man/man3/FcPatternFilter.3 +0 -20
  881. data/vendor/local/share/man/man3/FcPatternFormat.3 +0 -205
  882. data/vendor/local/share/man/man3/FcPatternGet-Type.3 +0 -56
  883. data/vendor/local/share/man/man3/FcPatternGet.3 +0 -22
  884. data/vendor/local/share/man/man3/FcPatternHash.3 +0 -17
  885. data/vendor/local/share/man/man3/FcPatternPrint.3 +0 -18
  886. data/vendor/local/share/man/man3/FcPatternReference.3 +0 -17
  887. data/vendor/local/share/man/man3/FcPatternRemove.3 +0 -19
  888. data/vendor/local/share/man/man3/FcStrBasename.3 +0 -18
  889. data/vendor/local/share/man/man3/FcStrCmp.3 +0 -18
  890. data/vendor/local/share/man/man3/FcStrCmpIgnoreCase.3 +0 -19
  891. data/vendor/local/share/man/man3/FcStrCopy.3 +0 -18
  892. data/vendor/local/share/man/man3/FcStrCopyFilename.3 +0 -23
  893. data/vendor/local/share/man/man3/FcStrDirname.3 +0 -18
  894. data/vendor/local/share/man/man3/FcStrDowncase.3 +0 -17
  895. data/vendor/local/share/man/man3/FcStrFree.3 +0 -17
  896. data/vendor/local/share/man/man3/FcStrListCreate.3 +0 -16
  897. data/vendor/local/share/man/man3/FcStrListDone.3 +0 -16
  898. data/vendor/local/share/man/man3/FcStrListNext.3 +0 -16
  899. data/vendor/local/share/man/man3/FcStrPlus.3 +0 -19
  900. data/vendor/local/share/man/man3/FcStrSetAdd.3 +0 -17
  901. data/vendor/local/share/man/man3/FcStrSetAddFilename.3 +0 -19
  902. data/vendor/local/share/man/man3/FcStrSetCreate.3 +0 -16
  903. data/vendor/local/share/man/man3/FcStrSetDel.3 +0 -18
  904. data/vendor/local/share/man/man3/FcStrSetDestroy.3 +0 -16
  905. data/vendor/local/share/man/man3/FcStrSetEqual.3 +0 -19
  906. data/vendor/local/share/man/man3/FcStrSetMember.3 +0 -18
  907. data/vendor/local/share/man/man3/FcStrStr.3 +0 -20
  908. data/vendor/local/share/man/man3/FcStrStrIgnoreCase.3 +0 -20
  909. data/vendor/local/share/man/man3/FcToLower.3 +0 -17
  910. data/vendor/local/share/man/man3/FcUcs4ToUtf8.3 +0 -19
  911. data/vendor/local/share/man/man3/FcUtf16Len.3 +0 -27
  912. data/vendor/local/share/man/man3/FcUtf16ToUcs4.3 +0 -23
  913. data/vendor/local/share/man/man3/FcUtf8Len.3 +0 -24
  914. data/vendor/local/share/man/man3/FcUtf8ToUcs4.3 +0 -21
  915. data/vendor/local/share/man/man3/FcValueDestroy.3 +0 -17
  916. data/vendor/local/share/man/man3/FcValueEqual.3 +0 -19
  917. data/vendor/local/share/man/man3/FcValuePrint.3 +0 -18
  918. data/vendor/local/share/man/man3/FcValueSave.3 +0 -17
  919. data/vendor/local/share/man/man5/fonts-conf.5 +0 -644
  920. data/vendor/local/src/dieterv/packaging/cairo_1.10.2-2_win32.log +0 -1315
  921. data/vendor/local/src/dieterv/packaging/cairo_1.10.2-2_win32.sh +0 -251
  922. data/vendor/local/src/dieterv/packaging/expat_2.1.0-1_win32.log +0 -181
  923. data/vendor/local/src/dieterv/packaging/expat_2.1.0-1_win32.sh +0 -76
  924. data/vendor/local/src/dieterv/packaging/freetype_2.4.10-1_win32.log +0 -363
  925. data/vendor/local/src/dieterv/packaging/freetype_2.4.10-1_win32.sh +0 -92
  926. data/vendor/local/src/dieterv/packaging/libpng_1.4.12-1_win32.log +0 -283
  927. data/vendor/local/src/dieterv/packaging/libpng_1.4.12-1_win32.sh +0 -71
  928. data/vendor/local/src/tml/packaging/fontconfig_2.8.0-2_win32.log +0 -999
  929. data/vendor/local/src/tml/packaging/fontconfig_2.8.0-2_win32.sh +0 -79
  930. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +0 -42
  931. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +0 -189
@@ -1,26 +1,26 @@
1
1
 
2
2
  /* png.h - header file for PNG reference library
3
3
  *
4
- * libpng version 1.4.12 - July 10, 2012
5
- * Copyright (c) 1998-2011 Glenn Randers-Pehrson
4
+ * libpng version 1.6.2 - April 25, 2013
5
+ * Copyright (c) 1998-2013 Glenn Randers-Pehrson
6
6
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7
7
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8
8
  *
9
9
  * This code is released under the libpng license (See LICENSE, below)
10
10
  *
11
11
  * Authors and maintainers:
12
- * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
13
- * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
14
- * libpng versions 0.97, January 1998, through 1.4.12 - July 10, 2012: Glenn
15
- * See also "Contributing Authors", below.
12
+ * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
13
+ * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
14
+ * libpng versions 0.97, January 1998, through 1.6.2 - April 25, 2013: Glenn
15
+ * See also "Contributing Authors", below.
16
16
  *
17
17
  * Note about libpng version numbers:
18
18
  *
19
- * Due to various miscommunications, unforeseen code incompatibilities
20
- * and occasional factors outside the authors' control, version numbering
21
- * on the library has not always been consistent and straightforward.
22
- * The following table summarizes matters since version 0.89c, which was
23
- * the first widely used release:
19
+ * Due to various miscommunications, unforeseen code incompatibilities
20
+ * and occasional factors outside the authors' control, version numbering
21
+ * on the library has not always been consistent and straightforward.
22
+ * The following table summarizes matters since version 0.89c, which was
23
+ * the first widely used release:
24
24
  *
25
25
  * source png.h png.h shared-lib
26
26
  * version string int version
@@ -137,60 +137,65 @@
137
137
  * 1.4.1beta01-03 14 10401 14.so.14.1[.0]
138
138
  * 1.4.1rc01 14 10401 14.so.14.1[.0]
139
139
  * 1.4.1beta04-12 14 10401 14.so.14.1[.0]
140
- * 1.4.1rc02-04 14 10401 14.so.14.1[.0]
141
140
  * 1.4.1 14 10401 14.so.14.1[.0]
142
- * 1.4.2beta01 14 10402 14.so.14.2[.0]
143
- * 1.4.2rc02-06 14 10402 14.so.14.2[.0]
144
141
  * 1.4.2 14 10402 14.so.14.2[.0]
145
- * 1.4.3beta01-05 14 10403 14.so.14.3[.0]
146
- * 1.4.3rc01-03 14 10403 14.so.14.3[.0]
147
142
  * 1.4.3 14 10403 14.so.14.3[.0]
148
- * 1.4.4beta01-08 14 10404 14.so.14.4[.0]
149
- * 1.4.4rc01-05 14 10404 14.so.14.4[.0]
150
143
  * 1.4.4 14 10404 14.so.14.4[.0]
151
- * 1.4.5beta01-04 14 10405 14.so.14.5[.0]
152
- * 1.4.5rc01 14 10405 14.so.14.5[.0]
153
- * 1.4.5beta05-07 14 10405 14.so.14.5[.0]
154
- * 1.4.5rc02-03 14 10405 14.so.14.5[.0]
155
- * 1.4.5 14 10405 14.so.14.5[.0]
156
- * 1.4.6beta01-07 14 10406 14.so.14.6[.0]
157
- * 1.4.6rc01 14 10406 14.so.14.6[.0]
158
- * 1.4.6 14 10406 14.so.14.6[.0]
159
- * 1.4.7rc01 14 10407 14.so.14.7[.0]
160
- * 1.4.7 14 10407 14.so.14.7[.0]
161
- * 1.4.8beta01-05 14 10408 14.so.14.8[.0]
162
- * 1.4.8rc01 14 10408 14.so.14.8[.0]
163
- * 1.4.8 14 10408 14.so.14.8[.0]
164
- * 1.4.9beta01 14 10409 14.so.14.9[.0]
165
- * 1.4.9rc01 14 10409 14.so.14.9[.0]
166
- * 1.4.9 14 10409 14.so.14.9[.0]
167
- * 1.4.10beta01 14 10410 14.so.14.10[.0]
168
- * 1.4.10rc01-02 14 10410 14.so.14.10[.0]
169
- * 1.4.10 14 10410 14.so.14.10[.0]
170
- * 1.4.11rc01 14 10411 14.so.14.11[.0]
171
- * 1.4.11 14 10411 14.so.14.11[.0]
172
- * 1.4.12 14 10412 14.so.14.12[.0]
173
- *
174
- * Henceforth the source version will match the shared-library major
175
- * and minor numbers; the shared-library major version number will be
176
- * used for changes in backward compatibility, as it is intended. The
177
- * PNG_LIBPNG_VER macro, which is not used within libpng but is available
178
- * for applications, is an unsigned integer of the form xyyzz corresponding
179
- * to the source version x.y.z (leading zeros in y and z). Beta versions
180
- * were given the previous public release number plus a letter, until
181
- * version 1.0.6j; from then on they were given the upcoming public
182
- * release number plus "betaNN" or "rcNN".
183
- *
184
- * Binary incompatibility exists only when applications make direct access
185
- * to the info_ptr or png_ptr members through png.h, and the compiled
186
- * application is loaded with a different version of the library.
187
- *
188
- * DLLNUM will change each time there are forward or backward changes
189
- * in binary compatibility (e.g., when a new feature is added).
190
- *
191
- * See libpng.txt or libpng.3 for more information. The PNG specification
192
- * is available as a W3C Recommendation and as an ISO Specification,
193
- * <http://www.w3.org/TR/2003/REC-PNG-20031110/
144
+ * 1.5.0beta01-58 15 10500 15.so.15.0[.0]
145
+ * 1.5.0rc01-07 15 10500 15.so.15.0[.0]
146
+ * 1.5.0 15 10500 15.so.15.0[.0]
147
+ * 1.5.1beta01-11 15 10501 15.so.15.1[.0]
148
+ * 1.5.1rc01-02 15 10501 15.so.15.1[.0]
149
+ * 1.5.1 15 10501 15.so.15.1[.0]
150
+ * 1.5.2beta01-03 15 10502 15.so.15.2[.0]
151
+ * 1.5.2rc01-03 15 10502 15.so.15.2[.0]
152
+ * 1.5.2 15 10502 15.so.15.2[.0]
153
+ * 1.5.3beta01-10 15 10503 15.so.15.3[.0]
154
+ * 1.5.3rc01-02 15 10503 15.so.15.3[.0]
155
+ * 1.5.3beta11 15 10503 15.so.15.3[.0]
156
+ * 1.5.3 [omitted]
157
+ * 1.5.4beta01-08 15 10504 15.so.15.4[.0]
158
+ * 1.5.4rc01 15 10504 15.so.15.4[.0]
159
+ * 1.5.4 15 10504 15.so.15.4[.0]
160
+ * 1.5.5beta01-08 15 10505 15.so.15.5[.0]
161
+ * 1.5.5rc01 15 10505 15.so.15.5[.0]
162
+ * 1.5.5 15 10505 15.so.15.5[.0]
163
+ * 1.5.6beta01-07 15 10506 15.so.15.6[.0]
164
+ * 1.5.6rc01-03 15 10506 15.so.15.6[.0]
165
+ * 1.5.6 15 10506 15.so.15.6[.0]
166
+ * 1.5.7beta01-05 15 10507 15.so.15.7[.0]
167
+ * 1.5.7rc01-03 15 10507 15.so.15.7[.0]
168
+ * 1.5.7 15 10507 15.so.15.7[.0]
169
+ * 1.6.0beta01-40 16 10600 16.so.16.0[.0]
170
+ * 1.6.0rc01-08 16 10600 16.so.16.0[.0]
171
+ * 1.6.0 16 10600 16.so.16.0[.0]
172
+ * 1.6.1beta01-09 16 10601 16.so.16.1[.0]
173
+ * 1.6.1rc01 16 10601 16.so.16.1[.0]
174
+ * 1.6.1 16 10601 16.so.16.1[.0]
175
+ * 1.6.2beta01 16 10602 16.so.16.2[.0]
176
+ * 1.6.2rc01-06 16 10602 16.so.16.2[.0]
177
+ * 1.6.2 16 10602 16.so.16.2[.0]
178
+ *
179
+ * Henceforth the source version will match the shared-library major
180
+ * and minor numbers; the shared-library major version number will be
181
+ * used for changes in backward compatibility, as it is intended. The
182
+ * PNG_LIBPNG_VER macro, which is not used within libpng but is available
183
+ * for applications, is an unsigned integer of the form xyyzz corresponding
184
+ * to the source version x.y.z (leading zeros in y and z). Beta versions
185
+ * were given the previous public release number plus a letter, until
186
+ * version 1.0.6j; from then on they were given the upcoming public
187
+ * release number plus "betaNN" or "rcNN".
188
+ *
189
+ * Binary incompatibility exists only when applications make direct access
190
+ * to the info_ptr or png_ptr members through png.h, and the compiled
191
+ * application is loaded with a different version of the library.
192
+ *
193
+ * DLLNUM will change each time there are forward or backward changes
194
+ * in binary compatibility (e.g., when a new feature is added).
195
+ *
196
+ * See libpng-manual.txt or libpng.3 for more information. The PNG
197
+ * specification is available as a W3C Recommendation and as an ISO
198
+ * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/
194
199
  */
195
200
 
196
201
  /*
@@ -201,8 +206,8 @@
201
206
  *
202
207
  * This code is released under the libpng license.
203
208
  *
204
- * libpng versions 1.2.6, August 15, 2004, through 1.4.12, July 10, 2012, are
205
- * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
209
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.2, April 25, 2013, are
210
+ * Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
206
211
  * distributed according to the same disclaimer and license as libpng-1.2.5
207
212
  * with the following individual added to the list of Contributing Authors:
208
213
  *
@@ -271,13 +276,13 @@
271
276
  * source code, or portions hereof, for any purpose, without fee, subject
272
277
  * to the following restrictions:
273
278
  *
274
- * 1. The origin of this source code must not be misrepresented.
279
+ * 1. The origin of this source code must not be misrepresented.
275
280
  *
276
- * 2. Altered versions must be plainly marked as such and
277
- * must not be misrepresented as being the original source.
281
+ * 2. Altered versions must be plainly marked as such and must not
282
+ * be misrepresented as being the original source.
278
283
  *
279
- * 3. This Copyright notice may not be removed or altered from
280
- * any source or altered source distribution.
284
+ * 3. This Copyright notice may not be removed or altered from
285
+ * any source or altered source distribution.
281
286
  *
282
287
  * The Contributing Authors and Group 42, Inc. specifically permit, without
283
288
  * fee, and encourage the use of this source code as a component to
@@ -290,7 +295,7 @@
290
295
  * A "png_get_copyright" function is available, for convenient use in "about"
291
296
  * boxes and the like:
292
297
  *
293
- * printf("%s",png_get_copyright(NULL));
298
+ * printf("%s", png_get_copyright(NULL));
294
299
  *
295
300
  * Also, the PNG logo (in PNG format, of course) is supplied in the
296
301
  * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
@@ -313,29 +318,30 @@
313
318
  * Y2K compliance in libpng:
314
319
  * =========================
315
320
  *
316
- * July 10, 2012
321
+ * April 25, 2013
317
322
  *
318
323
  * Since the PNG Development group is an ad-hoc body, we can't make
319
324
  * an official declaration.
320
325
  *
321
326
  * This is your unofficial assurance that libpng from version 0.71 and
322
- * upward through 1.4.12 are Y2K compliant. It is my belief that earlier
323
- * versions were also Y2K compliant.
327
+ * upward through 1.6.2 are Y2K compliant. It is my belief that
328
+ * earlier versions were also Y2K compliant.
324
329
  *
325
- * Libpng only has three year fields. One is a 2-byte unsigned integer
326
- * that will hold years up to 65535. The other two hold the date in text
327
- * format, and will hold years up to 9999.
330
+ * Libpng only has two year fields. One is a 2-byte unsigned integer
331
+ * that will hold years up to 65535. The other, which is deprecated,
332
+ * holds the date in text format, and will hold years up to 9999.
328
333
  *
329
334
  * The integer is
330
335
  * "png_uint_16 year" in png_time_struct.
331
336
  *
332
- * The strings are
333
- * "png_charp time_buffer" in png_struct and
334
- * "near_time_buffer", which is a local character string in png.c.
337
+ * The string is
338
+ * "char time_buffer[29]" in png_struct. This is no longer used
339
+ * in libpng-1.6.x and will be removed from libpng-1.7.0.
335
340
  *
336
341
  * There are seven time-related functions:
337
- * png.c: png_convert_to_rfc_1123() in png.c
338
- * (formerly png_convert_to_rfc_1152() in error)
342
+ * png.c: png_convert_to_rfc_1123_buffer() in png.c
343
+ * (formerly png_convert_to_rfc_1123() prior to libpng-1.5.x and
344
+ * png_convert_to_rfc_1152() in error prior to libpng-0.98)
339
345
  * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
340
346
  * png_convert_from_time_t() in pngwrite.c
341
347
  * png_get_tIME() in pngget.c
@@ -346,8 +352,8 @@
346
352
  * All handle dates properly in a Y2K environment. The
347
353
  * png_convert_from_time_t() function calls gmtime() to convert from system
348
354
  * clock time, which returns (year - 1900), which we properly convert to
349
- * the full 4-digit year. There is a possibility that applications using
350
- * libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
355
+ * the full 4-digit year. There is a possibility that libpng applications
356
+ * are not passing 4-digit years into the png_convert_to_rfc_1123_buffer()
351
357
  * function, or that they are incorrectly passing only a 2-digit year
352
358
  * instead of "year - 1900" into the png_convert_from_struct_tm() function,
353
359
  * but this is not under our control. The libpng documentation has always
@@ -368,24 +374,28 @@
368
374
  #ifndef PNG_H
369
375
  #define PNG_H
370
376
 
371
- /* This is not the place to learn how to use libpng. The file libpng.txt
377
+ /* This is not the place to learn how to use libpng. The file libpng-manual.txt
372
378
  * describes how to use libpng, and the file example.c summarizes it
373
379
  * with some code on which to build. This file is useful for looking
374
380
  * at the actual function definitions and structure components.
381
+ *
382
+ * If you just need to read a PNG file and don't want to read the documentation
383
+ * skip to the end of this file and read the section entitled 'simplified API'.
375
384
  */
376
385
 
377
386
  /* Version information for png.h - this should match the version in png.c */
378
- #define PNG_LIBPNG_VER_STRING "1.4.12"
387
+ #define PNG_LIBPNG_VER_STRING "1.6.2"
379
388
  #define PNG_HEADER_VERSION_STRING \
380
- " libpng version 1.4.12 - July 10, 2012\n"
389
+ " libpng version 1.6.2 - April 25, 2013\n"
381
390
 
382
- #define PNG_LIBPNG_VER_SONUM 14
383
- #define PNG_LIBPNG_VER_DLLNUM 14
391
+ #define PNG_LIBPNG_VER_SONUM 16
392
+ #define PNG_LIBPNG_VER_DLLNUM 16
384
393
 
385
394
  /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
386
395
  #define PNG_LIBPNG_VER_MAJOR 1
387
- #define PNG_LIBPNG_VER_MINOR 4
388
- #define PNG_LIBPNG_VER_RELEASE 12
396
+ #define PNG_LIBPNG_VER_MINOR 6
397
+ #define PNG_LIBPNG_VER_RELEASE 2
398
+
389
399
  /* This should match the numeric part of the final component of
390
400
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
391
401
  */
@@ -415,15 +425,22 @@
415
425
  * version 1.0.0 was mis-numbered 100 instead of 10000). From
416
426
  * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
417
427
  */
418
- #define PNG_LIBPNG_VER 10412 /* 1.4.12 */
428
+ #define PNG_LIBPNG_VER 10602 /* 1.6.2 */
419
429
 
420
- #ifndef PNG_VERSION_INFO_ONLY
421
- /* Include the compression library's header */
422
- #include "zlib.h"
430
+ /* Library configuration: these options cannot be changed after
431
+ * the library has been built.
432
+ */
433
+ #ifndef PNGLCONF_H
434
+ /* If pnglibconf.h is missing, you can
435
+ * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h
436
+ */
437
+ # include "pnglibconf.h"
423
438
  #endif
424
439
 
425
- /* Include all user configurable info, including optional assembler routines */
426
- #include "pngconf.h"
440
+ #ifndef PNG_VERSION_INFO_ONLY
441
+ /* Machine specific configuration. */
442
+ # include "pngconf.h"
443
+ #endif
427
444
 
428
445
  /*
429
446
  * Added at libpng-1.2.8
@@ -439,13 +456,13 @@
439
456
  * StringFileInfo block must contain a SpecialBuild string.
440
457
  */
441
458
 
442
- #ifdef PNG_USER_PRIVATEBUILD
459
+ #ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */
443
460
  # define PNG_LIBPNG_BUILD_TYPE \
444
- (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
461
+ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
445
462
  #else
446
463
  # ifdef PNG_LIBPNG_SPECIALBUILD
447
464
  # define PNG_LIBPNG_BUILD_TYPE \
448
- (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
465
+ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
449
466
  # else
450
467
  # define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
451
468
  # endif
@@ -458,20 +475,103 @@
458
475
  extern "C" {
459
476
  #endif /* __cplusplus */
460
477
 
461
- /* This file is arranged in several sections. The first section contains
462
- * structure and type definitions. The second section contains the external
463
- * library functions, while the third has the internal library functions,
464
- * which applications aren't expected to use directly.
465
- */
466
-
467
- /* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
468
- #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
469
478
  /* Version information for C files, stored in png.c. This had better match
470
479
  * the version above.
471
480
  */
472
481
  #define png_libpng_ver png_get_header_ver(NULL)
473
482
 
474
- #endif /* PNG_NO_EXTERN */
483
+ /* This file is arranged in several sections:
484
+ *
485
+ * 1. Any configuration options that can be specified by for the application
486
+ * code when it is built. (Build time configuration is in pnglibconf.h)
487
+ * 2. Type definitions (base types are defined in pngconf.h), structure
488
+ * definitions.
489
+ * 3. Exported library functions.
490
+ * 4. Simplified API.
491
+ *
492
+ * The library source code has additional files (principally pngpriv.h) that
493
+ * allow configuration of the library.
494
+ */
495
+ /* Section 1: run time configuration
496
+ * See pnglibconf.h for build time configuration
497
+ *
498
+ * Run time configuration allows the application to choose between
499
+ * implementations of certain arithmetic APIs. The default is set
500
+ * at build time and recorded in pnglibconf.h, but it is safe to
501
+ * override these (and only these) settings. Note that this won't
502
+ * change what the library does, only application code, and the
503
+ * settings can (and probably should) be made on a per-file basis
504
+ * by setting the #defines before including png.h
505
+ *
506
+ * Use macros to read integers from PNG data or use the exported
507
+ * functions?
508
+ * PNG_USE_READ_MACROS: use the macros (see below) Note that
509
+ * the macros evaluate their argument multiple times.
510
+ * PNG_NO_USE_READ_MACROS: call the relevant library function.
511
+ *
512
+ * Use the alternative algorithm for compositing alpha samples that
513
+ * does not use division?
514
+ * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division'
515
+ * algorithm.
516
+ * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm.
517
+ *
518
+ * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is
519
+ * false?
520
+ * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error
521
+ * APIs to png_warning.
522
+ * Otherwise the calls are mapped to png_error.
523
+ */
524
+
525
+ /* Section 2: type definitions, including structures and compile time
526
+ * constants.
527
+ * See pngconf.h for base types that vary by machine/system
528
+ */
529
+
530
+ /* This triggers a compiler error in png.c, if png.c and png.h
531
+ * do not agree upon the version number.
532
+ */
533
+ typedef char* png_libpng_version_1_6_2;
534
+
535
+ /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
536
+ *
537
+ * png_struct is the cache of information used while reading or writing a single
538
+ * PNG file. One of these is always required, although the simplified API
539
+ * (below) hides the creation and destruction of it.
540
+ */
541
+ typedef struct png_struct_def png_struct;
542
+ typedef const png_struct * png_const_structp;
543
+ typedef png_struct * png_structp;
544
+ typedef png_struct * * png_structpp;
545
+
546
+ /* png_info contains information read from or to be written to a PNG file. One
547
+ * or more of these must exist while reading or creating a PNG file. The
548
+ * information is not used by libpng during read but is used to control what
549
+ * gets written when a PNG file is created. "png_get_" function calls read
550
+ * information during read and "png_set_" functions calls write information
551
+ * when creating a PNG.
552
+ * been moved into a separate header file that is not accessible to
553
+ * applications. Read libpng-manual.txt or libpng.3 for more info.
554
+ */
555
+ typedef struct png_info_def png_info;
556
+ typedef png_info * png_infop;
557
+ typedef const png_info * png_const_infop;
558
+ typedef png_info * * png_infopp;
559
+
560
+ /* Types with names ending 'p' are pointer types. The corresponding types with
561
+ * names ending 'rp' are identical pointer types except that the pointer is
562
+ * marked 'restrict', which means that it is the only pointer to the object
563
+ * passed to the function. Applications should not use the 'restrict' types;
564
+ * it is always valid to pass 'p' to a pointer with a function argument of the
565
+ * corresponding 'rp' type. Different compilers have different rules with
566
+ * regard to type matching in the presence of 'restrict'. For backward
567
+ * compatibility libpng callbacks never have 'restrict' in their parameters and,
568
+ * consequentially, writing portable application code is extremely difficult if
569
+ * an attempt is made to use 'restrict'.
570
+ */
571
+ typedef png_struct * PNG_RESTRICT png_structrp;
572
+ typedef const png_struct * PNG_RESTRICT png_const_structrp;
573
+ typedef png_info * PNG_RESTRICT png_inforp;
574
+ typedef const png_info * PNG_RESTRICT png_const_inforp;
475
575
 
476
576
  /* Three color definitions. The order of the red, green, and blue, (and the
477
577
  * exact size) is not important, although the size of the fields need to
@@ -483,8 +583,9 @@ typedef struct png_color_struct
483
583
  png_byte green;
484
584
  png_byte blue;
485
585
  } png_color;
486
- typedef png_color FAR * png_colorp;
487
- typedef png_color FAR * FAR * png_colorpp;
586
+ typedef png_color * png_colorp;
587
+ typedef const png_color * png_const_colorp;
588
+ typedef png_color * * png_colorpp;
488
589
 
489
590
  typedef struct png_color_16_struct
490
591
  {
@@ -494,8 +595,9 @@ typedef struct png_color_16_struct
494
595
  png_uint_16 blue;
495
596
  png_uint_16 gray; /* for use in grayscale files */
496
597
  } png_color_16;
497
- typedef png_color_16 FAR * png_color_16p;
498
- typedef png_color_16 FAR * FAR * png_color_16pp;
598
+ typedef png_color_16 * png_color_16p;
599
+ typedef const png_color_16 * png_const_color_16p;
600
+ typedef png_color_16 * * png_color_16pp;
499
601
 
500
602
  typedef struct png_color_8_struct
501
603
  {
@@ -505,8 +607,9 @@ typedef struct png_color_8_struct
505
607
  png_byte gray; /* for use in grayscale files */
506
608
  png_byte alpha; /* for alpha channel files */
507
609
  } png_color_8;
508
- typedef png_color_8 FAR * png_color_8p;
509
- typedef png_color_8 FAR * FAR * png_color_8pp;
610
+ typedef png_color_8 * png_color_8p;
611
+ typedef const png_color_8 * png_const_color_8p;
612
+ typedef png_color_8 * * png_color_8pp;
510
613
 
511
614
  /*
512
615
  * The following two structures are used for the in-core representation
@@ -520,8 +623,9 @@ typedef struct png_sPLT_entry_struct
520
623
  png_uint_16 alpha;
521
624
  png_uint_16 frequency;
522
625
  } png_sPLT_entry;
523
- typedef png_sPLT_entry FAR * png_sPLT_entryp;
524
- typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
626
+ typedef png_sPLT_entry * png_sPLT_entryp;
627
+ typedef const png_sPLT_entry * png_const_sPLT_entryp;
628
+ typedef png_sPLT_entry * * png_sPLT_entrypp;
525
629
 
526
630
  /* When the depth of the sPLT palette is 8 bits, the color and alpha samples
527
631
  * occupy the LSB of their respective members, and the MSB of each member
@@ -535,17 +639,27 @@ typedef struct png_sPLT_struct
535
639
  png_sPLT_entryp entries; /* palette entries */
536
640
  png_int_32 nentries; /* number of palette entries */
537
641
  } png_sPLT_t;
538
- typedef png_sPLT_t FAR * png_sPLT_tp;
539
- typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
642
+ typedef png_sPLT_t * png_sPLT_tp;
643
+ typedef const png_sPLT_t * png_const_sPLT_tp;
644
+ typedef png_sPLT_t * * png_sPLT_tpp;
540
645
 
541
646
  #ifdef PNG_TEXT_SUPPORTED
542
647
  /* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
543
648
  * and whether that contents is compressed or not. The "key" field
544
- * points to a regular zero-terminated C string. The "text", "lang", and
545
- * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
546
- * However, the * structure returned by png_get_text() will always contain
547
- * regular zero-terminated C strings (possibly empty), never NULL pointers,
548
- * so they can be safely used in printf() and other string-handling functions.
649
+ * points to a regular zero-terminated C string. The "text" fields can be a
650
+ * regular C string, an empty string, or a NULL pointer.
651
+ * However, the structure returned by png_get_text() will always contain
652
+ * the "text" field as a regular zero-terminated C string (possibly
653
+ * empty), never a NULL pointer, so it can be safely used in printf() and
654
+ * other string-handling functions. Note that the "itxt_length", "lang", and
655
+ * "lang_key" members of the structure only exist when the library is built
656
+ * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by
657
+ * default without iTXt support. Also note that when iTXt *is* supported,
658
+ * the "lang" and "lang_key" fields contain NULL pointers when the
659
+ * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or
660
+ * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the
661
+ * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag"
662
+ * which is always 0 or 1, or its "compression method" which is always 0.
549
663
  */
550
664
  typedef struct png_text_struct
551
665
  {
@@ -558,16 +672,15 @@ typedef struct png_text_struct
558
672
  png_charp text; /* comment, may be an empty string (ie "")
559
673
  or a NULL pointer */
560
674
  png_size_t text_length; /* length of the text string */
561
- #ifdef PNG_iTXt_SUPPORTED
562
675
  png_size_t itxt_length; /* length of the itxt string */
563
676
  png_charp lang; /* language code, 0-79 characters
564
677
  or a NULL pointer */
565
678
  png_charp lang_key; /* keyword translated UTF-8 string, 0 or more
566
679
  chars or a NULL pointer */
567
- #endif
568
680
  } png_text;
569
- typedef png_text FAR * png_textp;
570
- typedef png_text FAR * FAR * png_textpp;
681
+ typedef png_text * png_textp;
682
+ typedef const png_text * png_const_textp;
683
+ typedef png_text * * png_textpp;
571
684
  #endif
572
685
 
573
686
  /* Supported compression types for text in PNG files (tEXt, and zTXt).
@@ -595,341 +708,57 @@ typedef struct png_time_struct
595
708
  png_byte minute; /* minute of hour, 0 - 59 */
596
709
  png_byte second; /* second of minute, 0 - 60 (for leap seconds) */
597
710
  } png_time;
598
- typedef png_time FAR * png_timep;
599
- typedef png_time FAR * FAR * png_timepp;
711
+ typedef png_time * png_timep;
712
+ typedef const png_time * png_const_timep;
713
+ typedef png_time * * png_timepp;
600
714
 
601
- #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
602
- defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
715
+ #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
603
716
  /* png_unknown_chunk is a structure to hold queued chunks for which there is
604
717
  * no specific support. The idea is that we can use this to queue
605
718
  * up private chunks for output even though the library doesn't actually
606
719
  * know about their semantics.
720
+ *
721
+ * The data in the structure is set by libpng on read and used on write.
607
722
  */
608
723
  typedef struct png_unknown_chunk_t
609
724
  {
610
- png_byte name[5];
611
- png_byte *data;
725
+ png_byte name[5]; /* Textual chunk name with '\0' terminator */
726
+ png_byte *data; /* Data, should not be modified on read! */
612
727
  png_size_t size;
613
728
 
614
- /* libpng-using applications should NOT directly modify this byte. */
729
+ /* On write 'location' must be set using the flag values listed below.
730
+ * Notice that on read it is set by libpng however the values stored have
731
+ * more bits set than are listed below. Always treat the value as a
732
+ * bitmask. On write set only one bit - setting multiple bits may cause the
733
+ * chunk to be written in multiple places.
734
+ */
615
735
  png_byte location; /* mode of operation at read time */
616
736
  }
617
737
  png_unknown_chunk;
618
- typedef png_unknown_chunk FAR * png_unknown_chunkp;
619
- typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
620
- #endif
621
-
622
- /* png_info is a structure that holds the information in a PNG file so
623
- * that the application can find out the characteristics of the image.
624
- * If you are reading the file, this structure will tell you what is
625
- * in the PNG file. If you are writing the file, fill in the information
626
- * you want to put into the PNG file, then call png_write_info().
627
- * The names chosen should be very close to the PNG specification, so
628
- * consult that document for information about the meaning of each field.
629
- *
630
- * With libpng < 0.95, it was only possible to directly set and read the
631
- * the values in the png_info_struct, which meant that the contents and
632
- * order of the values had to remain fixed. With libpng 0.95 and later,
633
- * however, there are now functions that abstract the contents of
634
- * png_info_struct from the application, so this makes it easier to use
635
- * libpng with dynamic libraries, and even makes it possible to use
636
- * libraries that don't have all of the libpng ancillary chunk-handing
637
- * functionality.
638
- *
639
- * In any case, the order of the parameters in png_info_struct should NOT
640
- * be changed for as long as possible to keep compatibility with applications
641
- * that use the old direct-access method with png_info_struct.
642
- *
643
- * The following members may have allocated storage attached that should be
644
- * cleaned up before the structure is discarded: palette, trans, text,
645
- * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
646
- * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these
647
- * are automatically freed when the info structure is deallocated, if they were
648
- * allocated internally by libpng. This behavior can be changed by means
649
- * of the png_data_freer() function.
650
- *
651
- * More allocation details: all the chunk-reading functions that
652
- * change these members go through the corresponding png_set_*
653
- * functions. A function to clear these members is available: see
654
- * png_free_data(). The png_set_* functions do not depend on being
655
- * able to point info structure members to any of the storage they are
656
- * passed (they make their own copies), EXCEPT that the png_set_text
657
- * functions use the same storage passed to them in the text_ptr or
658
- * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
659
- * functions do not make their own copies.
660
- */
661
- typedef struct png_info_struct
662
- {
663
- /* the following are necessary for every PNG file */
664
- png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */
665
- png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */
666
- png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_
667
- below) */
668
- png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed
669
- row */
670
- png_colorp palette PNG_DEPSTRUCT; /* array of color values
671
- (valid & PNG_INFO_PLTE) */
672
- png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in
673
- "palette" (PLTE) */
674
- png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette
675
- color (tRNS) */
676
- png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel
677
- (from IHDR) */
678
- png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below
679
- (from IHDR) */
680
- /* The following three should have been named *_method not *_type */
681
- png_byte compression_type PNG_DEPSTRUCT; /* must be
682
- PNG_COMPRESSION_TYPE_BASE (IHDR) */
683
- png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE
684
- (from IHDR) */
685
- png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE,
686
- PNG_INTERLACE_ADAM7 */
687
-
688
- /* The following is informational only on read, and not used on writes. */
689
- png_byte channels PNG_DEPSTRUCT; /* number of data channels per
690
- pixel (1, 2, 3, 4) */
691
- png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
692
- png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for
693
- future use */
694
- png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng
695
- from start of file */
696
-
697
- /* The rest of the data is optional. If you are reading, check the
698
- * valid field to see if the information in these are valid. If you
699
- * are writing, set the valid field to those chunks you want written,
700
- * and initialize the appropriate fields below.
701
- */
702
-
703
- #if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
704
- /* The gAMA chunk describes the gamma characteristics of the system
705
- * on which the image was created, normally in the range [1.0, 2.5].
706
- * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
707
- */
708
- float gamma PNG_DEPSTRUCT; /* gamma value of image,
709
- if (valid & PNG_INFO_gAMA) */
710
- #endif
711
-
712
- #ifdef PNG_sRGB_SUPPORTED
713
- /* GR-P, 0.96a */
714
- /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
715
- png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent
716
- [0, 1, 2, or 3] */
717
- #endif
718
-
719
- #ifdef PNG_TEXT_SUPPORTED
720
- /* The tEXt, and zTXt chunks contain human-readable textual data in
721
- * uncompressed, compressed, and optionally compressed forms, respectively.
722
- * The data in "text" is an array of pointers to uncompressed,
723
- * null-terminated C strings. Each chunk has a keyword that describes the
724
- * textual data contained in that chunk. Keywords are not required to be
725
- * unique, and the text string may be empty. Any number of text chunks may
726
- * be in an image.
727
- */
728
- int num_text PNG_DEPSTRUCT; /* number of comments read/to write */
729
- int max_text PNG_DEPSTRUCT; /* current size of text array */
730
- png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */
731
- #endif /* PNG_TEXT_SUPPORTED */
732
-
733
- #ifdef PNG_tIME_SUPPORTED
734
- /* The tIME chunk holds the last time the displayed image data was
735
- * modified. See the png_time struct for the contents of this struct.
736
- */
737
- png_time mod_time PNG_DEPSTRUCT;
738
- #endif
739
738
 
740
- #ifdef PNG_sBIT_SUPPORTED
741
- /* The sBIT chunk specifies the number of significant high-order bits
742
- * in the pixel data. Values are in the range [1, bit_depth], and are
743
- * only specified for the channels in the pixel data. The contents of
744
- * the low-order bits is not specified. Data is valid if
745
- * (valid & PNG_INFO_sBIT) is non-zero.
746
- */
747
- png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */
748
- #endif
749
-
750
- #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
751
- defined(PNG_READ_BACKGROUND_SUPPORTED)
752
- /* The tRNS chunk supplies transparency data for paletted images and
753
- * other image types that don't need a full alpha channel. There are
754
- * "num_trans" transparency values for a paletted image, stored in the
755
- * same order as the palette colors, starting from index 0. Values
756
- * for the data are in the range [0, 255], ranging from fully transparent
757
- * to fully opaque, respectively. For non-paletted images, there is a
758
- * single color specified that should be treated as fully transparent.
759
- * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
760
- */
761
- png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted
762
- image */
763
- png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for
764
- non-palette image */
765
- #endif
766
-
767
- #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
768
- /* The bKGD chunk gives the suggested image background color if the
769
- * display program does not have its own background color and the image
770
- * is needs to composited onto a background before display. The colors
771
- * in "background" are normally in the same color space/depth as the
772
- * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
773
- */
774
- png_color_16 background PNG_DEPSTRUCT;
739
+ typedef png_unknown_chunk * png_unknown_chunkp;
740
+ typedef const png_unknown_chunk * png_const_unknown_chunkp;
741
+ typedef png_unknown_chunk * * png_unknown_chunkpp;
775
742
  #endif
776
743
 
777
- #ifdef PNG_oFFs_SUPPORTED
778
- /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
779
- * and downwards from the top-left corner of the display, page, or other
780
- * application-specific co-ordinate space. See the PNG_OFFSET_ defines
781
- * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
782
- */
783
- png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */
784
- png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */
785
- png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */
786
- #endif
787
-
788
- #ifdef PNG_pHYs_SUPPORTED
789
- /* The pHYs chunk gives the physical pixel density of the image for
790
- * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
791
- * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
792
- */
793
- png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */
794
- png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */
795
- png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see
796
- PNG_RESOLUTION_ below) */
797
- #endif
798
-
799
- #ifdef PNG_hIST_SUPPORTED
800
- /* The hIST chunk contains the relative frequency or importance of the
801
- * various palette entries, so that a viewer can intelligently select a
802
- * reduced-color palette, if required. Data is an array of "num_palette"
803
- * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
804
- * is non-zero.
805
- */
806
- png_uint_16p hist PNG_DEPSTRUCT;
807
- #endif
808
-
809
- #ifdef PNG_cHRM_SUPPORTED
810
- /* The cHRM chunk describes the CIE color characteristics of the monitor
811
- * on which the PNG was created. This data allows the viewer to do gamut
812
- * mapping of the input image to ensure that the viewer sees the same
813
- * colors in the image as the creator. Values are in the range
814
- * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
815
- */
816
- #ifdef PNG_FLOATING_POINT_SUPPORTED
817
- float x_white PNG_DEPSTRUCT;
818
- float y_white PNG_DEPSTRUCT;
819
- float x_red PNG_DEPSTRUCT;
820
- float y_red PNG_DEPSTRUCT;
821
- float x_green PNG_DEPSTRUCT;
822
- float y_green PNG_DEPSTRUCT;
823
- float x_blue PNG_DEPSTRUCT;
824
- float y_blue PNG_DEPSTRUCT;
825
- #endif
826
- #endif
827
-
828
- #ifdef PNG_pCAL_SUPPORTED
829
- /* The pCAL chunk describes a transformation between the stored pixel
830
- * values and original physical data values used to create the image.
831
- * The integer range [0, 2^bit_depth - 1] maps to the floating-point
832
- * range given by [pcal_X0, pcal_X1], and are further transformed by a
833
- * (possibly non-linear) transformation function given by "pcal_type"
834
- * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_
835
- * defines below, and the PNG-Group's PNG extensions document for a
836
- * complete description of the transformations and how they should be
837
- * implemented, and for a description of the ASCII parameter strings.
838
- * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
839
- */
840
- png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */
841
- png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */
842
- png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */
843
- png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical
844
- units */
845
- png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing
846
- parameter values */
847
- png_byte pcal_type PNG_DEPSTRUCT; /* equation type
848
- (see PNG_EQUATION_ below) */
849
- png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given
850
- in pcal_params */
851
- #endif
852
-
853
- /* New members added in libpng-1.0.6 */
854
- png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is
855
- responsible for freeing */
856
-
857
- #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
858
- defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
859
- /* Storage for unknown chunks that the library doesn't recognize. */
860
- png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;
861
- png_size_t unknown_chunks_num PNG_DEPSTRUCT;
862
- #endif
863
-
864
- #ifdef PNG_iCCP_SUPPORTED
865
- /* iCCP chunk data. */
866
- png_charp iccp_name PNG_DEPSTRUCT; /* profile name */
867
- png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium
868
- profile data */
869
- /* Note to maintainer: should be png_bytep */
870
- png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */
871
- png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */
872
- #endif
873
-
874
- #ifdef PNG_sPLT_SUPPORTED
875
- /* Data on sPLT chunks (there may be more than one). */
876
- png_sPLT_tp splt_palettes PNG_DEPSTRUCT;
877
- png_uint_32 splt_palettes_num PNG_DEPSTRUCT;
878
- #endif
879
-
880
- #ifdef PNG_sCAL_SUPPORTED
881
- /* The sCAL chunk describes the actual physical dimensions of the
882
- * subject matter of the graphic. The chunk contains a unit specification
883
- * a byte value, and two ASCII strings representing floating-point
884
- * values. The values are width and height corresponsing to one pixel
885
- * in the image. This external representation is converted to double
886
- * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
887
- */
888
- png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */
889
- #ifdef PNG_FLOATING_POINT_SUPPORTED
890
- double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */
891
- double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */
892
- #endif
893
- #ifdef PNG_FIXED_POINT_SUPPORTED
894
- png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */
895
- png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */
896
- #endif
897
- #endif
898
-
899
- #ifdef PNG_INFO_IMAGE_SUPPORTED
900
- /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS)
901
- non-zero */
902
- /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
903
- png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */
904
- #endif
905
-
906
- #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
907
- png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image,
908
- if (valid & PNG_INFO_gAMA) */
909
- #endif
910
-
911
- #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
912
- png_fixed_point int_x_white PNG_DEPSTRUCT;
913
- png_fixed_point int_y_white PNG_DEPSTRUCT;
914
- png_fixed_point int_x_red PNG_DEPSTRUCT;
915
- png_fixed_point int_y_red PNG_DEPSTRUCT;
916
- png_fixed_point int_x_green PNG_DEPSTRUCT;
917
- png_fixed_point int_y_green PNG_DEPSTRUCT;
918
- png_fixed_point int_x_blue PNG_DEPSTRUCT;
919
- png_fixed_point int_y_blue PNG_DEPSTRUCT;
920
- #endif
921
-
922
- } png_info;
923
-
924
- typedef png_info FAR * png_infop;
925
- typedef PNG_CONST png_info FAR * png_const_infop;
926
- typedef png_info FAR * FAR * png_infopp;
744
+ /* Flag values for the unknown chunk location byte. */
745
+ #define PNG_HAVE_IHDR 0x01
746
+ #define PNG_HAVE_PLTE 0x02
747
+ #define PNG_AFTER_IDAT 0x08
927
748
 
928
749
  /* Maximum positive integer used in PNG is (2^31)-1 */
929
750
  #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
930
751
  #define PNG_UINT_32_MAX ((png_uint_32)(-1))
931
752
  #define PNG_SIZE_MAX ((png_size_t)(-1))
932
753
 
754
+ /* These are constants for fixed point values encoded in the
755
+ * PNG specification manner (x100000)
756
+ */
757
+ #define PNG_FP_1 100000
758
+ #define PNG_FP_HALF 50000
759
+ #define PNG_FP_MAX ((png_fixed_point)0x7fffffffL)
760
+ #define PNG_FP_MIN (-PNG_FP_MAX)
761
+
933
762
  /* These describe the color_type field in png_info. */
934
763
  /* color type masks */
935
764
  #define PNG_COLOR_MASK_PALETTE 1
@@ -1016,7 +845,7 @@ typedef png_info FAR * FAR * png_infopp;
1016
845
  #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
1017
846
  #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
1018
847
  #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
1019
- #define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */
848
+ #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
1020
849
 
1021
850
  /* This is used for the transformation routines, as some of them
1022
851
  * change these values for the row. It also should enable using
@@ -1024,62 +853,79 @@ typedef png_info FAR * FAR * png_infopp;
1024
853
  */
1025
854
  typedef struct png_row_info_struct
1026
855
  {
1027
- png_uint_32 width; /* width of row */
1028
- png_size_t rowbytes; /* number of bytes in row */
1029
- png_byte color_type; /* color type of row */
1030
- png_byte bit_depth; /* bit depth of row */
1031
- png_byte channels; /* number of channels (1, 2, 3, or 4) */
856
+ png_uint_32 width; /* width of row */
857
+ png_size_t rowbytes; /* number of bytes in row */
858
+ png_byte color_type; /* color type of row */
859
+ png_byte bit_depth; /* bit depth of row */
860
+ png_byte channels; /* number of channels (1, 2, 3, or 4) */
1032
861
  png_byte pixel_depth; /* bits per pixel (depth * channels) */
1033
862
  } png_row_info;
1034
863
 
1035
- typedef png_row_info FAR * png_row_infop;
1036
- typedef png_row_info FAR * FAR * png_row_infopp;
864
+ typedef png_row_info * png_row_infop;
865
+ typedef png_row_info * * png_row_infopp;
1037
866
 
1038
867
  /* These are the function types for the I/O functions and for the functions
1039
868
  * that allow the user to override the default I/O functions with his or her
1040
869
  * own. The png_error_ptr type should match that of user-supplied warning
1041
870
  * and error functions, while the png_rw_ptr type should match that of the
1042
- * user read/write data functions.
871
+ * user read/write data functions. Note that the 'write' function must not
872
+ * modify the buffer it is passed. The 'read' function, on the other hand, is
873
+ * expected to return the read data in the buffer.
1043
874
  */
1044
- typedef struct png_struct_def png_struct;
1045
- typedef png_struct FAR * png_structp;
1046
- typedef PNG_CONST png_struct FAR * png_const_structp;
1047
-
1048
- typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
1049
- typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
1050
- typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
1051
- typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
1052
- int));
1053
- typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
1054
- int));
875
+ typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
876
+ typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t));
877
+ typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
878
+ typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
879
+ int));
880
+ typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32,
881
+ int));
1055
882
 
1056
883
  #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
1057
- typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp,
1058
- png_infop));
1059
- typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
1060
- typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
1061
- png_uint_32, int));
884
+ typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
885
+ typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
886
+
887
+ /* The following callback receives png_uint_32 row_number, int pass for the
888
+ * png_bytep data of the row. When transforming an interlaced image the
889
+ * row number is the row number within the sub-image of the interlace pass, so
890
+ * the value will increase to the height of the sub-image (not the full image)
891
+ * then reset to 0 for the next pass.
892
+ *
893
+ * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to
894
+ * find the output pixel (x,y) given an interlaced sub-image pixel
895
+ * (row,col,pass). (See below for these macros.)
896
+ */
897
+ typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep,
898
+ png_uint_32, int));
1062
899
  #endif
1063
900
 
1064
901
  #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
1065
902
  defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
1066
- typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
1067
- png_row_infop, png_bytep));
903
+ typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop,
904
+ png_bytep));
1068
905
  #endif
1069
906
 
1070
907
  #ifdef PNG_USER_CHUNKS_SUPPORTED
1071
- typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp,
1072
- png_unknown_chunkp));
908
+ typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
909
+ png_unknown_chunkp));
1073
910
  #endif
1074
911
  #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
1075
- typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
912
+ /* not used anywhere */
913
+ /* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */
1076
914
  #endif
915
+
1077
916
  #ifdef PNG_SETJMP_SUPPORTED
1078
- /* This must match the function definition in <setjmp.h>, and the
1079
- * application must include this before png.h to obtain the definition
1080
- * of jmp_buf.
917
+ /* This must match the function definition in <setjmp.h>, and the application
918
+ * must include this before png.h to obtain the definition of jmp_buf. The
919
+ * function is required to be PNG_NORETURN, but this is not checked. If the
920
+ * function does return the application will crash via an abort() or similar
921
+ * system level call.
922
+ *
923
+ * If you get a warning here while building the library you may need to make
924
+ * changes to ensure that pnglibconf.h records the calling convention used by
925
+ * your compiler. This may be very difficult - try using a different compiler
926
+ * to build the library!
1081
927
  */
1082
- typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int));
928
+ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
1083
929
  #endif
1084
930
 
1085
931
  /* Transform masks for the high-level interface */
@@ -1101,453 +947,92 @@ typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int));
1101
947
  #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */
1102
948
  /* Added to libpng-1.4.0 */
1103
949
  #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
950
+ /* Added to libpng-1.5.4 */
951
+ #define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */
952
+ #define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */
1104
953
 
1105
954
  /* Flags for MNG supported features */
1106
955
  #define PNG_FLAG_MNG_EMPTY_PLTE 0x01
1107
956
  #define PNG_FLAG_MNG_FILTER_64 0x04
1108
957
  #define PNG_ALL_MNG_FEATURES 0x05
1109
958
 
1110
- typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t));
1111
- typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
1112
-
1113
- /* The structure that holds the information to read and write PNG files.
1114
- * The only people who need to care about what is inside of this are the
1115
- * people who will be modifying the library for their own special needs.
1116
- * It should NOT be accessed directly by an application, except to store
1117
- * the jmp_buf.
1118
- */
1119
-
1120
- struct png_struct_def
1121
- {
1122
- #ifdef PNG_SETJMP_SUPPORTED
1123
- jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */
1124
- png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto
1125
- function. */
1126
- #endif
1127
- png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing
1128
- errors and aborting */
1129
- png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing
1130
- warnings */
1131
- png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for
1132
- error functions */
1133
- png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing
1134
- output data */
1135
- png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading
1136
- input data */
1137
- png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct
1138
- for I/O functions */
1139
-
1140
- #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
1141
- png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read
1142
- transform */
1143
- #endif
1144
-
1145
- #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
1146
- png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write
1147
- transform */
1148
- #endif
1149
-
1150
- /* These were added in libpng-1.0.2 */
1151
- #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
1152
- #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
1153
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
1154
- png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct
1155
- for user transform */
1156
- png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user
1157
- transformed pixels */
1158
- png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user
1159
- transformed pixels */
1160
- #endif
1161
- #endif
1162
-
1163
- png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in
1164
- the PNG file */
1165
- png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various
1166
- things to libpng */
1167
- png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations
1168
- to perform */
1169
-
1170
- z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression
1171
- structure (below) */
1172
- png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */
1173
- png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */
1174
- int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */
1175
- int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */
1176
- int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window
1177
- bits */
1178
- int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory
1179
- level */
1180
- int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression
1181
- strategy */
1182
-
1183
- png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */
1184
- png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */
1185
- png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */
1186
- png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */
1187
- png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */
1188
- #if 0 /* Replaced with the following in libpng-1.4.1 */
1189
- png_size_t irowbytes PNG_DEPSTRUCT;
1190
- #endif
1191
- /* Added in libpng-1.4.1 */
1192
- #ifdef PNG_USER_LIMITS_SUPPORTED
1193
- /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk
1194
- * can occupy when decompressed. 0 means unlimited.
1195
- * We will change the typedef from png_size_t to png_alloc_size_t
1196
- * in libpng-1.6.0
1197
- */
1198
- png_alloc_size_t user_chunk_malloc_max PNG_DEPSTRUCT;
1199
- #endif
1200
- png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced
1201
- row in pixels */
1202
- png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */
1203
- png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous
1204
- (unfiltered) row */
1205
- png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current
1206
- (unfiltered) row */
1207
- png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row
1208
- when filtering */
1209
- png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row
1210
- when filtering */
1211
- png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row
1212
- when filtering */
1213
- png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row
1214
- when filtering */
1215
- png_row_info row_info PNG_DEPSTRUCT; /* used for transformation
1216
- routines */
1217
-
1218
- png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */
1219
- png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */
1220
- png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */
1221
- png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in
1222
- palette */
1223
- png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */
1224
- png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current
1225
- chunk */
1226
- png_byte compression PNG_DEPSTRUCT; /* file compression type
1227
- (always 0) */
1228
- png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */
1229
- png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE,
1230
- PNG_INTERLACE_ADAM7 */
1231
- png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */
1232
- png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see
1233
- PNG_FILTER_ below ) */
1234
- png_byte color_type PNG_DEPSTRUCT; /* color type of file */
1235
- png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */
1236
- png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */
1237
- png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
1238
- png_byte channels PNG_DEPSTRUCT; /* number of channels in file */
1239
- png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */
1240
- png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from
1241
- start of file */
1242
-
1243
- #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
1244
- png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel
1245
- expansion */
1246
- #endif
1247
-
1248
- #ifdef PNG_bKGD_SUPPORTED
1249
- png_byte background_gamma_type PNG_DEPSTRUCT;
1250
- # ifdef PNG_FLOATING_POINT_SUPPORTED
1251
- float background_gamma PNG_DEPSTRUCT;
1252
- # endif
1253
- png_color_16 background PNG_DEPSTRUCT; /* background color in
1254
- screen gamma space */
1255
- #ifdef PNG_READ_GAMMA_SUPPORTED
1256
- png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized
1257
- to gamma 1.0 */
1258
- #endif
1259
- #endif /* PNG_bKGD_SUPPORTED */
1260
-
1261
- #ifdef PNG_WRITE_FLUSH_SUPPORTED
1262
- png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing
1263
- output */
1264
- png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush,
1265
- 0 - no flush */
1266
- png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since
1267
- last flush */
1268
- #endif
1269
-
1270
- #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
1271
- int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits
1272
- 16-bit gamma */
1273
- #ifdef PNG_FLOATING_POINT_SUPPORTED
1274
- float gamma PNG_DEPSTRUCT; /* file gamma value */
1275
- float screen_gamma PNG_DEPSTRUCT; /* screen gamma value
1276
- (display_exponent) */
1277
- #endif
1278
- #endif
1279
-
1280
- #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
1281
- png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit
1282
- depth files */
1283
- png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */
1284
- png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
1285
- png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit
1286
- depth files */
1287
- png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to
1288
- screen */
1289
- png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
1290
- #endif
1291
-
1292
- #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
1293
- png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each
1294
- available channel */
1295
- #endif
1296
-
1297
- #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
1298
- png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit
1299
- tranformation */
1300
- #endif
1301
-
1302
- #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
1303
- || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
1304
- png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for
1305
- paletted files */
1306
- png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for
1307
- non-paletted files */
1308
- #endif
1309
-
1310
- png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each
1311
- row is decoded */
1312
- png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each
1313
- row is encoded */
1314
- #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
1315
- png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header
1316
- data fully read */
1317
- png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each
1318
- prog. row is decoded */
1319
- png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image
1320
- is complete */
1321
- png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in
1322
- save_buffer */
1323
- png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously
1324
- read data */
1325
- png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in
1326
- current_buffer */
1327
- png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently
1328
- used data */
1329
- png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input
1330
- chunk */
1331
- png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in
1332
- input data */
1333
- png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now
1334
- in save_buffer */
1335
- png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of
1336
- save_buffer */
1337
- png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of
1338
- available input data */
1339
- png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now
1340
- in current_buffer */
1341
- int process_mode PNG_DEPSTRUCT; /* what push library
1342
- is currently doing */
1343
- int cur_palette PNG_DEPSTRUCT; /* current push library
1344
- palette index */
1345
-
1346
- # ifdef PNG_TEXT_SUPPORTED
1347
- png_size_t current_text_size PNG_DEPSTRUCT; /* current size of
1348
- text input data */
1349
- png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left
1350
- to read in input */
1351
- png_charp current_text PNG_DEPSTRUCT; /* current text chunk
1352
- buffer */
1353
- png_charp current_text_ptr PNG_DEPSTRUCT; /* current location
1354
- in current_text */
1355
- # endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
1356
-
1357
- #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
1358
-
1359
- #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
1360
- /* For the Borland special 64K segment handler */
1361
- png_bytepp offset_table_ptr PNG_DEPSTRUCT;
1362
- png_bytep offset_table PNG_DEPSTRUCT;
1363
- png_uint_16 offset_table_number PNG_DEPSTRUCT;
1364
- png_uint_16 offset_table_count PNG_DEPSTRUCT;
1365
- png_uint_16 offset_table_count_free PNG_DEPSTRUCT;
1366
- #endif
1367
-
1368
- #ifdef PNG_READ_QUANTIZE_SUPPORTED
1369
- png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for quantizing */
1370
- png_bytep quantize_index PNG_DEPSTRUCT; /* index translation for palette
1371
- files */
1372
- #endif
1373
-
1374
- #if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
1375
- png_uint_16p hist PNG_DEPSTRUCT; /* histogram */
1376
- #endif
1377
-
1378
- #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
1379
- png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row
1380
- filter selection */
1381
- png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights
1382
- for previous rows */
1383
- png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of
1384
- previous row(s) */
1385
- png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous
1386
- line(s) */
1387
- png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for
1388
- previous line(s) */
1389
- png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter
1390
- calculation cost */
1391
- png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter
1392
- calculation cost */
1393
- #endif
1394
-
1395
- #ifdef PNG_TIME_RFC1123_SUPPORTED
1396
- png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */
1397
- #endif
1398
-
1399
- /* New members added in libpng-1.0.6 */
1400
-
1401
- png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is
1402
- responsible for freeing */
1403
-
1404
- #ifdef PNG_USER_CHUNKS_SUPPORTED
1405
- png_voidp user_chunk_ptr PNG_DEPSTRUCT;
1406
- png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read
1407
- chunk handler */
1408
- #endif
1409
-
1410
- #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1411
- int num_chunk_list PNG_DEPSTRUCT;
1412
- png_bytep chunk_list PNG_DEPSTRUCT;
1413
- #endif
1414
-
1415
- /* New members added in libpng-1.0.3 */
1416
- #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
1417
- png_byte rgb_to_gray_status PNG_DEPSTRUCT;
1418
- /* These were changed from png_byte in libpng-1.0.6 */
1419
- png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT;
1420
- png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT;
1421
- png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT;
1422
- #endif
1423
-
1424
- /* New member added in libpng-1.0.4 (renamed in 1.0.9) */
1425
- #if defined(PNG_MNG_FEATURES_SUPPORTED) || \
1426
- defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
1427
- defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
1428
- /* Changed from png_byte to png_uint_32 at version 1.2.0 */
1429
- png_uint_32 mng_features_permitted PNG_DEPSTRUCT;
1430
- #endif
1431
-
1432
- /* New member added in libpng-1.0.7 */
1433
- #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
1434
- png_fixed_point int_gamma PNG_DEPSTRUCT;
1435
- #endif
1436
-
1437
- /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
1438
- #ifdef PNG_MNG_FEATURES_SUPPORTED
1439
- png_byte filter_type PNG_DEPSTRUCT;
1440
- #endif
1441
-
1442
- /* New members added in libpng-1.2.0 */
1443
-
1444
- /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
1445
- #ifdef PNG_USER_MEM_SUPPORTED
1446
- png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for
1447
- mem functions */
1448
- png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for
1449
- allocating memory */
1450
- png_free_ptr free_fn PNG_DEPSTRUCT; /* function for
1451
- freeing memory */
1452
- #endif
1453
-
1454
- /* New member added in libpng-1.0.13 and 1.2.0 */
1455
- png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current
1456
- (unfiltered) row */
1457
-
1458
- #ifdef PNG_READ_QUANTIZE_SUPPORTED
1459
- /* The following three members were added at version 1.0.14 and 1.2.4 */
1460
- png_bytep quantize_sort PNG_DEPSTRUCT; /* working sort array */
1461
- png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original
1462
- index currently is
1463
- in the palette */
1464
- png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index
1465
- points to this
1466
- palette color */
1467
- #endif
1468
-
1469
- /* New members added in libpng-1.0.16 and 1.2.6 */
1470
- png_byte compression_type PNG_DEPSTRUCT;
1471
-
1472
- #ifdef PNG_USER_LIMITS_SUPPORTED
1473
- png_uint_32 user_width_max PNG_DEPSTRUCT;
1474
- png_uint_32 user_height_max PNG_DEPSTRUCT;
1475
- /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
1476
- * chunks that can be stored (0 means unlimited).
1477
- */
1478
- png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;
1479
- #endif
1480
-
1481
- /* New member added in libpng-1.0.25 and 1.2.17 */
1482
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
1483
- /* Storage for unknown chunk that the library doesn't recognize. */
1484
- png_unknown_chunk unknown_chunk PNG_DEPSTRUCT;
1485
- #endif
1486
-
1487
- /* New members added in libpng-1.2.26 */
1488
- png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT;
1489
- png_uint_32 old_prev_row_size PNG_DEPSTRUCT;
1490
-
1491
- /* New member added in libpng-1.2.30 */
1492
- png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
1493
-
1494
- #ifdef PNG_IO_STATE_SUPPORTED
1495
- /* New member added in libpng-1.4.0 */
1496
- png_uint_32 io_state PNG_DEPSTRUCT;
1497
- #endif
1498
- };
1499
-
1500
-
1501
- /* This triggers a compiler error in png.c, if png.c and png.h
1502
- * do not agree upon the version number.
959
+ /* NOTE: prior to 1.5 these functions had no 'API' style declaration,
960
+ * this allowed the zlib default functions to be used on Windows
961
+ * platforms. In 1.5 the zlib default malloc (which just calls malloc and
962
+ * ignores the first argument) should be completely compatible with the
963
+ * following.
1503
964
  */
1504
- typedef png_structp version_1_4_12;
965
+ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
966
+ png_alloc_size_t));
967
+ typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
1505
968
 
1506
- typedef png_struct FAR * FAR * png_structpp;
1507
-
1508
- /* Here are the function definitions most commonly used. This is not
1509
- * the place to find out how to use libpng. See libpng.txt for the
969
+ /* Section 3: exported functions
970
+ * Here are the function definitions most commonly used. This is not
971
+ * the place to find out how to use libpng. See libpng-manual.txt for the
1510
972
  * full explanation, see example.c for the summary. This just provides
1511
973
  * a simple one line description of the use of each function.
974
+ *
975
+ * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in
976
+ * pngconf.h and in the *.dfn files in the scripts directory.
977
+ *
978
+ * PNG_EXPORT(ordinal, type, name, (args));
979
+ *
980
+ * ordinal: ordinal that is used while building
981
+ * *.def files. The ordinal value is only
982
+ * relevant when preprocessing png.h with
983
+ * the *.dfn files for building symbol table
984
+ * entries, and are removed by pngconf.h.
985
+ * type: return type of the function
986
+ * name: function name
987
+ * args: function arguments, with types
988
+ *
989
+ * When we wish to append attributes to a function prototype we use
990
+ * the PNG_EXPORTA() macro instead.
991
+ *
992
+ * PNG_EXPORTA(ordinal, type, name, (args), attributes);
993
+ *
994
+ * ordinal, type, name, and args: same as in PNG_EXPORT().
995
+ * attributes: function attributes
1512
996
  */
1513
997
 
1514
998
  /* Returns the version number of the library */
1515
- PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
999
+ PNG_EXPORT(1, png_uint_32, png_access_version_number, (void));
1516
1000
 
1517
1001
  /* Tell lib we have already handled the first <num_bytes> magic bytes.
1518
1002
  * Handling more than 8 bytes from the beginning of the file is an error.
1519
1003
  */
1520
- PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
1521
- int num_bytes));
1004
+ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
1522
1005
 
1523
1006
  /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
1524
1007
  * PNG file. Returns zero if the supplied bytes match the 8-byte PNG
1525
1008
  * signature, and non-zero otherwise. Having num_to_check == 0 or
1526
1009
  * start > 7 will always fail (ie return non-zero).
1527
1010
  */
1528
- PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
1529
- png_size_t num_to_check));
1011
+ PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start,
1012
+ png_size_t num_to_check));
1530
1013
 
1531
1014
  /* Simple signature checking function. This is the same as calling
1532
1015
  * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
1533
1016
  */
1534
- #define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n))
1017
+ #define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
1535
1018
 
1536
1019
  /* Allocate and initialize png_ptr struct for reading, and any other memory. */
1537
- PNG_EXPORT(png_structp,png_create_read_struct)
1538
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
1539
- png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
1020
+ PNG_EXPORTA(4, png_structp, png_create_read_struct,
1021
+ (png_const_charp user_png_ver, png_voidp error_ptr,
1022
+ png_error_ptr error_fn, png_error_ptr warn_fn),
1023
+ PNG_ALLOCATED);
1540
1024
 
1541
1025
  /* Allocate and initialize png_ptr struct for writing, and any other memory */
1542
- PNG_EXPORT(png_structp,png_create_write_struct)
1543
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
1544
- png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
1026
+ PNG_EXPORTA(5, png_structp, png_create_write_struct,
1027
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
1028
+ png_error_ptr warn_fn),
1029
+ PNG_ALLOCATED);
1545
1030
 
1546
- PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
1547
- PNGARG((png_const_structp png_ptr));
1031
+ PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
1032
+ (png_const_structrp png_ptr));
1548
1033
 
1549
- PNG_EXPORT(void,png_set_compression_buffer_size)
1550
- PNGARG((png_structp png_ptr, png_size_t size));
1034
+ PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr,
1035
+ png_size_t size));
1551
1036
 
1552
1037
  /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
1553
1038
  * match up.
@@ -1560,288 +1045,559 @@ PNG_EXPORT(void,png_set_compression_buffer_size)
1560
1045
  * allocated by the library - the call will return NULL on a mismatch
1561
1046
  * indicating an ABI mismatch.
1562
1047
  */
1563
- PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
1564
- PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t
1565
- jmp_buf_size));
1048
+ PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr,
1049
+ png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
1566
1050
  # define png_jmpbuf(png_ptr) \
1567
- (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
1051
+ (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf))))
1568
1052
  #else
1569
1053
  # define png_jmpbuf(png_ptr) \
1570
- (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
1054
+ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
1571
1055
  #endif
1056
+ /* This function should be used by libpng applications in place of
1057
+ * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it
1058
+ * will use it; otherwise it will call PNG_ABORT(). This function was
1059
+ * added in libpng-1.5.0.
1060
+ */
1061
+ PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val),
1062
+ PNG_NORETURN);
1572
1063
 
1573
1064
  #ifdef PNG_READ_SUPPORTED
1574
1065
  /* Reset the compression stream */
1575
- PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
1066
+ PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED);
1576
1067
  #endif
1577
1068
 
1578
1069
  /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
1579
1070
  #ifdef PNG_USER_MEM_SUPPORTED
1580
- PNG_EXPORT(png_structp,png_create_read_struct_2)
1581
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
1582
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
1583
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
1584
- PNG_EXPORT(png_structp,png_create_write_struct_2)
1585
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
1586
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
1587
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
1071
+ PNG_EXPORTA(11, png_structp, png_create_read_struct_2,
1072
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
1073
+ png_error_ptr warn_fn,
1074
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
1075
+ PNG_ALLOCATED);
1076
+ PNG_EXPORTA(12, png_structp, png_create_write_struct_2,
1077
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
1078
+ png_error_ptr warn_fn,
1079
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
1080
+ PNG_ALLOCATED);
1588
1081
  #endif
1589
1082
 
1590
1083
  /* Write the PNG file signature. */
1591
- PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr));
1084
+ PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr));
1592
1085
 
1593
1086
  /* Write a PNG chunk - size, type, (optional) data, CRC. */
1594
- PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
1595
- png_bytep chunk_name, png_bytep data, png_size_t length));
1087
+ PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep
1088
+ chunk_name, png_const_bytep data, png_size_t length));
1596
1089
 
1597
1090
  /* Write the start of a PNG chunk - length and chunk name. */
1598
- PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
1599
- png_bytep chunk_name, png_uint_32 length));
1091
+ PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
1092
+ png_const_bytep chunk_name, png_uint_32 length));
1600
1093
 
1601
1094
  /* Write the data of a PNG chunk started with png_write_chunk_start(). */
1602
- PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
1603
- png_bytep data, png_size_t length));
1095
+ PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr,
1096
+ png_const_bytep data, png_size_t length));
1604
1097
 
1605
1098
  /* Finish a chunk started with png_write_chunk_start() (includes CRC). */
1606
- PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
1099
+ PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr));
1607
1100
 
1608
1101
  /* Allocate and initialize the info structure */
1609
- PNG_EXPORT(png_infop,png_create_info_struct)
1610
- PNGARG((png_structp png_ptr)) PNG_ALLOCATED;
1102
+ PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr),
1103
+ PNG_ALLOCATED);
1611
1104
 
1612
- PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
1613
- png_size_t png_info_struct_size));
1105
+ /* DEPRECATED: this function allowed init structures to be created using the
1106
+ * default allocation method (typically malloc). Use is deprecated in 1.6.0 and
1107
+ * the API will be removed in the future.
1108
+ */
1109
+ PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr,
1110
+ png_size_t png_info_struct_size), PNG_DEPRECATED);
1614
1111
 
1615
1112
  /* Writes all the PNG information before the image. */
1616
- PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
1617
- png_infop info_ptr));
1618
- PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
1619
- png_infop info_ptr));
1113
+ PNG_EXPORT(20, void, png_write_info_before_PLTE,
1114
+ (png_structrp png_ptr, png_const_inforp info_ptr));
1115
+ PNG_EXPORT(21, void, png_write_info,
1116
+ (png_structrp png_ptr, png_const_inforp info_ptr));
1620
1117
 
1621
1118
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1622
1119
  /* Read the information before the actual image data. */
1623
- PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
1624
- png_infop info_ptr));
1120
+ PNG_EXPORT(22, void, png_read_info,
1121
+ (png_structrp png_ptr, png_inforp info_ptr));
1625
1122
  #endif
1626
1123
 
1627
1124
  #ifdef PNG_TIME_RFC1123_SUPPORTED
1628
- PNG_EXPORT(png_charp,png_convert_to_rfc1123)
1629
- PNGARG((png_structp png_ptr, png_timep ptime));
1125
+ /* Convert to a US string format: there is no localization support in this
1126
+ * routine. The original implementation used a 29 character buffer in
1127
+ * png_struct, this will be removed in future versions.
1128
+ */
1129
+ #if PNG_LIBPNG_VER < 10700
1130
+ /* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */
1131
+ PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr,
1132
+ png_const_timep ptime),PNG_DEPRECATED);
1133
+ #endif
1134
+ PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29],
1135
+ png_const_timep ptime));
1630
1136
  #endif
1631
1137
 
1632
1138
  #ifdef PNG_CONVERT_tIME_SUPPORTED
1633
1139
  /* Convert from a struct tm to png_time */
1634
- PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
1635
- struct tm FAR * ttime));
1140
+ PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
1141
+ const struct tm * ttime));
1636
1142
 
1637
1143
  /* Convert from time_t to png_time. Uses gmtime() */
1638
- PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
1639
- time_t ttime));
1144
+ PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
1640
1145
  #endif /* PNG_CONVERT_tIME_SUPPORTED */
1641
1146
 
1642
1147
  #ifdef PNG_READ_EXPAND_SUPPORTED
1643
1148
  /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
1644
- PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
1645
- PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
1646
- png_ptr));
1647
- PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
1648
- PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
1149
+ PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr));
1150
+ PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr));
1151
+ PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr));
1152
+ PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr));
1153
+ #endif
1154
+
1155
+ #ifdef PNG_READ_EXPAND_16_SUPPORTED
1156
+ /* Expand to 16-bit channels, forces conversion of palette to RGB and expansion
1157
+ * of a tRNS chunk if present.
1158
+ */
1159
+ PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr));
1649
1160
  #endif
1650
1161
 
1651
1162
  #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
1652
1163
  /* Use blue, green, red order for pixels. */
1653
- PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
1164
+ PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr));
1654
1165
  #endif
1655
1166
 
1656
1167
  #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
1657
1168
  /* Expand the grayscale to 24-bit RGB if necessary. */
1658
- PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
1169
+ PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr));
1659
1170
  #endif
1660
1171
 
1661
1172
  #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
1662
1173
  /* Reduce RGB to grayscale. */
1663
- #ifdef PNG_FLOATING_POINT_SUPPORTED
1664
- PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
1665
- int error_action, double red, double green ));
1174
+ #define PNG_ERROR_ACTION_NONE 1
1175
+ #define PNG_ERROR_ACTION_WARN 2
1176
+ #define PNG_ERROR_ACTION_ERROR 3
1177
+ #define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/
1178
+
1179
+ PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr,
1180
+ int error_action, double red, double green))
1181
+ PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr,
1182
+ int error_action, png_fixed_point red, png_fixed_point green))
1183
+
1184
+ PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp
1185
+ png_ptr));
1666
1186
  #endif
1667
- PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
1668
- int error_action, png_fixed_point red, png_fixed_point green ));
1669
- PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_const_structp
1670
- png_ptr));
1187
+
1188
+ #ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
1189
+ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
1190
+ png_colorp palette));
1671
1191
  #endif
1672
1192
 
1673
- PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
1674
- png_colorp palette));
1193
+ #ifdef PNG_READ_ALPHA_MODE_SUPPORTED
1194
+ /* How the alpha channel is interpreted - this affects how the color channels of
1195
+ * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
1196
+ * file, is present.
1197
+ *
1198
+ * This has no effect on the way pixels are written into a PNG output
1199
+ * datastream. The color samples in a PNG datastream are never premultiplied
1200
+ * with the alpha samples.
1201
+ *
1202
+ * The default is to return data according to the PNG specification: the alpha
1203
+ * channel is a linear measure of the contribution of the pixel to the
1204
+ * corresponding composited pixel. The gamma encoded color channels must be
1205
+ * scaled according to the contribution and to do this it is necessary to undo
1206
+ * the encoding, scale the color values, perform the composition and reencode
1207
+ * the values. This is the 'PNG' mode.
1208
+ *
1209
+ * The alternative is to 'associate' the alpha with the color information by
1210
+ * storing color channel values that have been scaled by the alpha. The
1211
+ * advantage is that the color channels can be resampled (the image can be
1212
+ * scaled) in this form. The disadvantage is that normal practice is to store
1213
+ * linear, not (gamma) encoded, values and this requires 16-bit channels for
1214
+ * still images rather than the 8-bit channels that are just about sufficient if
1215
+ * gamma encoding is used. In addition all non-transparent pixel values,
1216
+ * including completely opaque ones, must be gamma encoded to produce the final
1217
+ * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the
1218
+ * latter being the two common names for associated alpha color channels.)
1219
+ *
1220
+ * Since it is not necessary to perform arithmetic on opaque color values so
1221
+ * long as they are not to be resampled and are in the final color space it is
1222
+ * possible to optimize the handling of alpha by storing the opaque pixels in
1223
+ * the PNG format (adjusted for the output color space) while storing partially
1224
+ * opaque pixels in the standard, linear, format. The accuracy required for
1225
+ * standard alpha composition is relatively low, because the pixels are
1226
+ * isolated, therefore typically the accuracy loss in storing 8-bit linear
1227
+ * values is acceptable. (This is not true if the alpha channel is used to
1228
+ * simulate transparency over large areas - use 16 bits or the PNG mode in
1229
+ * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is
1230
+ * treated as opaque only if the alpha value is equal to the maximum value.
1231
+ *
1232
+ * The final choice is to gamma encode the alpha channel as well. This is
1233
+ * broken because, in practice, no implementation that uses this choice
1234
+ * correctly undoes the encoding before handling alpha composition. Use this
1235
+ * choice only if other serious errors in the software or hardware you use
1236
+ * mandate it; the typical serious error is for dark halos to appear around
1237
+ * opaque areas of the composited PNG image because of arithmetic overflow.
1238
+ *
1239
+ * The API function png_set_alpha_mode specifies which of these choices to use
1240
+ * with an enumerated 'mode' value and the gamma of the required output:
1241
+ */
1242
+ #define PNG_ALPHA_PNG 0 /* according to the PNG standard */
1243
+ #define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */
1244
+ #define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */
1245
+ #define PNG_ALPHA_PREMULTIPLIED 1 /* as above */
1246
+ #define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */
1247
+ #define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */
1248
+
1249
+ PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode,
1250
+ double output_gamma))
1251
+ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
1252
+ int mode, png_fixed_point output_gamma))
1253
+ #endif
1254
+
1255
+ #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
1256
+ /* The output_gamma value is a screen gamma in libpng terminology: it expresses
1257
+ * how to decode the output values, not how they are encoded. The values used
1258
+ * correspond to the normal numbers used to describe the overall gamma of a
1259
+ * computer display system; for example 2.2 for an sRGB conformant system. The
1260
+ * values are scaled by 100000 in the _fixed version of the API (so 220000 for
1261
+ * sRGB.)
1262
+ *
1263
+ * The inverse of the value is always used to provide a default for the PNG file
1264
+ * encoding if it has no gAMA chunk and if png_set_gamma() has not been called
1265
+ * to override the PNG gamma information.
1266
+ *
1267
+ * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode
1268
+ * opaque pixels however pixels with lower alpha values are not encoded,
1269
+ * regardless of the output gamma setting.
1270
+ *
1271
+ * When the standard Porter Duff handling is requested with mode 1 the output
1272
+ * encoding is set to be linear and the output_gamma value is only relevant
1273
+ * as a default for input data that has no gamma information. The linear output
1274
+ * encoding will be overridden if png_set_gamma() is called - the results may be
1275
+ * highly unexpected!
1276
+ *
1277
+ * The following numbers are derived from the sRGB standard and the research
1278
+ * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of
1279
+ * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing
1280
+ * correction required to take account of any differences in the color
1281
+ * environment of the original scene and the intended display environment; the
1282
+ * value expresses how to *decode* the image for display, not how the original
1283
+ * data was *encoded*.
1284
+ *
1285
+ * sRGB provides a peg for the PNG standard by defining a viewing environment.
1286
+ * sRGB itself, and earlier TV standards, actually use a more complex transform
1287
+ * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is
1288
+ * limited to simple power laws.) By saying that an image for direct display on
1289
+ * an sRGB conformant system should be stored with a gAMA chunk value of 45455
1290
+ * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification
1291
+ * makes it possible to derive values for other display systems and
1292
+ * environments.
1293
+ *
1294
+ * The Mac value is deduced from the sRGB based on an assumption that the actual
1295
+ * extra viewing correction used in early Mac display systems was implemented as
1296
+ * a power 1.45 lookup table.
1297
+ *
1298
+ * Any system where a programmable lookup table is used or where the behavior of
1299
+ * the final display device characteristics can be changed requires system
1300
+ * specific code to obtain the current characteristic. However this can be
1301
+ * difficult and most PNG gamma correction only requires an approximate value.
1302
+ *
1303
+ * By default, if png_set_alpha_mode() is not called, libpng assumes that all
1304
+ * values are unencoded, linear, values and that the output device also has a
1305
+ * linear characteristic. This is only very rarely correct - it is invariably
1306
+ * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the
1307
+ * default if you don't know what the right answer is!
1308
+ *
1309
+ * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS
1310
+ * 10.6) which used a correction table to implement a somewhat lower gamma on an
1311
+ * otherwise sRGB system.
1312
+ *
1313
+ * Both these values are reserved (not simple gamma values) in order to allow
1314
+ * more precise correction internally in the future.
1315
+ *
1316
+ * NOTE: the following values can be passed to either the fixed or floating
1317
+ * point APIs, but the floating point API will also accept floating point
1318
+ * values.
1319
+ */
1320
+ #define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */
1321
+ #define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */
1322
+ #define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */
1323
+ #define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */
1324
+ #endif
1325
+
1326
+ /* The following are examples of calls to png_set_alpha_mode to achieve the
1327
+ * required overall gamma correction and, where necessary, alpha
1328
+ * premultiplication.
1329
+ *
1330
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
1331
+ * This is the default libpng handling of the alpha channel - it is not
1332
+ * pre-multiplied into the color components. In addition the call states
1333
+ * that the output is for a sRGB system and causes all PNG files without gAMA
1334
+ * chunks to be assumed to be encoded using sRGB.
1335
+ *
1336
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
1337
+ * In this case the output is assumed to be something like an sRGB conformant
1338
+ * display preceeded by a power-law lookup table of power 1.45. This is how
1339
+ * early Mac systems behaved.
1340
+ *
1341
+ * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
1342
+ * This is the classic Jim Blinn approach and will work in academic
1343
+ * environments where everything is done by the book. It has the shortcoming
1344
+ * of assuming that input PNG data with no gamma information is linear - this
1345
+ * is unlikely to be correct unless the PNG files where generated locally.
1346
+ * Most of the time the output precision will be so low as to show
1347
+ * significant banding in dark areas of the image.
1348
+ *
1349
+ * png_set_expand_16(pp);
1350
+ * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB);
1351
+ * This is a somewhat more realistic Jim Blinn inspired approach. PNG files
1352
+ * are assumed to have the sRGB encoding if not marked with a gamma value and
1353
+ * the output is always 16 bits per component. This permits accurate scaling
1354
+ * and processing of the data. If you know that your input PNG files were
1355
+ * generated locally you might need to replace PNG_DEFAULT_sRGB with the
1356
+ * correct value for your system.
1357
+ *
1358
+ * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB);
1359
+ * If you just need to composite the PNG image onto an existing background
1360
+ * and if you control the code that does this you can use the optimization
1361
+ * setting. In this case you just copy completely opaque pixels to the
1362
+ * output. For pixels that are not completely transparent (you just skip
1363
+ * those) you do the composition math using png_composite or png_composite_16
1364
+ * below then encode the resultant 8-bit or 16-bit values to match the output
1365
+ * encoding.
1366
+ *
1367
+ * Other cases
1368
+ * If neither the PNG nor the standard linear encoding work for you because
1369
+ * of the software or hardware you use then you have a big problem. The PNG
1370
+ * case will probably result in halos around the image. The linear encoding
1371
+ * will probably result in a washed out, too bright, image (it's actually too
1372
+ * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably
1373
+ * substantially reduce the halos. Alternatively try:
1374
+ *
1375
+ * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB);
1376
+ * This option will also reduce the halos, but there will be slight dark
1377
+ * halos round the opaque parts of the image where the background is light.
1378
+ * In the OPTIMIZED mode the halos will be light halos where the background
1379
+ * is dark. Take your pick - the halos are unavoidable unless you can get
1380
+ * your hardware/software fixed! (The OPTIMIZED approach is slightly
1381
+ * faster.)
1382
+ *
1383
+ * When the default gamma of PNG files doesn't match the output gamma.
1384
+ * If you have PNG files with no gamma information png_set_alpha_mode allows
1385
+ * you to provide a default gamma, but it also sets the ouput gamma to the
1386
+ * matching value. If you know your PNG files have a gamma that doesn't
1387
+ * match the output you can take advantage of the fact that
1388
+ * png_set_alpha_mode always sets the output gamma but only sets the PNG
1389
+ * default if it is not already set:
1390
+ *
1391
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
1392
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
1393
+ * The first call sets both the default and the output gamma values, the
1394
+ * second call overrides the output gamma without changing the default. This
1395
+ * is easier than achieving the same effect with png_set_gamma. You must use
1396
+ * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will
1397
+ * fire if more than one call to png_set_alpha_mode and png_set_background is
1398
+ * made in the same read operation, however multiple calls with PNG_ALPHA_PNG
1399
+ * are ignored.
1400
+ */
1675
1401
 
1676
1402
  #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
1677
- PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
1403
+ PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr));
1678
1404
  #endif
1679
1405
 
1680
1406
  #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
1681
1407
  defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
1682
- PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
1408
+ PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr));
1683
1409
  #endif
1684
1410
 
1685
1411
  #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
1686
1412
  defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
1687
- PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
1413
+ PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr));
1688
1414
  #endif
1689
1415
 
1690
1416
  #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
1691
1417
  /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
1692
- PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
1693
- png_uint_32 filler, int flags));
1418
+ PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
1419
+ int flags));
1694
1420
  /* The values of the PNG_FILLER_ defines should NOT be changed */
1695
- #define PNG_FILLER_BEFORE 0
1696
- #define PNG_FILLER_AFTER 1
1421
+ # define PNG_FILLER_BEFORE 0
1422
+ # define PNG_FILLER_AFTER 1
1697
1423
  /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
1698
- PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
1699
- png_uint_32 filler, int flags));
1424
+ PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
1425
+ png_uint_32 filler, int flags));
1700
1426
  #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
1701
1427
 
1702
1428
  #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
1703
1429
  /* Swap bytes in 16-bit depth files. */
1704
- PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));
1430
+ PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr));
1705
1431
  #endif
1706
1432
 
1707
1433
  #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
1708
1434
  /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
1709
- PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));
1435
+ PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr));
1710
1436
  #endif
1711
1437
 
1712
1438
  #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
1713
1439
  defined(PNG_WRITE_PACKSWAP_SUPPORTED)
1714
1440
  /* Swap packing order of pixels in bytes. */
1715
- PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
1441
+ PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr));
1716
1442
  #endif
1717
1443
 
1718
1444
  #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
1719
1445
  /* Converts files to legal bit depths. */
1720
- PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
1721
- png_color_8p true_bits));
1446
+ PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p
1447
+ true_bits));
1722
1448
  #endif
1723
1449
 
1724
1450
  #if defined(PNG_READ_INTERLACING_SUPPORTED) || \
1725
1451
  defined(PNG_WRITE_INTERLACING_SUPPORTED)
1726
- /* Have the code handle the interlacing. Returns the number of passes. */
1727
- PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
1452
+ /* Have the code handle the interlacing. Returns the number of passes.
1453
+ * MUST be called before png_read_update_info or png_start_read_image,
1454
+ * otherwise it will not have the desired effect. Note that it is still
1455
+ * necessary to call png_read_row or png_read_rows png_get_image_height
1456
+ * times for each pass.
1457
+ */
1458
+ PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr));
1728
1459
  #endif
1729
1460
 
1730
1461
  #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
1731
1462
  /* Invert monochrome files */
1732
- PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
1463
+ PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr));
1733
1464
  #endif
1734
1465
 
1735
1466
  #ifdef PNG_READ_BACKGROUND_SUPPORTED
1736
- /* Handle alpha and tRNS by replacing with a background color. */
1737
- #ifdef PNG_FLOATING_POINT_SUPPORTED
1738
- PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
1739
- png_color_16p background_color, int background_gamma_code,
1740
- int need_expand, double background_gamma));
1467
+ /* Handle alpha and tRNS by replacing with a background color. Prior to
1468
+ * libpng-1.5.4 this API must not be called before the PNG file header has been
1469
+ * read. Doing so will result in unexpected behavior and possible warnings or
1470
+ * errors if the PNG file contains a bKGD chunk.
1471
+ */
1472
+ PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr,
1473
+ png_const_color_16p background_color, int background_gamma_code,
1474
+ int need_expand, double background_gamma))
1475
+ PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr,
1476
+ png_const_color_16p background_color, int background_gamma_code,
1477
+ int need_expand, png_fixed_point background_gamma))
1478
+ #endif
1479
+ #ifdef PNG_READ_BACKGROUND_SUPPORTED
1480
+ # define PNG_BACKGROUND_GAMMA_UNKNOWN 0
1481
+ # define PNG_BACKGROUND_GAMMA_SCREEN 1
1482
+ # define PNG_BACKGROUND_GAMMA_FILE 2
1483
+ # define PNG_BACKGROUND_GAMMA_UNIQUE 3
1741
1484
  #endif
1742
- #define PNG_BACKGROUND_GAMMA_UNKNOWN 0
1743
- #define PNG_BACKGROUND_GAMMA_SCREEN 1
1744
- #define PNG_BACKGROUND_GAMMA_FILE 2
1745
- #define PNG_BACKGROUND_GAMMA_UNIQUE 3
1485
+
1486
+ #ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
1487
+ /* Scale a 16-bit depth file down to 8-bit, accurately. */
1488
+ PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr));
1746
1489
  #endif
1747
1490
 
1748
- #ifdef PNG_READ_16_TO_8_SUPPORTED
1491
+ #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1492
+ #define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */
1749
1493
  /* Strip the second byte of information from a 16-bit depth file. */
1750
- PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
1494
+ PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr));
1751
1495
  #endif
1752
1496
 
1753
1497
  #ifdef PNG_READ_QUANTIZE_SUPPORTED
1754
1498
  /* Turn on quantizing, and reduce the palette to the number of colors
1755
- * available. Prior to libpng-1.4.2, this was png_set_dither().
1499
+ * available.
1756
1500
  */
1757
- PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr,
1758
- png_colorp palette, int num_palette, int maximum_colors,
1759
- png_uint_16p histogram, int full_quantize));
1501
+ PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr,
1502
+ png_colorp palette, int num_palette, int maximum_colors,
1503
+ png_const_uint_16p histogram, int full_quantize));
1760
1504
  #endif
1761
- /* This migration aid will be removed from libpng-1.5.0 */
1762
- #define png_set_dither png_set_quantize
1763
1505
 
1764
1506
  #ifdef PNG_READ_GAMMA_SUPPORTED
1765
- /* Handle gamma correction. Screen_gamma=(display_exponent) */
1766
- #ifdef PNG_FLOATING_POINT_SUPPORTED
1767
- PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
1768
- double screen_gamma, double default_file_gamma));
1769
- #endif
1770
- #endif
1507
+ /* The threshold on gamma processing is configurable but hard-wired into the
1508
+ * library. The following is the floating point variant.
1509
+ */
1510
+ #define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001)
1771
1511
 
1512
+ /* Handle gamma correction. Screen_gamma=(display_exponent).
1513
+ * NOTE: this API simply sets the screen and file gamma values. It will
1514
+ * therefore override the value for gamma in a PNG file if it is called after
1515
+ * the file header has been read - use with care - call before reading the PNG
1516
+ * file for best results!
1517
+ *
1518
+ * These routines accept the same gamma values as png_set_alpha_mode (described
1519
+ * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either
1520
+ * API (floating point or fixed.) Notice, however, that the 'file_gamma' value
1521
+ * is the inverse of a 'screen gamma' value.
1522
+ */
1523
+ PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr,
1524
+ double screen_gamma, double override_file_gamma))
1525
+ PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr,
1526
+ png_fixed_point screen_gamma, png_fixed_point override_file_gamma))
1527
+ #endif
1772
1528
 
1773
1529
  #ifdef PNG_WRITE_FLUSH_SUPPORTED
1774
1530
  /* Set how many lines between output flushes - 0 for no flushing */
1775
- PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
1531
+ PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows));
1776
1532
  /* Flush the current PNG output buffer */
1777
- PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
1533
+ PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr));
1778
1534
  #endif
1779
1535
 
1780
1536
  /* Optional update palette with requested transformations */
1781
- PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
1537
+ PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr));
1782
1538
 
1783
1539
  /* Optional call to update the users info structure */
1784
- PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
1785
- png_infop info_ptr));
1540
+ PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr,
1541
+ png_inforp info_ptr));
1786
1542
 
1787
1543
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1788
1544
  /* Read one or more rows of image data. */
1789
- PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
1790
- png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
1545
+ PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row,
1546
+ png_bytepp display_row, png_uint_32 num_rows));
1791
1547
  #endif
1792
1548
 
1793
1549
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1794
1550
  /* Read a row of data. */
1795
- PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
1796
- png_bytep row,
1797
- png_bytep display_row));
1551
+ PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row,
1552
+ png_bytep display_row));
1798
1553
  #endif
1799
1554
 
1800
1555
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1801
1556
  /* Read the whole image into memory at once. */
1802
- PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
1803
- png_bytepp image));
1557
+ PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image));
1804
1558
  #endif
1805
1559
 
1806
1560
  /* Write a row of image data */
1807
- PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
1808
- png_bytep row));
1561
+ PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr,
1562
+ png_const_bytep row));
1809
1563
 
1810
- /* Write a few rows of image data */
1811
- PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
1812
- png_bytepp row, png_uint_32 num_rows));
1564
+ /* Write a few rows of image data: (*row) is not written; however, the type
1565
+ * is declared as writeable to maintain compatibility with previous versions
1566
+ * of libpng and to allow the 'display_row' array from read_rows to be passed
1567
+ * unchanged to write_rows.
1568
+ */
1569
+ PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row,
1570
+ png_uint_32 num_rows));
1813
1571
 
1814
1572
  /* Write the image data */
1815
- PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
1816
- png_bytepp image));
1573
+ PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image));
1817
1574
 
1818
1575
  /* Write the end of the PNG file. */
1819
- PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
1820
- png_infop info_ptr));
1576
+ PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr,
1577
+ png_inforp info_ptr));
1821
1578
 
1822
1579
  #ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1823
1580
  /* Read the end of the PNG file. */
1824
- PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
1825
- png_infop info_ptr));
1581
+ PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr));
1826
1582
  #endif
1827
1583
 
1828
1584
  /* Free any memory associated with the png_info_struct */
1829
- PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
1830
- png_infopp info_ptr_ptr));
1585
+ PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr,
1586
+ png_infopp info_ptr_ptr));
1831
1587
 
1832
1588
  /* Free any memory associated with the png_struct and the png_info_structs */
1833
- PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
1834
- png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
1589
+ PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr,
1590
+ png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
1835
1591
 
1836
1592
  /* Free any memory associated with the png_struct and the png_info_structs */
1837
- PNG_EXPORT(void,png_destroy_write_struct)
1838
- PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
1593
+ PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr,
1594
+ png_infopp info_ptr_ptr));
1839
1595
 
1840
1596
  /* Set the libpng method of handling chunk CRC errors */
1841
- PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
1842
- int crit_action, int ancil_action));
1597
+ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action,
1598
+ int ancil_action));
1843
1599
 
1844
- /* Values for png_set_crc_action() to say how to handle CRC errors in
1600
+ /* Values for png_set_crc_action() say how to handle CRC errors in
1845
1601
  * ancillary and critical chunks, and whether to use the data contained
1846
1602
  * therein. Note that it is impossible to "discard" data in a critical
1847
1603
  * chunk. For versions prior to 0.90, the action was always error/quit,
@@ -1868,8 +1624,8 @@ PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
1868
1624
  /* Set the filtering method(s) used by libpng. Currently, the only valid
1869
1625
  * value for "method" is 0.
1870
1626
  */
1871
- PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
1872
- int filters));
1627
+ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
1628
+ int filters));
1873
1629
 
1874
1630
  /* Flags for png_set_filter() to say which filters to use. The flags
1875
1631
  * are chosen so that they don't conflict with real filter types
@@ -1924,11 +1680,13 @@ PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
1924
1680
  * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
1925
1681
  * to the UNWEIGHTED method, but with added encoding time/computation.
1926
1682
  */
1927
- #ifdef PNG_FLOATING_POINT_SUPPORTED
1928
- PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
1929
- int heuristic_method, int num_weights, png_doublep filter_weights,
1930
- png_doublep filter_costs));
1931
- #endif
1683
+ PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr,
1684
+ int heuristic_method, int num_weights, png_const_doublep filter_weights,
1685
+ png_const_doublep filter_costs))
1686
+ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
1687
+ (png_structrp png_ptr, int heuristic_method, int num_weights,
1688
+ png_const_fixed_point_p filter_weights,
1689
+ png_const_fixed_point_p filter_costs))
1932
1690
  #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
1933
1691
 
1934
1692
  /* Heuristic used for row filter selection. These defines should NOT be
@@ -1939,6 +1697,7 @@ PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
1939
1697
  #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */
1940
1698
  #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */
1941
1699
 
1700
+ #ifdef PNG_WRITE_SUPPORTED
1942
1701
  /* Set the library compression level. Currently, valid values range from
1943
1702
  * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
1944
1703
  * (0 - no compression, 9 - "maximal" compression). Note that tests have
@@ -1946,34 +1705,58 @@ PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
1946
1705
  * for PNG images, and do considerably fewer caclulations. In the future,
1947
1706
  * these values may not correspond directly to the zlib compression levels.
1948
1707
  */
1949
- PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
1950
- int level));
1708
+ PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr,
1709
+ int level));
1710
+
1711
+ PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr,
1712
+ int mem_level));
1713
+
1714
+ PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr,
1715
+ int strategy));
1716
+
1717
+ /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1718
+ * smaller value of window_bits if it can do so safely.
1719
+ */
1720
+ PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr,
1721
+ int window_bits));
1722
+
1723
+ PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr,
1724
+ int method));
1725
+ #endif
1951
1726
 
1952
- PNG_EXPORT(void,png_set_compression_mem_level)
1953
- PNGARG((png_structp png_ptr, int mem_level));
1727
+ #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
1728
+ /* Also set zlib parameters for compressing non-IDAT chunks */
1729
+ PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr,
1730
+ int level));
1954
1731
 
1955
- PNG_EXPORT(void,png_set_compression_strategy)
1956
- PNGARG((png_structp png_ptr, int strategy));
1732
+ PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr,
1733
+ int mem_level));
1957
1734
 
1958
- PNG_EXPORT(void,png_set_compression_window_bits)
1959
- PNGARG((png_structp png_ptr, int window_bits));
1735
+ PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr,
1736
+ int strategy));
1960
1737
 
1961
- PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
1962
- int method));
1738
+ /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1739
+ * smaller value of window_bits if it can do so safely.
1740
+ */
1741
+ PNG_EXPORT(225, void, png_set_text_compression_window_bits,
1742
+ (png_structrp png_ptr, int window_bits));
1743
+
1744
+ PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
1745
+ int method));
1746
+ #endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
1963
1747
 
1964
1748
  /* These next functions are called for input/output, memory, and error
1965
1749
  * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
1966
1750
  * and call standard C I/O routines such as fread(), fwrite(), and
1967
1751
  * fprintf(). These functions can be made to use other I/O routines
1968
1752
  * at run time for those applications that need to handle I/O in a
1969
- * different manner by calling png_set_???_fn(). See libpng.txt for
1753
+ * different manner by calling png_set_???_fn(). See libpng-manual.txt for
1970
1754
  * more information.
1971
1755
  */
1972
1756
 
1973
1757
  #ifdef PNG_STDIO_SUPPORTED
1974
1758
  /* Initialize the input/output for the PNG file to the default functions. */
1975
- PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr,
1976
- png_FILE_p fp));
1759
+ PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp));
1977
1760
  #endif
1978
1761
 
1979
1762
  /* Replace the (error and abort), and warning functions with user
@@ -1984,11 +1767,11 @@ PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr,
1984
1767
  * default function will be used.
1985
1768
  */
1986
1769
 
1987
- PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
1988
- png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
1770
+ PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr,
1771
+ png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
1989
1772
 
1990
1773
  /* Return the user pointer associated with the error functions */
1991
- PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_const_structp png_ptr));
1774
+ PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr));
1992
1775
 
1993
1776
  /* Replace the default data output functions with a user supplied one(s).
1994
1777
  * If buffered output is not used, then output_flush_fn can be set to NULL.
@@ -2000,101 +1783,164 @@ PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_const_structp png_ptr));
2000
1783
  * default flush function, which uses the standard *FILE structure, will
2001
1784
  * be used.
2002
1785
  */
2003
- PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
2004
- png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
1786
+ PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr,
1787
+ png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
2005
1788
 
2006
1789
  /* Replace the default data input function with a user supplied one. */
2007
- PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
2008
- png_voidp io_ptr, png_rw_ptr read_data_fn));
1790
+ PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr,
1791
+ png_rw_ptr read_data_fn));
2009
1792
 
2010
1793
  /* Return the user pointer associated with the I/O functions */
2011
- PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
1794
+ PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr));
2012
1795
 
2013
- PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
2014
- png_read_status_ptr read_row_fn));
1796
+ PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr,
1797
+ png_read_status_ptr read_row_fn));
2015
1798
 
2016
- PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
2017
- png_write_status_ptr write_row_fn));
1799
+ PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr,
1800
+ png_write_status_ptr write_row_fn));
2018
1801
 
2019
1802
  #ifdef PNG_USER_MEM_SUPPORTED
2020
1803
  /* Replace the default memory allocation functions with user supplied one(s). */
2021
- PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
2022
- png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
1804
+ PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr,
1805
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn));
2023
1806
  /* Return the user pointer associated with the memory functions */
2024
- PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_const_structp png_ptr));
1807
+ PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr));
2025
1808
  #endif
2026
1809
 
2027
1810
  #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
2028
- PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
2029
- png_ptr, png_user_transform_ptr read_user_transform_fn));
1811
+ PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr,
1812
+ png_user_transform_ptr read_user_transform_fn));
2030
1813
  #endif
2031
1814
 
2032
1815
  #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
2033
- PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
2034
- png_ptr, png_user_transform_ptr write_user_transform_fn));
1816
+ PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr,
1817
+ png_user_transform_ptr write_user_transform_fn));
2035
1818
  #endif
2036
1819
 
2037
- #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
2038
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
2039
- PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
2040
- png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
2041
- int user_transform_channels));
1820
+ #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
1821
+ PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr,
1822
+ png_voidp user_transform_ptr, int user_transform_depth,
1823
+ int user_transform_channels));
2042
1824
  /* Return the user pointer associated with the user transform functions */
2043
- PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
2044
- PNGARG((png_const_structp png_ptr));
1825
+ PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
1826
+ (png_const_structrp png_ptr));
1827
+ #endif
1828
+
1829
+ #ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
1830
+ /* Return information about the row currently being processed. Note that these
1831
+ * APIs do not fail but will return unexpected results if called outside a user
1832
+ * transform callback. Also note that when transforming an interlaced image the
1833
+ * row number is the row number within the sub-image of the interlace pass, so
1834
+ * the value will increase to the height of the sub-image (not the full image)
1835
+ * then reset to 0 for the next pass.
1836
+ *
1837
+ * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to
1838
+ * find the output pixel (x,y) given an interlaced sub-image pixel
1839
+ * (row,col,pass). (See below for these macros.)
1840
+ */
1841
+ PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp));
1842
+ PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp));
1843
+ #endif
1844
+
1845
+ #ifdef PNG_READ_USER_CHUNKS_SUPPORTED
1846
+ /* This callback is called only for *unknown* chunks. If
1847
+ * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known
1848
+ * chunks to be treated as unknown, however in this case the callback must do
1849
+ * any processing required by the chunk (e.g. by calling the appropriate
1850
+ * png_set_ APIs.)
1851
+ *
1852
+ * There is no write support - on write, by default, all the chunks in the
1853
+ * 'unknown' list are written in the specified position.
1854
+ *
1855
+ * The integer return from the callback function is interpreted thus:
1856
+ *
1857
+ * negative: An error occured, png_chunk_error will be called.
1858
+ * zero: The chunk was not handled, the chunk will be saved. A critical
1859
+ * chunk will cause an error at this point unless it is to be saved.
1860
+ * positive: The chunk was handled, libpng will ignore/discard it.
1861
+ *
1862
+ * See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about
1863
+ * how this behavior will change in libpng 1.7
1864
+ */
1865
+ PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr,
1866
+ png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
2045
1867
  #endif
2046
1868
 
2047
1869
  #ifdef PNG_USER_CHUNKS_SUPPORTED
2048
- PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
2049
- png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
2050
- PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_const_structp
2051
- png_ptr));
1870
+ PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr));
2052
1871
  #endif
2053
1872
 
2054
1873
  #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
2055
1874
  /* Sets the function callbacks for the push reader, and a pointer to a
2056
1875
  * user-defined structure available to the callback functions.
2057
1876
  */
2058
- PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
2059
- png_voidp progressive_ptr,
2060
- png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
2061
- png_progressive_end_ptr end_fn));
1877
+ PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr,
1878
+ png_voidp progressive_ptr, png_progressive_info_ptr info_fn,
1879
+ png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn));
2062
1880
 
2063
1881
  /* Returns the user pointer associated with the push read functions */
2064
- PNG_EXPORT(png_voidp,png_get_progressive_ptr)
2065
- PNGARG((png_const_structp png_ptr));
1882
+ PNG_EXPORT(91, png_voidp, png_get_progressive_ptr,
1883
+ (png_const_structrp png_ptr));
2066
1884
 
2067
1885
  /* Function to be called when data becomes available */
2068
- PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
2069
- png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
1886
+ PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
1887
+ png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size));
1888
+
1889
+ /* A function which may be called *only* within png_process_data to stop the
1890
+ * processing of any more data. The function returns the number of bytes
1891
+ * remaining, excluding any that libpng has cached internally. A subsequent
1892
+ * call to png_process_data must supply these bytes again. If the argument
1893
+ * 'save' is set to true the routine will first save all the pending data and
1894
+ * will always return 0.
1895
+ */
1896
+ PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save));
1897
+
1898
+ /* A function which may be called *only* outside (after) a call to
1899
+ * png_process_data. It returns the number of bytes of data to skip in the
1900
+ * input. Normally it will return 0, but if it returns a non-zero value the
1901
+ * application must skip than number of bytes of input data and pass the
1902
+ * following data to the next call to png_process_data.
1903
+ */
1904
+ PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
2070
1905
 
2071
- /* Function that combines rows. Not very much different than the
2072
- * png_combine_row() call. Is this even used?????
1906
+ #ifdef PNG_READ_INTERLACING_SUPPORTED
1907
+ /* Function that combines rows. 'new_row' is a flag that should come from
1908
+ * the callback and be non-NULL if anything needs to be done; the library
1909
+ * stores its own version of the new data internally and ignores the passed
1910
+ * in value.
2073
1911
  */
2074
- PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
2075
- png_bytep old_row, png_bytep new_row));
1912
+ PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr,
1913
+ png_bytep old_row, png_const_bytep new_row));
1914
+ #endif /* PNG_READ_INTERLACING_SUPPORTED */
2076
1915
  #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
2077
1916
 
2078
- PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
2079
- png_alloc_size_t size)) PNG_ALLOCATED;
1917
+ PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr,
1918
+ png_alloc_size_t size), PNG_ALLOCATED);
2080
1919
  /* Added at libpng version 1.4.0 */
2081
- PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr,
2082
- png_alloc_size_t size)) PNG_ALLOCATED;
1920
+ PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr,
1921
+ png_alloc_size_t size), PNG_ALLOCATED);
2083
1922
 
2084
1923
  /* Added at libpng version 1.2.4 */
2085
- PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
2086
- png_alloc_size_t size)) PNG_ALLOCATED;
1924
+ PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr,
1925
+ png_alloc_size_t size), PNG_ALLOCATED);
2087
1926
 
2088
1927
  /* Frees a pointer allocated by png_malloc() */
2089
- PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
1928
+ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
2090
1929
 
2091
1930
  /* Free data that was allocated internally */
2092
- PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
2093
- png_infop info_ptr, png_uint_32 free_me, int num));
1931
+ PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
1932
+ png_inforp info_ptr, png_uint_32 free_me, int num));
1933
+
2094
1934
  /* Reassign responsibility for freeing existing data, whether allocated
2095
- * by libpng or by the application */
2096
- PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
2097
- png_infop info_ptr, int freer, png_uint_32 mask));
1935
+ * by libpng or by the application; this works on the png_info structure passed
1936
+ * in, it does not change the state for other png_info structures.
1937
+ *
1938
+ * It is unlikely that this function works correctly as of 1.6.0 and using it
1939
+ * may result either in memory leaks or double free of allocated data.
1940
+ */
1941
+ PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr,
1942
+ png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED);
1943
+
2098
1944
  /* Assignments for png_data_freer */
2099
1945
  #define PNG_DESTROY_WILL_FREE_DATA 1
2100
1946
  #define PNG_SET_WILL_FREE_DATA 1
@@ -2106,8 +1952,10 @@ PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
2106
1952
  #define PNG_FREE_ROWS 0x0040
2107
1953
  #define PNG_FREE_PCAL 0x0080
2108
1954
  #define PNG_FREE_SCAL 0x0100
2109
- #define PNG_FREE_UNKN 0x0200
2110
- #define PNG_FREE_LIST 0x0400
1955
+ #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1956
+ # define PNG_FREE_UNKN 0x0200
1957
+ #endif
1958
+ /* PNG_FREE_LIST 0x0400 removed in 1.6.0 because it is ignored */
2111
1959
  #define PNG_FREE_PLTE 0x1000
2112
1960
  #define PNG_FREE_TRNS 0x2000
2113
1961
  #define PNG_FREE_TEXT 0x4000
@@ -2115,46 +1963,58 @@ PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
2115
1963
  #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
2116
1964
 
2117
1965
  #ifdef PNG_USER_MEM_SUPPORTED
2118
- PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
2119
- png_alloc_size_t size)) PNG_ALLOCATED;
2120
- PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
2121
- png_voidp ptr));
1966
+ PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr,
1967
+ png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED);
1968
+ PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr,
1969
+ png_voidp ptr), PNG_DEPRECATED);
2122
1970
  #endif
2123
1971
 
2124
- #ifndef PNG_NO_ERROR_TEXT
1972
+ #ifdef PNG_ERROR_TEXT_SUPPORTED
2125
1973
  /* Fatal error in PNG image of libpng - can't continue */
2126
- PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
2127
- png_const_charp error_message)) PNG_NORETURN;
1974
+ PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr,
1975
+ png_const_charp error_message), PNG_NORETURN);
2128
1976
 
2129
1977
  /* The same, but the chunk name is prepended to the error string. */
2130
- PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
2131
- png_const_charp error_message)) PNG_NORETURN;
1978
+ PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
1979
+ png_const_charp error_message), PNG_NORETURN);
2132
1980
 
2133
1981
  #else
2134
1982
  /* Fatal error in PNG image of libpng - can't continue */
2135
- PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;
1983
+ PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
2136
1984
  #endif
2137
1985
 
1986
+ #ifdef PNG_WARNINGS_SUPPORTED
2138
1987
  /* Non-fatal error in libpng. Can continue, but may have a problem. */
2139
- PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
2140
- png_const_charp warning_message));
1988
+ PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr,
1989
+ png_const_charp warning_message));
2141
1990
 
2142
1991
  /* Non-fatal error in libpng, chunk name is prepended to message. */
2143
- PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
2144
- png_const_charp warning_message));
1992
+ PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr,
1993
+ png_const_charp warning_message));
1994
+ #endif
2145
1995
 
2146
1996
  #ifdef PNG_BENIGN_ERRORS_SUPPORTED
2147
1997
  /* Benign error in libpng. Can continue, but may have a problem.
2148
1998
  * User can choose whether to handle as a fatal error or as a warning. */
2149
- PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr,
2150
- png_const_charp warning_message));
1999
+ PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr,
2000
+ png_const_charp warning_message));
2151
2001
 
2152
- /* Same, chunk name is prepended to message. */
2153
- PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr,
2154
- png_const_charp warning_message));
2002
+ #ifdef PNG_READ_SUPPORTED
2003
+ /* Same, chunk name is prepended to message (only during read) */
2004
+ PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr,
2005
+ png_const_charp warning_message));
2006
+ #endif
2155
2007
 
2156
- PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
2157
- png_ptr, int allowed));
2008
+ PNG_EXPORT(109, void, png_set_benign_errors,
2009
+ (png_structrp png_ptr, int allowed));
2010
+ #else
2011
+ # ifdef PNG_ALLOW_BENIGN_ERRORS
2012
+ # define png_benign_error png_warning
2013
+ # define png_chunk_benign_error png_chunk_warning
2014
+ # else
2015
+ # define png_benign_error png_error
2016
+ # define png_chunk_benign_error png_chunk_error
2017
+ # endif
2158
2018
  #endif
2159
2019
 
2160
2020
  /* The png_set_<chunk> functions are for storing values in the png_info_struct.
@@ -2170,258 +2030,274 @@ PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
2170
2030
  * png_info_struct.
2171
2031
  */
2172
2032
  /* Returns "flag" if chunk data is valid in info_ptr. */
2173
- PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_const_structp png_ptr,
2174
- png_const_infop info_ptr, png_uint_32 flag));
2033
+ PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr,
2034
+ png_const_inforp info_ptr, png_uint_32 flag));
2175
2035
 
2176
2036
  /* Returns number of bytes needed to hold a transformed row. */
2177
- PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_const_structp png_ptr,
2178
- png_const_infop info_ptr));
2037
+ PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr,
2038
+ png_const_inforp info_ptr));
2179
2039
 
2180
2040
  #ifdef PNG_INFO_IMAGE_SUPPORTED
2181
2041
  /* Returns row_pointers, which is an array of pointers to scanlines that was
2182
2042
  * returned from png_read_png().
2183
2043
  */
2184
- PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_const_structp png_ptr,
2185
- png_const_infop info_ptr));
2044
+ PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr,
2045
+ png_const_inforp info_ptr));
2046
+
2186
2047
  /* Set row_pointers, which is an array of pointers to scanlines for use
2187
2048
  * by png_write_png().
2188
2049
  */
2189
- PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
2190
- png_infop info_ptr, png_bytepp row_pointers));
2050
+ PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr,
2051
+ png_inforp info_ptr, png_bytepp row_pointers));
2191
2052
  #endif
2192
2053
 
2193
2054
  /* Returns number of color channels in image. */
2194
- PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_const_structp png_ptr,
2195
- png_const_infop info_ptr));
2055
+ PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr,
2056
+ png_const_inforp info_ptr));
2196
2057
 
2197
2058
  #ifdef PNG_EASY_ACCESS_SUPPORTED
2198
2059
  /* Returns image width in pixels. */
2199
- PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_const_structp
2200
- png_ptr, png_const_infop info_ptr));
2060
+ PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr,
2061
+ png_const_inforp info_ptr));
2201
2062
 
2202
2063
  /* Returns image height in pixels. */
2203
- PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_const_structp
2204
- png_ptr, png_const_infop info_ptr));
2064
+ PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr,
2065
+ png_const_inforp info_ptr));
2205
2066
 
2206
2067
  /* Returns image bit_depth. */
2207
- PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_const_structp
2208
- png_ptr, png_const_infop info_ptr));
2068
+ PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr,
2069
+ png_const_inforp info_ptr));
2209
2070
 
2210
2071
  /* Returns image color_type. */
2211
- PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_const_structp
2212
- png_ptr, png_const_infop info_ptr));
2072
+ PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr,
2073
+ png_const_inforp info_ptr));
2213
2074
 
2214
2075
  /* Returns image filter_type. */
2215
- PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_const_structp
2216
- png_ptr, png_const_infop info_ptr));
2076
+ PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr,
2077
+ png_const_inforp info_ptr));
2217
2078
 
2218
2079
  /* Returns image interlace_type. */
2219
- PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_const_structp
2220
- png_ptr, png_const_infop info_ptr));
2080
+ PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr,
2081
+ png_const_inforp info_ptr));
2221
2082
 
2222
2083
  /* Returns image compression_type. */
2223
- PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_const_structp
2224
- png_ptr, png_const_infop info_ptr));
2084
+ PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr,
2085
+ png_const_inforp info_ptr));
2225
2086
 
2226
2087
  /* Returns image resolution in pixels per meter, from pHYs chunk data. */
2227
- PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_const_structp
2228
- png_ptr, png_const_infop info_ptr));
2229
- PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_const_structp
2230
- png_ptr, png_const_infop info_ptr));
2231
- PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_const_structp
2232
- png_ptr, png_const_infop info_ptr));
2088
+ PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter,
2089
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2090
+ PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter,
2091
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2092
+ PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter,
2093
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2233
2094
 
2234
2095
  /* Returns pixel aspect ratio, computed from pHYs chunk data. */
2235
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2236
- PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_const_structp
2237
- png_ptr, png_const_infop info_ptr));
2238
- #endif
2096
+ PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio,
2097
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2098
+ PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed,
2099
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2239
2100
 
2240
2101
  /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
2241
- PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_const_structp
2242
- png_ptr, png_const_infop info_ptr));
2243
- PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_const_structp
2244
- png_ptr, png_const_infop info_ptr));
2245
- PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_const_structp
2246
- png_ptr, png_const_infop info_ptr));
2247
- PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_const_structp
2248
- png_ptr, png_const_infop info_ptr));
2102
+ PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels,
2103
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2104
+ PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels,
2105
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2106
+ PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
2107
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2108
+ PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
2109
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2249
2110
 
2250
2111
  #endif /* PNG_EASY_ACCESS_SUPPORTED */
2251
2112
 
2113
+ #ifdef PNG_READ_SUPPORTED
2252
2114
  /* Returns pointer to signature string read from PNG header */
2253
- PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_const_structp png_ptr,
2254
- png_infop info_ptr));
2115
+ PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr,
2116
+ png_const_inforp info_ptr));
2117
+ #endif
2255
2118
 
2256
2119
  #ifdef PNG_bKGD_SUPPORTED
2257
- PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_const_structp png_ptr,
2258
- png_infop info_ptr, png_color_16p *background));
2120
+ PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr,
2121
+ png_inforp info_ptr, png_color_16p *background));
2259
2122
  #endif
2260
2123
 
2261
2124
  #ifdef PNG_bKGD_SUPPORTED
2262
- PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
2263
- png_infop info_ptr, png_color_16p background));
2125
+ PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr,
2126
+ png_inforp info_ptr, png_const_color_16p background));
2264
2127
  #endif
2265
2128
 
2266
2129
  #ifdef PNG_cHRM_SUPPORTED
2267
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2268
- PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_const_structp png_ptr,
2269
- png_const_infop info_ptr, double *white_x, double *white_y, double *red_x,
2270
- double *red_y, double *green_x, double *green_y, double *blue_x,
2271
- double *blue_y));
2272
- #endif
2273
- #ifdef PNG_FIXED_POINT_SUPPORTED
2274
- PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_const_structp png_ptr,
2275
- png_const_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
2276
- *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
2277
- png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
2278
- *int_blue_x, png_fixed_point *int_blue_y));
2279
- #endif
2130
+ PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr,
2131
+ png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x,
2132
+ double *red_y, double *green_x, double *green_y, double *blue_x,
2133
+ double *blue_y))
2134
+ PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr,
2135
+ png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z,
2136
+ double *green_X, double *green_Y, double *green_Z, double *blue_X,
2137
+ double *blue_Y, double *blue_Z))
2138
+ PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed,
2139
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2140
+ png_fixed_point *int_white_x, png_fixed_point *int_white_y,
2141
+ png_fixed_point *int_red_x, png_fixed_point *int_red_y,
2142
+ png_fixed_point *int_green_x, png_fixed_point *int_green_y,
2143
+ png_fixed_point *int_blue_x, png_fixed_point *int_blue_y))
2144
+ PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed,
2145
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2146
+ png_fixed_point *int_red_X, png_fixed_point *int_red_Y,
2147
+ png_fixed_point *int_red_Z, png_fixed_point *int_green_X,
2148
+ png_fixed_point *int_green_Y, png_fixed_point *int_green_Z,
2149
+ png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y,
2150
+ png_fixed_point *int_blue_Z))
2280
2151
  #endif
2281
2152
 
2282
2153
  #ifdef PNG_cHRM_SUPPORTED
2283
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2284
- PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
2285
- png_infop info_ptr, double white_x, double white_y, double red_x,
2286
- double red_y, double green_x, double green_y, double blue_x, double blue_y));
2287
- #endif
2288
- #ifdef PNG_FIXED_POINT_SUPPORTED
2289
- PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
2290
- png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,
2291
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
2292
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
2293
- png_fixed_point int_blue_y));
2294
- #endif
2154
+ PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr,
2155
+ png_inforp info_ptr,
2156
+ double white_x, double white_y, double red_x, double red_y, double green_x,
2157
+ double green_y, double blue_x, double blue_y))
2158
+ PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr,
2159
+ png_inforp info_ptr, double red_X, double red_Y, double red_Z,
2160
+ double green_X, double green_Y, double green_Z, double blue_X,
2161
+ double blue_Y, double blue_Z))
2162
+ PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr,
2163
+ png_inforp info_ptr, png_fixed_point int_white_x,
2164
+ png_fixed_point int_white_y, png_fixed_point int_red_x,
2165
+ png_fixed_point int_red_y, png_fixed_point int_green_x,
2166
+ png_fixed_point int_green_y, png_fixed_point int_blue_x,
2167
+ png_fixed_point int_blue_y))
2168
+ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
2169
+ png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y,
2170
+ png_fixed_point int_red_Z, png_fixed_point int_green_X,
2171
+ png_fixed_point int_green_Y, png_fixed_point int_green_Z,
2172
+ png_fixed_point int_blue_X, png_fixed_point int_blue_Y,
2173
+ png_fixed_point int_blue_Z))
2295
2174
  #endif
2296
2175
 
2297
2176
  #ifdef PNG_gAMA_SUPPORTED
2298
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2299
- PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_const_structp png_ptr,
2300
- png_const_infop info_ptr, double *file_gamma));
2301
- #endif
2302
- PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_const_structp png_ptr,
2303
- png_const_infop info_ptr, png_fixed_point *int_file_gamma));
2177
+ PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr,
2178
+ png_const_inforp info_ptr, double *file_gamma))
2179
+ PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed,
2180
+ (png_const_structrp png_ptr, png_const_inforp info_ptr,
2181
+ png_fixed_point *int_file_gamma))
2304
2182
  #endif
2305
2183
 
2306
2184
  #ifdef PNG_gAMA_SUPPORTED
2307
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2308
- PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
2309
- png_infop info_ptr, double file_gamma));
2310
- #endif
2311
- PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
2312
- png_infop info_ptr, png_fixed_point int_file_gamma));
2185
+ PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr,
2186
+ png_inforp info_ptr, double file_gamma))
2187
+ PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr,
2188
+ png_inforp info_ptr, png_fixed_point int_file_gamma))
2313
2189
  #endif
2314
2190
 
2315
2191
  #ifdef PNG_hIST_SUPPORTED
2316
- PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_const_structp png_ptr,
2317
- png_const_infop info_ptr, png_uint_16p *hist));
2192
+ PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr,
2193
+ png_inforp info_ptr, png_uint_16p *hist));
2318
2194
  #endif
2319
2195
 
2320
2196
  #ifdef PNG_hIST_SUPPORTED
2321
- PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
2322
- png_infop info_ptr, png_uint_16p hist));
2197
+ PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr,
2198
+ png_inforp info_ptr, png_const_uint_16p hist));
2323
2199
  #endif
2324
2200
 
2325
- PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
2326
- png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
2327
- int *bit_depth, int *color_type, int *interlace_method,
2328
- int *compression_method, int *filter_method));
2201
+ PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr,
2202
+ png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height,
2203
+ int *bit_depth, int *color_type, int *interlace_method,
2204
+ int *compression_method, int *filter_method));
2329
2205
 
2330
- PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
2331
- png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
2332
- int color_type, int interlace_method, int compression_method,
2333
- int filter_method));
2206
+ PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr,
2207
+ png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
2208
+ int color_type, int interlace_method, int compression_method,
2209
+ int filter_method));
2334
2210
 
2335
2211
  #ifdef PNG_oFFs_SUPPORTED
2336
- PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_const_structp png_ptr,
2337
- png_const_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
2212
+ PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr,
2213
+ png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
2338
2214
  int *unit_type));
2339
2215
  #endif
2340
2216
 
2341
2217
  #ifdef PNG_oFFs_SUPPORTED
2342
- PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
2343
- png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
2344
- int unit_type));
2218
+ PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr,
2219
+ png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y,
2220
+ int unit_type));
2345
2221
  #endif
2346
2222
 
2347
2223
  #ifdef PNG_pCAL_SUPPORTED
2348
- PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_const_structp png_ptr,
2349
- png_const_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
2350
- int *type, int *nparams, png_charp *units, png_charpp *params));
2224
+ PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr,
2225
+ png_inforp info_ptr, png_charp *purpose, png_int_32 *X0,
2226
+ png_int_32 *X1, int *type, int *nparams, png_charp *units,
2227
+ png_charpp *params));
2351
2228
  #endif
2352
2229
 
2353
2230
  #ifdef PNG_pCAL_SUPPORTED
2354
- PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
2355
- png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
2356
- int type, int nparams, png_charp units, png_charpp params));
2231
+ PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr,
2232
+ png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1,
2233
+ int type, int nparams, png_const_charp units, png_charpp params));
2357
2234
  #endif
2358
2235
 
2359
2236
  #ifdef PNG_pHYs_SUPPORTED
2360
- PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_const_structp png_ptr,
2361
- png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
2237
+ PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr,
2238
+ png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
2239
+ int *unit_type));
2362
2240
  #endif
2363
2241
 
2364
2242
  #ifdef PNG_pHYs_SUPPORTED
2365
- PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
2366
- png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
2243
+ PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr,
2244
+ png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
2367
2245
  #endif
2368
2246
 
2369
- PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_const_structp png_ptr,
2370
- png_const_infop info_ptr, png_colorp *palette, int *num_palette));
2247
+ PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr,
2248
+ png_inforp info_ptr, png_colorp *palette, int *num_palette));
2371
2249
 
2372
- PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
2373
- png_infop info_ptr, png_colorp palette, int num_palette));
2250
+ PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr,
2251
+ png_inforp info_ptr, png_const_colorp palette, int num_palette));
2374
2252
 
2375
2253
  #ifdef PNG_sBIT_SUPPORTED
2376
- PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_const_structp png_ptr,
2377
- png_infop info_ptr, png_color_8p *sig_bit));
2254
+ PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr,
2255
+ png_inforp info_ptr, png_color_8p *sig_bit));
2378
2256
  #endif
2379
2257
 
2380
2258
  #ifdef PNG_sBIT_SUPPORTED
2381
- PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
2382
- png_infop info_ptr, png_color_8p sig_bit));
2259
+ PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr,
2260
+ png_inforp info_ptr, png_const_color_8p sig_bit));
2383
2261
  #endif
2384
2262
 
2385
2263
  #ifdef PNG_sRGB_SUPPORTED
2386
- PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_const_structp png_ptr,
2387
- png_const_infop info_ptr, int *intent));
2264
+ PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr,
2265
+ png_const_inforp info_ptr, int *file_srgb_intent));
2388
2266
  #endif
2389
2267
 
2390
2268
  #ifdef PNG_sRGB_SUPPORTED
2391
- PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
2392
- png_infop info_ptr, int intent));
2393
- PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
2394
- png_infop info_ptr, int intent));
2269
+ PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr,
2270
+ png_inforp info_ptr, int srgb_intent));
2271
+ PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr,
2272
+ png_inforp info_ptr, int srgb_intent));
2395
2273
  #endif
2396
2274
 
2397
2275
  #ifdef PNG_iCCP_SUPPORTED
2398
- PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_const_structp png_ptr,
2399
- png_const_infop info_ptr, png_charpp name, int *compression_type,
2400
- png_charpp profile, png_uint_32 *proflen));
2401
- /* Note to maintainer: profile should be png_bytepp */
2276
+ PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr,
2277
+ png_inforp info_ptr, png_charpp name, int *compression_type,
2278
+ png_bytepp profile, png_uint_32 *proflen));
2402
2279
  #endif
2403
2280
 
2404
2281
  #ifdef PNG_iCCP_SUPPORTED
2405
- PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
2406
- png_infop info_ptr, png_charp name, int compression_type,
2407
- png_charp profile, png_uint_32 proflen));
2408
- /* Note to maintainer: profile should be png_bytep */
2282
+ PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr,
2283
+ png_inforp info_ptr, png_const_charp name, int compression_type,
2284
+ png_const_bytep profile, png_uint_32 proflen));
2409
2285
  #endif
2410
2286
 
2411
2287
  #ifdef PNG_sPLT_SUPPORTED
2412
- PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_const_structp png_ptr,
2413
- png_const_infop info_ptr, png_sPLT_tpp entries));
2288
+ PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr,
2289
+ png_inforp info_ptr, png_sPLT_tpp entries));
2414
2290
  #endif
2415
2291
 
2416
2292
  #ifdef PNG_sPLT_SUPPORTED
2417
- PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
2418
- png_infop info_ptr, png_sPLT_tp entries, int nentries));
2293
+ PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr,
2294
+ png_inforp info_ptr, png_const_sPLT_tp entries, int nentries));
2419
2295
  #endif
2420
2296
 
2421
2297
  #ifdef PNG_TEXT_SUPPORTED
2422
2298
  /* png_get_text also returns the number of text chunks in *num_text */
2423
- PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_const_structp png_ptr,
2424
- png_const_infop info_ptr, png_textp *text_ptr, int *num_text));
2299
+ PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr,
2300
+ png_inforp info_ptr, png_textp *text_ptr, int *num_text));
2425
2301
  #endif
2426
2302
 
2427
2303
  /* Note while png_set_text() will accept a structure whose text,
@@ -2432,111 +2308,217 @@ PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_const_structp png_ptr,
2432
2308
  */
2433
2309
 
2434
2310
  #ifdef PNG_TEXT_SUPPORTED
2435
- PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
2436
- png_infop info_ptr, png_textp text_ptr, int num_text));
2311
+ PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr,
2312
+ png_inforp info_ptr, png_const_textp text_ptr, int num_text));
2437
2313
  #endif
2438
2314
 
2439
2315
  #ifdef PNG_tIME_SUPPORTED
2440
- PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_const_structp png_ptr,
2441
- png_infop info_ptr, png_timep *mod_time));
2316
+ PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr,
2317
+ png_inforp info_ptr, png_timep *mod_time));
2442
2318
  #endif
2443
2319
 
2444
2320
  #ifdef PNG_tIME_SUPPORTED
2445
- PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
2446
- png_infop info_ptr, png_timep mod_time));
2447
- #endif
2448
-
2449
- #ifdef PNG_tRNS_SUPPORTED
2450
- PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_const_structp png_ptr,
2451
- png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
2452
- png_color_16p *trans_color));
2321
+ PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr,
2322
+ png_inforp info_ptr, png_const_timep mod_time));
2453
2323
  #endif
2454
2324
 
2455
2325
  #ifdef PNG_tRNS_SUPPORTED
2456
- PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
2457
- png_infop info_ptr, png_bytep trans_alpha, int num_trans,
2458
- png_color_16p trans_color));
2326
+ PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr,
2327
+ png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans,
2328
+ png_color_16p *trans_color));
2459
2329
  #endif
2460
2330
 
2461
2331
  #ifdef PNG_tRNS_SUPPORTED
2332
+ PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr,
2333
+ png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans,
2334
+ png_const_color_16p trans_color));
2462
2335
  #endif
2463
2336
 
2464
2337
  #ifdef PNG_sCAL_SUPPORTED
2465
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2466
- PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_const_structp png_ptr,
2467
- png_const_infop info_ptr, int *unit, double *width, double *height));
2468
- #else
2469
- #ifdef PNG_FIXED_POINT_SUPPORTED
2470
- PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_const_structp png_ptr,
2471
- png_const_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
2472
- #endif
2473
- #endif
2338
+ PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr,
2339
+ png_const_inforp info_ptr, int *unit, double *width, double *height))
2340
+ #if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \
2341
+ defined(PNG_FLOATING_POINT_SUPPORTED)
2342
+ /* NOTE: this API is currently implemented using floating point arithmetic,
2343
+ * consequently it can only be used on systems with floating point support.
2344
+ * In any case the range of values supported by png_fixed_point is small and it
2345
+ * is highly recommended that png_get_sCAL_s be used instead.
2346
+ */
2347
+ PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed,
2348
+ (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit,
2349
+ png_fixed_point *width, png_fixed_point *height))
2350
+ #endif
2351
+ PNG_EXPORT(169, png_uint_32, png_get_sCAL_s,
2352
+ (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit,
2353
+ png_charpp swidth, png_charpp sheight));
2354
+
2355
+ PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr,
2356
+ png_inforp info_ptr, int unit, double width, double height))
2357
+ PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr,
2358
+ png_inforp info_ptr, int unit, png_fixed_point width,
2359
+ png_fixed_point height))
2360
+ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
2361
+ png_inforp info_ptr, int unit,
2362
+ png_const_charp swidth, png_const_charp sheight));
2474
2363
  #endif /* PNG_sCAL_SUPPORTED */
2475
2364
 
2476
- #ifdef PNG_sCAL_SUPPORTED
2477
- #ifdef PNG_FLOATING_POINT_SUPPORTED
2478
- PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
2479
- png_infop info_ptr, int unit, double width, double height));
2480
- #else
2481
- #ifdef PNG_FIXED_POINT_SUPPORTED
2482
- PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
2483
- png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
2484
- #endif
2485
- #endif
2486
- #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
2487
-
2488
- #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
2489
- /* Provide a list of chunks and how they are to be handled, if the built-in
2490
- handling or default unknown chunk handling is not desired. Any chunks not
2491
- listed will be handled in the default manner. The IHDR and IEND chunks
2492
- must not be listed.
2493
- keep = 0: follow default behaviour
2494
- = 1: do not keep
2495
- = 2: keep only if safe-to-copy
2496
- = 3: keep even if unsafe-to-copy
2497
- */
2498
- PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
2499
- png_ptr, int keep, png_bytep chunk_list, int num_chunks));
2500
- PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
2501
- chunk_name));
2502
- #endif
2503
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
2504
- PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
2505
- png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
2506
- PNG_EXPORT(void, png_set_unknown_chunk_location)
2507
- PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
2508
- PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_const_structp
2509
- png_ptr, png_const_infop info_ptr, png_unknown_chunkpp entries));
2365
+ #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
2366
+ /* Provide the default handling for all unknown chunks or, optionally, for
2367
+ * specific unknown chunks.
2368
+ *
2369
+ * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was
2370
+ * ignored and the default was used, the per-chunk setting only had an effect on
2371
+ * write. If you wish to have chunk-specific handling on read in code that must
2372
+ * work on earlier versions you must use a user chunk callback to specify the
2373
+ * desired handling (keep or discard.)
2374
+ *
2375
+ * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The
2376
+ * parameter is interpreted as follows:
2377
+ *
2378
+ * READ:
2379
+ * PNG_HANDLE_CHUNK_AS_DEFAULT:
2380
+ * Known chunks: do normal libpng processing, do not keep the chunk (but
2381
+ * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
2382
+ * Unknown chunks: for a specific chunk use the global default, when used
2383
+ * as the default discard the chunk data.
2384
+ * PNG_HANDLE_CHUNK_NEVER:
2385
+ * Discard the chunk data.
2386
+ * PNG_HANDLE_CHUNK_IF_SAFE:
2387
+ * Keep the chunk data if the chunk is not critical else raise a chunk
2388
+ * error.
2389
+ * PNG_HANDLE_CHUNK_ALWAYS:
2390
+ * Keep the chunk data.
2391
+ *
2392
+ * If the chunk data is saved it can be retrieved using png_get_unknown_chunks,
2393
+ * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent
2394
+ * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks
2395
+ * it simply resets the behavior to the libpng default.
2396
+ *
2397
+ * INTERACTION WTIH USER CHUNK CALLBACKS:
2398
+ * The per-chunk handling is always used when there is a png_user_chunk_ptr
2399
+ * callback and the callback returns 0; the chunk is then always stored *unless*
2400
+ * it is critical and the per-chunk setting is other than ALWAYS. Notice that
2401
+ * the global default is *not* used in this case. (In effect the per-chunk
2402
+ * value is incremented to at least IF_SAFE.)
2403
+ *
2404
+ * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and
2405
+ * per-chunk defaults will be honored. If you want to preserve the current
2406
+ * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE
2407
+ * as the default - if you don't do this libpng 1.6 will issue a warning.
2408
+ *
2409
+ * If you want unhandled unknown chunks to be discarded in libpng 1.6 and
2410
+ * earlier simply return '1' (handled).
2411
+ *
2412
+ * PNG_HANDLE_AS_UNKNOWN_SUPPORTED:
2413
+ * If this is *not* set known chunks will always be handled by libpng and
2414
+ * will never be stored in the unknown chunk list. Known chunks listed to
2415
+ * png_set_keep_unknown_chunks will have no effect. If it is set then known
2416
+ * chunks listed with a keep other than AS_DEFAULT will *never* be processed
2417
+ * by libpng, in addition critical chunks must either be processed by the
2418
+ * callback or saved.
2419
+ *
2420
+ * The IHDR and IEND chunks must not be listed. Because this turns off the
2421
+ * default handling for chunks that would otherwise be recognized the
2422
+ * behavior of libpng transformations may well become incorrect!
2423
+ *
2424
+ * WRITE:
2425
+ * When writing chunks the options only apply to the chunks specified by
2426
+ * png_set_unknown_chunks (below), libpng will *always* write known chunks
2427
+ * required by png_set_ calls and will always write the core critical chunks
2428
+ * (as required for PLTE).
2429
+ *
2430
+ * Each chunk in the png_set_unknown_chunks list is looked up in the
2431
+ * png_set_keep_unknown_chunks list to find the keep setting, this is then
2432
+ * interpreted as follows:
2433
+ *
2434
+ * PNG_HANDLE_CHUNK_AS_DEFAULT:
2435
+ * Write safe-to-copy chunks and write other chunks if the global
2436
+ * default is set to _ALWAYS, otherwise don't write this chunk.
2437
+ * PNG_HANDLE_CHUNK_NEVER:
2438
+ * Do not write the chunk.
2439
+ * PNG_HANDLE_CHUNK_IF_SAFE:
2440
+ * Write the chunk if it is safe-to-copy, otherwise do not write it.
2441
+ * PNG_HANDLE_CHUNK_ALWAYS:
2442
+ * Write the chunk.
2443
+ *
2444
+ * Note that the default behavior is effectively the opposite of the read case -
2445
+ * in read unknown chunks are not stored by default, in write they are written
2446
+ * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different
2447
+ * - on write the safe-to-copy bit is checked, on read the critical bit is
2448
+ * checked and on read if the chunk is critical an error will be raised.
2449
+ *
2450
+ * num_chunks:
2451
+ * ===========
2452
+ * If num_chunks is positive, then the "keep" parameter specifies the manner
2453
+ * for handling only those chunks appearing in the chunk_list array,
2454
+ * otherwise the chunk list array is ignored.
2455
+ *
2456
+ * If num_chunks is 0 the "keep" parameter specifies the default behavior for
2457
+ * unknown chunks, as described above.
2458
+ *
2459
+ * If num_chunks is negative, then the "keep" parameter specifies the manner
2460
+ * for handling all unknown chunks plus all chunks recognized by libpng
2461
+ * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to
2462
+ * be processed by libpng.
2463
+ */
2464
+ PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr,
2465
+ int keep, png_const_bytep chunk_list, int num_chunks));
2466
+
2467
+ /* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned;
2468
+ * the result is therefore true (non-zero) if special handling is required,
2469
+ * false for the default handling.
2470
+ */
2471
+ PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr,
2472
+ png_const_bytep chunk_name));
2473
+ #endif
2474
+
2475
+ #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
2476
+ PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr,
2477
+ png_inforp info_ptr, png_const_unknown_chunkp unknowns,
2478
+ int num_unknowns));
2479
+ /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added
2480
+ * unknowns to the location currently stored in the png_struct. This is
2481
+ * invariably the wrong value on write. To fix this call the following API
2482
+ * for each chunk in the list with the correct location. If you know your
2483
+ * code won't be compiled on earlier versions you can rely on
2484
+ * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing
2485
+ * the correct thing.
2486
+ */
2487
+
2488
+ PNG_EXPORT(175, void, png_set_unknown_chunk_location,
2489
+ (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location));
2490
+
2491
+ PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr,
2492
+ png_inforp info_ptr, png_unknown_chunkpp entries));
2510
2493
  #endif
2511
2494
 
2512
2495
  /* Png_free_data() will turn off the "valid" flag for anything it frees.
2513
2496
  * If you need to turn it off for a chunk that your application has freed,
2514
2497
  * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
2515
2498
  */
2516
- PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
2517
- png_infop info_ptr, int mask));
2499
+ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr,
2500
+ png_inforp info_ptr, int mask));
2518
2501
 
2519
2502
  #ifdef PNG_INFO_IMAGE_SUPPORTED
2520
2503
  /* The "params" pointer is currently not used and is for future expansion. */
2521
- PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
2522
- png_infop info_ptr,
2523
- int transforms,
2524
- png_voidp params));
2525
- PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
2526
- png_infop info_ptr,
2527
- int transforms,
2528
- png_voidp params));
2529
- #endif
2530
-
2531
- PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_const_structp png_ptr));
2532
- PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_const_structp png_ptr));
2533
- PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_const_structp
2534
- png_ptr));
2535
- PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_const_structp png_ptr));
2504
+ PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr,
2505
+ int transforms, png_voidp params));
2506
+ PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr,
2507
+ int transforms, png_voidp params));
2508
+ #endif
2509
+
2510
+ PNG_EXPORT(180, png_const_charp, png_get_copyright,
2511
+ (png_const_structrp png_ptr));
2512
+ PNG_EXPORT(181, png_const_charp, png_get_header_ver,
2513
+ (png_const_structrp png_ptr));
2514
+ PNG_EXPORT(182, png_const_charp, png_get_header_version,
2515
+ (png_const_structrp png_ptr));
2516
+ PNG_EXPORT(183, png_const_charp, png_get_libpng_ver,
2517
+ (png_const_structrp png_ptr));
2536
2518
 
2537
2519
  #ifdef PNG_MNG_FEATURES_SUPPORTED
2538
- PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
2539
- png_ptr, png_uint_32 mng_features_permitted));
2520
+ PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr,
2521
+ png_uint_32 mng_features_permitted));
2540
2522
  #endif
2541
2523
 
2542
2524
  /* For use in png_set_keep_unknown, added to version 1.2.6 */
@@ -2544,80 +2526,151 @@ PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
2544
2526
  #define PNG_HANDLE_CHUNK_NEVER 1
2545
2527
  #define PNG_HANDLE_CHUNK_IF_SAFE 2
2546
2528
  #define PNG_HANDLE_CHUNK_ALWAYS 3
2529
+ #define PNG_HANDLE_CHUNK_LAST 4
2547
2530
 
2548
2531
  /* Strip the prepended error numbers ("#nnn ") from error and warning
2549
2532
  * messages before passing them to the error or warning handler.
2550
2533
  */
2551
2534
  #ifdef PNG_ERROR_NUMBERS_SUPPORTED
2552
- PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
2553
- png_ptr, png_uint_32 strip_mode));
2535
+ PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr,
2536
+ png_uint_32 strip_mode));
2554
2537
  #endif
2555
2538
 
2556
2539
  /* Added in libpng-1.2.6 */
2557
2540
  #ifdef PNG_SET_USER_LIMITS_SUPPORTED
2558
- PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
2559
- png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
2560
- PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_const_structp
2561
- png_ptr));
2562
- PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_const_structp
2563
- png_ptr));
2541
+ PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr,
2542
+ png_uint_32 user_width_max, png_uint_32 user_height_max));
2543
+ PNG_EXPORT(187, png_uint_32, png_get_user_width_max,
2544
+ (png_const_structrp png_ptr));
2545
+ PNG_EXPORT(188, png_uint_32, png_get_user_height_max,
2546
+ (png_const_structrp png_ptr));
2564
2547
  /* Added in libpng-1.4.0 */
2565
- PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
2566
- png_ptr, png_uint_32 user_chunk_cache_max));
2567
- PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
2568
- PNGARG((png_const_structp png_ptr));
2548
+ PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr,
2549
+ png_uint_32 user_chunk_cache_max));
2550
+ PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max,
2551
+ (png_const_structrp png_ptr));
2569
2552
  /* Added in libpng-1.4.1 */
2570
- PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp
2571
- png_ptr, png_alloc_size_t user_chunk_cache_max));
2572
- PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max)
2573
- PNGARG((png_const_structp png_ptr));
2553
+ PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr,
2554
+ png_alloc_size_t user_chunk_cache_max));
2555
+ PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max,
2556
+ (png_const_structrp png_ptr));
2574
2557
  #endif
2575
2558
 
2576
- #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
2577
- PNG_EXPORT(png_uint_32,png_get_pixels_per_inch)
2578
- PNGARG((png_const_structp png_ptr, png_const_infop info_ptr));
2559
+ #if defined(PNG_INCH_CONVERSIONS_SUPPORTED)
2560
+ PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch,
2561
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2579
2562
 
2580
- PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch)
2581
- PNGARG((png_const_structp png_ptr, png_const_infop info_ptr));
2563
+ PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch,
2564
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2582
2565
 
2583
- PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch)
2584
- PNGARG((png_const_structp png_ptr, png_const_infop info_ptr));
2566
+ PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch,
2567
+ (png_const_structrp png_ptr, png_const_inforp info_ptr));
2585
2568
 
2586
- PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_const_structp png_ptr,
2587
- png_const_infop info_ptr));
2569
+ PNG_FP_EXPORT(196, float, png_get_x_offset_inches,
2570
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2571
+ #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
2572
+ PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed,
2573
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2574
+ #endif
2588
2575
 
2589
- PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_const_structp png_ptr,
2590
- png_const_infop info_ptr));
2576
+ PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr,
2577
+ png_const_inforp info_ptr))
2578
+ #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
2579
+ PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
2580
+ (png_const_structrp png_ptr, png_const_inforp info_ptr))
2581
+ #endif
2591
2582
 
2592
- #ifdef PNG_pHYs_SUPPORTED
2593
- PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_const_structp png_ptr,
2594
- png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
2595
- int *unit_type));
2596
- #endif /* PNG_pHYs_SUPPORTED */
2597
- #endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
2583
+ # ifdef PNG_pHYs_SUPPORTED
2584
+ PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr,
2585
+ png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
2586
+ int *unit_type));
2587
+ # endif /* PNG_pHYs_SUPPORTED */
2588
+ #endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
2598
2589
 
2599
2590
  /* Added in libpng-1.4.0 */
2600
2591
  #ifdef PNG_IO_STATE_SUPPORTED
2601
- PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_const_structp png_ptr));
2592
+ PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr));
2593
+
2594
+ /* Removed from libpng 1.6; use png_get_io_chunk_type. */
2595
+ PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr),
2596
+ PNG_DEPRECATED)
2602
2597
 
2603
- PNG_EXPORT(png_bytep,png_get_io_chunk_name)
2604
- PNGARG((png_structp png_ptr));
2598
+ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
2599
+ (png_const_structrp png_ptr));
2605
2600
 
2606
2601
  /* The flags returned by png_get_io_state() are the following: */
2607
- #define PNG_IO_NONE 0x0000 /* no I/O at this moment */
2608
- #define PNG_IO_READING 0x0001 /* currently reading */
2609
- #define PNG_IO_WRITING 0x0002 /* currently writing */
2610
- #define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
2611
- #define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
2612
- #define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
2613
- #define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
2614
- #define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
2615
- #define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
2602
+ # define PNG_IO_NONE 0x0000 /* no I/O at this moment */
2603
+ # define PNG_IO_READING 0x0001 /* currently reading */
2604
+ # define PNG_IO_WRITING 0x0002 /* currently writing */
2605
+ # define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
2606
+ # define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
2607
+ # define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
2608
+ # define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
2609
+ # define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
2610
+ # define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
2616
2611
  #endif /* ?PNG_IO_STATE_SUPPORTED */
2617
2612
 
2618
- /* Maintainer: Put new public prototypes here ^, in libpng.3, and project
2619
- * defs
2613
+ /* Interlace support. The following macros are always defined so that if
2614
+ * libpng interlace handling is turned off the macros may be used to handle
2615
+ * interlaced images within the application.
2620
2616
  */
2617
+ #define PNG_INTERLACE_ADAM7_PASSES 7
2618
+
2619
+ /* Two macros to return the first row and first column of the original,
2620
+ * full, image which appears in a given pass. 'pass' is in the range 0
2621
+ * to 6 and the result is in the range 0 to 7.
2622
+ */
2623
+ #define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7)
2624
+ #define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7)
2625
+
2626
+ /* A macro to return the offset between pixels in the output row for a pair of
2627
+ * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that
2628
+ * follows. Note that ROW_OFFSET is the offset from one row to the next whereas
2629
+ * COL_OFFSET is from one column to the next, within a row.
2630
+ */
2631
+ #define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8)
2632
+ #define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1))
2633
+
2634
+ /* Two macros to help evaluate the number of rows or columns in each
2635
+ * pass. This is expressed as a shift - effectively log2 of the number or
2636
+ * rows or columns in each 8x8 tile of the original image.
2637
+ */
2638
+ #define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3)
2639
+ #define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3)
2640
+
2641
+ /* Hence two macros to determine the number of rows or columns in a given
2642
+ * pass of an image given its height or width. In fact these macros may
2643
+ * return non-zero even though the sub-image is empty, because the other
2644
+ * dimension may be empty for a small image.
2645
+ */
2646
+ #define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\
2647
+ -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass))
2648
+ #define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\
2649
+ -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass))
2650
+
2651
+ /* For the reader row callbacks (both progressive and sequential) it is
2652
+ * necessary to find the row in the output image given a row in an interlaced
2653
+ * image, so two more macros:
2654
+ */
2655
+ #define PNG_ROW_FROM_PASS_ROW(y_in, pass) \
2656
+ (((y_in)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
2657
+ #define PNG_COL_FROM_PASS_COL(x_in, pass) \
2658
+ (((x_in)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
2659
+
2660
+ /* Two macros which return a boolean (0 or 1) saying whether the given row
2661
+ * or column is in a particular pass. These use a common utility macro that
2662
+ * returns a mask for a given pass - the offset 'off' selects the row or
2663
+ * column version. The mask has the appropriate bit set for each column in
2664
+ * the tile.
2665
+ */
2666
+ #define PNG_PASS_MASK(pass,off) ( \
2667
+ ((0x110145AF>>(((7-(off))-(pass))<<2)) & 0xF) | \
2668
+ ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0))
2669
+
2670
+ #define PNG_ROW_IN_INTERLACE_PASS(y, pass) \
2671
+ ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1)
2672
+ #define PNG_COL_IN_INTERLACE_PASS(x, pass) \
2673
+ ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1)
2621
2674
 
2622
2675
  #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
2623
2676
  /* With these routines we avoid an integer divide, which will be slower on
@@ -2632,101 +2685,615 @@ PNG_EXPORT(png_bytep,png_get_io_chunk_name)
2632
2685
  * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
2633
2686
  */
2634
2687
 
2635
- /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
2688
+ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
2636
2689
 
2637
2690
  # define png_composite(composite, fg, alpha, bg) \
2638
2691
  { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \
2639
2692
  * (png_uint_16)(alpha) \
2640
2693
  + (png_uint_16)(bg)*(png_uint_16)(255 \
2641
- - (png_uint_16)(alpha)) + (png_uint_16)128); \
2694
+ - (png_uint_16)(alpha)) + 128); \
2642
2695
  (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
2643
2696
 
2644
2697
  # define png_composite_16(composite, fg, alpha, bg) \
2645
2698
  { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \
2646
2699
  * (png_uint_32)(alpha) \
2647
- + (png_uint_32)(bg)*(png_uint_32)(65535L \
2648
- - (png_uint_32)(alpha)) + (png_uint_32)32768L); \
2700
+ + (png_uint_32)(bg)*(65535 \
2701
+ - (png_uint_32)(alpha)) + 32768); \
2649
2702
  (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
2650
2703
 
2651
2704
  #else /* Standard method using integer division */
2652
2705
 
2653
- # define png_composite(composite, fg, alpha, bg) \
2654
- (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
2655
- (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
2656
- (png_uint_16)127) / 255)
2706
+ # define png_composite(composite, fg, alpha, bg) \
2707
+ (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
2708
+ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
2709
+ 127) / 255)
2657
2710
 
2658
2711
  # define png_composite_16(composite, fg, alpha, bg) \
2659
2712
  (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
2660
- (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
2661
- (png_uint_32)32767) / (png_uint_32)65535L)
2713
+ (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \
2714
+ 32767) / 65535)
2662
2715
  #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
2663
2716
 
2717
+ #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
2718
+ PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
2719
+ PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf));
2720
+ PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf));
2721
+ #endif
2722
+
2723
+ PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr,
2724
+ png_const_bytep buf));
2725
+ /* No png_get_int_16 -- may be added if there's a real need for it. */
2726
+
2727
+ /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
2728
+ #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
2729
+ PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i));
2730
+ #endif
2731
+ #ifdef PNG_SAVE_INT_32_SUPPORTED
2732
+ PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i));
2733
+ #endif
2734
+
2735
+ /* Place a 16-bit number into a buffer in PNG byte order.
2736
+ * The parameter is declared unsigned int, not png_uint_16,
2737
+ * just to avoid potential problems on pre-ANSI C compilers.
2738
+ */
2739
+ #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
2740
+ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
2741
+ /* No png_save_int_16 -- may be added if there's a real need for it. */
2742
+ #endif
2743
+
2664
2744
  #ifdef PNG_USE_READ_MACROS
2665
2745
  /* Inline macros to do direct reads of bytes from the input buffer.
2666
2746
  * The png_get_int_32() routine assumes we are using two's complement
2667
2747
  * format for negative values, which is almost certainly true.
2668
2748
  */
2669
- # define png_get_uint_32(buf) \
2749
+ # define PNG_get_uint_32(buf) \
2670
2750
  (((png_uint_32)(*(buf)) << 24) + \
2671
2751
  ((png_uint_32)(*((buf) + 1)) << 16) + \
2672
2752
  ((png_uint_32)(*((buf) + 2)) << 8) + \
2673
2753
  ((png_uint_32)(*((buf) + 3))))
2674
2754
 
2675
- /* The following definition introduces an API incompatibility (but not
2676
- * an ABI incompatibility) with libpng-1.4.0 through 1.4.4. Prior to
2677
- * libpng-1.4.5 the macro, which is used by default, returned (incorrectly)
2678
- * a (png_uint_32), while the function, if used instead, correctly returned
2679
- * a (png_uint_16).
2680
- *
2681
- * Libpng versions 1.0.x and 1.2.x only used a function so are not affected
2682
- * by this potential API incompatibility between macros.
2683
- */
2684
- # define png_get_uint_16(buf) \
2755
+ /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
2756
+ * function) incorrectly returned a value of type png_uint_32.
2757
+ */
2758
+ # define PNG_get_uint_16(buf) \
2685
2759
  ((png_uint_16) \
2686
- (((unsigned int)(*(buf)) << 8) + \
2687
- ((unsigned int)(*((buf) + 1)))))
2760
+ (((unsigned int)(*(buf)) << 8) + \
2761
+ ((unsigned int)(*((buf) + 1)))))
2688
2762
 
2689
- # define png_get_int_32(buf) \
2763
+ # define PNG_get_int_32(buf) \
2690
2764
  ((png_int_32)((*(buf) & 0x80) \
2691
2765
  ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \
2692
2766
  : (png_int_32)png_get_uint_32(buf)))
2767
+
2768
+ /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h,
2769
+ * but defining a macro name prefixed with PNG_PREFIX.
2770
+ */
2771
+ # ifndef PNG_PREFIX
2772
+ # define png_get_uint_32(buf) PNG_get_uint_32(buf)
2773
+ # define png_get_uint_16(buf) PNG_get_uint_16(buf)
2774
+ # define png_get_int_32(buf) PNG_get_int_32(buf)
2775
+ # endif
2693
2776
  #else
2694
- PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
2695
- PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
2696
- #ifdef PNG_GET_INT_32_SUPPORTED
2697
- PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
2777
+ # ifdef PNG_PREFIX
2778
+ /* No macros; revert to the (redefined) function */
2779
+ # define PNG_get_uint_32 (png_get_uint_32)
2780
+ # define PNG_get_uint_16 (png_get_uint_16)
2781
+ # define PNG_get_int_32 (png_get_int_32)
2782
+ # endif
2698
2783
  #endif
2784
+
2785
+ /*******************************************************************************
2786
+ * SIMPLIFIED API
2787
+ *******************************************************************************
2788
+ *
2789
+ * Please read the documentation in libpng-manual.txt (TODO: write said
2790
+ * documentation) if you don't understand what follows.
2791
+ *
2792
+ * The simplified API hides the details of both libpng and the PNG file format
2793
+ * itself. It allows PNG files to be read into a very limited number of
2794
+ * in-memory bitmap formats or to be written from the same formats. If these
2795
+ * formats do not accomodate your needs then you can, and should, use the more
2796
+ * sophisticated APIs above - these support a wide variety of in-memory formats
2797
+ * and a wide variety of sophisticated transformations to those formats as well
2798
+ * as a wide variety of APIs to manipulate ancillary information.
2799
+ *
2800
+ * To read a PNG file using the simplified API:
2801
+ *
2802
+ * 1) Declare a 'png_image' structure (see below) on the stack and set the
2803
+ * version field to PNG_IMAGE_VERSION.
2804
+ * 2) Call the appropriate png_image_begin_read... function.
2805
+ * 3) Set the png_image 'format' member to the required sample format.
2806
+ * 4) Allocate a buffer for the image and, if required, the color-map.
2807
+ * 5) Call png_image_finish_read to read the image and, if required, the
2808
+ * color-map into your buffers.
2809
+ *
2810
+ * There are no restrictions on the format of the PNG input itself; all valid
2811
+ * color types, bit depths, and interlace methods are acceptable, and the
2812
+ * input image is transformed as necessary to the requested in-memory format
2813
+ * during the png_image_finish_read() step. The only caveat is that if you
2814
+ * request a color-mapped image from a PNG that is full-color or makes
2815
+ * complex use of an alpha channel the transformation is extremely lossy and the
2816
+ * result may look terrible.
2817
+ *
2818
+ * To write a PNG file using the simplified API:
2819
+ *
2820
+ * 1) Declare a 'png_image' structure on the stack and memset() it to all zero.
2821
+ * 2) Initialize the members of the structure that describe the image, setting
2822
+ * the 'format' member to the format of the image samples.
2823
+ * 3) Call the appropriate png_image_write... function with a pointer to the
2824
+ * image and, if necessary, the color-map to write the PNG data.
2825
+ *
2826
+ * png_image is a structure that describes the in-memory format of an image
2827
+ * when it is being read or defines the in-memory format of an image that you
2828
+ * need to write:
2829
+ */
2830
+ #define PNG_IMAGE_VERSION 1
2831
+
2832
+ typedef struct png_control *png_controlp;
2833
+ typedef struct
2834
+ {
2835
+ png_controlp opaque; /* Initialize to NULL, free with png_image_free */
2836
+ png_uint_32 version; /* Set to PNG_IMAGE_VERSION */
2837
+ png_uint_32 width; /* Image width in pixels (columns) */
2838
+ png_uint_32 height; /* Image height in pixels (rows) */
2839
+ png_uint_32 format; /* Image format as defined below */
2840
+ png_uint_32 flags; /* A bit mask containing informational flags */
2841
+ png_uint_32 colormap_entries;
2842
+ /* Number of entries in the color-map */
2843
+
2844
+ /* In the event of an error or warning the following field will be set to a
2845
+ * non-zero value and the 'message' field will contain a '\0' terminated
2846
+ * string with the libpng error or warning message. If both warnings and
2847
+ * an error were encountered, only the error is recorded. If there
2848
+ * are multiple warnings, only the first one is recorded.
2849
+ *
2850
+ * The upper 30 bits of this value are reserved, the low two bits contain
2851
+ * a value as follows:
2852
+ */
2853
+ # define PNG_IMAGE_WARNING 1
2854
+ # define PNG_IMAGE_ERROR 2
2855
+ /*
2856
+ * The result is a two bit code such that a value more than 1 indicates
2857
+ * a failure in the API just called:
2858
+ *
2859
+ * 0 - no warning or error
2860
+ * 1 - warning
2861
+ * 2 - error
2862
+ * 3 - error preceded by warning
2863
+ */
2864
+ # define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1)
2865
+
2866
+ png_uint_32 warning_or_error;
2867
+
2868
+ char message[64];
2869
+ } png_image, *png_imagep;
2870
+
2871
+ /* The samples of the image have one to four channels whose components have
2872
+ * original values in the range 0 to 1.0:
2873
+ *
2874
+ * 1: A single gray or luminance channel (G).
2875
+ * 2: A gray/luminance channel and an alpha channel (GA).
2876
+ * 3: Three red, green, blue color channels (RGB).
2877
+ * 4: Three color channels and an alpha channel (RGBA).
2878
+ *
2879
+ * The components are encoded in one of two ways:
2880
+ *
2881
+ * a) As a small integer, value 0..255, contained in a single byte. For the
2882
+ * alpha channel the original value is simply value/255. For the color or
2883
+ * luminance channels the value is encoded according to the sRGB specification
2884
+ * and matches the 8-bit format expected by typical display devices.
2885
+ *
2886
+ * The color/gray channels are not scaled (pre-multiplied) by the alpha
2887
+ * channel and are suitable for passing to color management software.
2888
+ *
2889
+ * b) As a value in the range 0..65535, contained in a 2-byte integer. All
2890
+ * channels can be converted to the original value by dividing by 65535; all
2891
+ * channels are linear. Color channels use the RGB encoding (RGB end-points) of
2892
+ * the sRGB specification. This encoding is identified by the
2893
+ * PNG_FORMAT_FLAG_LINEAR flag below.
2894
+ *
2895
+ * When the simplified API needs to convert between sRGB and linear colorspaces,
2896
+ * the actual sRGB transfer curve defined in the sRGB specification (see the
2897
+ * article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
2898
+ * approximation used elsewhere in libpng.
2899
+ *
2900
+ * When an alpha channel is present it is expected to denote pixel coverage
2901
+ * of the color or luminance channels and is returned as an associated alpha
2902
+ * channel: the color/gray channels are scaled (pre-multiplied) by the alpha
2903
+ * value.
2904
+ *
2905
+ * The samples are either contained directly in the image data, between 1 and 8
2906
+ * bytes per pixel according to the encoding, or are held in a color-map indexed
2907
+ * by bytes in the image data. In the case of a color-map the color-map entries
2908
+ * are individual samples, encoded as above, and the image data has one byte per
2909
+ * pixel to select the relevant sample from the color-map.
2910
+ */
2911
+
2912
+ /* PNG_FORMAT_*
2913
+ *
2914
+ * #defines to be used in png_image::format. Each #define identifies a
2915
+ * particular layout of sample data and, if present, alpha values. There are
2916
+ * separate defines for each of the two component encodings.
2917
+ *
2918
+ * A format is built up using single bit flag values. All combinations are
2919
+ * valid. Formats can be built up from the flag values or you can use one of
2920
+ * the predefined values below. When testing formats always use the FORMAT_FLAG
2921
+ * macros to test for individual features - future versions of the library may
2922
+ * add new flags.
2923
+ *
2924
+ * When reading or writing color-mapped images the format should be set to the
2925
+ * format of the entries in the color-map then png_image_{read,write}_colormap
2926
+ * called to read or write the color-map and set the format correctly for the
2927
+ * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly!
2928
+ *
2929
+ * NOTE: libpng can be built with particular features disabled, if you see
2930
+ * compiler errors because the definition of one of the following flags has been
2931
+ * compiled out it is because libpng does not have the required support. It is
2932
+ * possible, however, for the libpng configuration to enable the format on just
2933
+ * read or just write; in that case you may see an error at run time. You can
2934
+ * guard against this by checking for the definition of the appropriate
2935
+ * "_SUPPORTED" macro, one of:
2936
+ *
2937
+ * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED
2938
+ */
2939
+ #define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */
2940
+ #define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */
2941
+ #define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2 byte channels else 1 byte */
2942
+ #define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */
2943
+
2944
+ #ifdef PNG_FORMAT_BGR_SUPPORTED
2945
+ # define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */
2699
2946
  #endif
2700
- PNG_EXPORT(png_uint_32,png_get_uint_31)
2701
- PNGARG((png_structp png_ptr, png_bytep buf));
2702
- /* No png_get_int_16 -- may be added if there's a real need for it. */
2703
2947
 
2704
- /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
2705
- PNG_EXPORT(void,png_save_uint_32)
2706
- PNGARG((png_bytep buf, png_uint_32 i));
2707
- PNG_EXPORT(void,png_save_int_32)
2708
- PNGARG((png_bytep buf, png_int_32 i));
2948
+ #ifdef PNG_FORMAT_AFIRST_SUPPORTED
2949
+ # define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */
2950
+ #endif
2709
2951
 
2710
- /* Place a 16-bit number into a buffer in PNG byte order.
2711
- * The parameter is declared unsigned int, not png_uint_16,
2712
- * just to avoid potential problems on pre-ANSI C compilers.
2952
+ /* Commonly used formats have predefined macros.
2953
+ *
2954
+ * First the single byte (sRGB) formats:
2713
2955
  */
2714
- PNG_EXPORT(void,png_save_uint_16)
2715
- PNGARG((png_bytep buf, unsigned int i));
2716
- /* No png_save_int_16 -- may be added if there's a real need for it. */
2956
+ #define PNG_FORMAT_GRAY 0
2957
+ #define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA
2958
+ #define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST)
2959
+ #define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR
2960
+ #define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR)
2961
+ #define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA)
2962
+ #define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST)
2963
+ #define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA)
2964
+ #define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST)
2965
+
2966
+ /* Then the linear 2-byte formats. When naming these "Y" is used to
2967
+ * indicate a luminance (gray) channel.
2968
+ */
2969
+ #define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR
2970
+ #define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA)
2971
+ #define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR)
2972
+ #define PNG_FORMAT_LINEAR_RGB_ALPHA \
2973
+ (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA)
2974
+
2975
+ /* With color-mapped formats the image data is one byte for each pixel, the byte
2976
+ * is an index into the color-map which is formatted as above. To obtain a
2977
+ * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP
2978
+ * to one of the above definitions, or you can use one of the definitions below.
2979
+ */
2980
+ #define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP)
2981
+ #define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP)
2982
+ #define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP)
2983
+ #define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP)
2984
+ #define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP)
2985
+ #define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP)
2986
+
2987
+ /* PNG_IMAGE macros
2988
+ *
2989
+ * These are convenience macros to derive information from a png_image
2990
+ * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the
2991
+ * actual image sample values - either the entries in the color-map or the
2992
+ * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values
2993
+ * for the pixels and will always return 1 for color-mapped formats. The
2994
+ * remaining macros return information about the rows in the image and the
2995
+ * complete image.
2996
+ *
2997
+ * NOTE: All the macros that take a png_image::format parameter are compile time
2998
+ * constants if the format parameter is, itself, a constant. Therefore these
2999
+ * macros can be used in array declarations and case labels where required.
3000
+ * Similarly the macros are also pre-processor constants (sizeof is not used) so
3001
+ * they can be used in #if tests.
3002
+ *
3003
+ * First the information about the samples.
3004
+ */
3005
+ #define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\
3006
+ (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1)
3007
+ /* Return the total number of channels in a given format: 1..4 */
3008
+
3009
+ #define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\
3010
+ ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1)
3011
+ /* Return the size in bytes of a single component of a pixel or color-map
3012
+ * entry (as appropriate) in the image: 1 or 2.
3013
+ */
3014
+
3015
+ #define PNG_IMAGE_SAMPLE_SIZE(fmt)\
3016
+ (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt))
3017
+ /* This is the size of the sample data for one sample. If the image is
3018
+ * color-mapped it is the size of one color-map entry (and image pixels are
3019
+ * one byte in size), otherwise it is the size of one image pixel.
3020
+ */
3021
+
3022
+ #define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\
3023
+ (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256)
3024
+ /* The maximum size of the color-map required by the format expressed in a
3025
+ * count of components. This can be used to compile-time allocate a
3026
+ * color-map:
3027
+ *
3028
+ * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)];
3029
+ *
3030
+ * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)];
3031
+ *
3032
+ * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the
3033
+ * information from one of the png_image_begin_read_ APIs and dynamically
3034
+ * allocate the required memory.
3035
+ */
3036
+
3037
+ /* Corresponding information about the pixels */
3038
+ #define PNG_IMAGE_PIXEL_(test,fmt)\
3039
+ (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt))
3040
+
3041
+ #define PNG_IMAGE_PIXEL_CHANNELS(fmt)\
3042
+ PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt)
3043
+ /* The number of separate channels (components) in a pixel; 1 for a
3044
+ * color-mapped image.
3045
+ */
3046
+
3047
+ #define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\
3048
+ PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt)
3049
+ /* The size, in bytes, of each component in a pixel; 1 for a color-mapped
3050
+ * image.
3051
+ */
3052
+
3053
+ #define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt)
3054
+ /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */
3055
+
3056
+ /* Information about the whole row, or whole image */
3057
+ #define PNG_IMAGE_ROW_STRIDE(image)\
3058
+ (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width)
3059
+ /* Return the total number of components in a single row of the image; this
3060
+ * is the minimum 'row stride', the minimum count of components between each
3061
+ * row. For a color-mapped image this is the minimum number of bytes in a
3062
+ * row.
3063
+ */
3064
+
3065
+ #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
3066
+ (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride))
3067
+ /* Return the size, in bytes, of an image buffer given a png_image and a row
3068
+ * stride - the number of components to leave space for in each row.
3069
+ */
3070
+
3071
+ #define PNG_IMAGE_SIZE(image)\
3072
+ PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image))
3073
+ /* Return the size, in bytes, of the image in memory given just a png_image;
3074
+ * the row stride is the minimum stride required for the image.
3075
+ */
3076
+
3077
+ #define PNG_IMAGE_COLORMAP_SIZE(image)\
3078
+ (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries)
3079
+ /* Return the size, in bytes, of the color-map of this image. If the image
3080
+ * format is not a color-map format this will return a size sufficient for
3081
+ * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if
3082
+ * you don't want to allocate a color-map in this case.
3083
+ */
3084
+
3085
+ /* PNG_IMAGE_FLAG_*
3086
+ *
3087
+ * Flags containing additional information about the image are held in the
3088
+ * 'flags' field of png_image.
3089
+ */
3090
+ #define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01
3091
+ /* This indicates the the RGB values of the in-memory bitmap do not
3092
+ * correspond to the red, green and blue end-points defined by sRGB.
3093
+ */
3094
+
3095
+ #define PNG_IMAGE_FLAG_FAST 0x02
3096
+ /* On write emphasise speed over compression; the resultant PNG file will be
3097
+ * larger but will be produced significantly faster, particular for large
3098
+ * images. Do not use this option for images which will be distributed, only
3099
+ * used it when producing intermediate files that will be read back in
3100
+ * repeatedly. For a typical 24-bit image the option will double the read
3101
+ * speed at the cost of increasing the image size by 25%, however for many
3102
+ * more compressible images the PNG file can be 10 times larger with only a
3103
+ * slight speed gain.
3104
+ */
3105
+
3106
+ #define PNG_IMAGE_FLAG_16BIT_sRGB 0x04
3107
+ /* On read if the image is a 16-bit per component image and there is no gAMA
3108
+ * or sRGB chunk assume that the components are sRGB encoded. Notice that
3109
+ * images output by the simplified API always have gamma information; setting
3110
+ * this flag only affects the interpretation of 16-bit images from an
3111
+ * external source. It is recommended that the application expose this flag
3112
+ * to the user; the user can normally easily recognize the difference between
3113
+ * linear and sRGB encoding. This flag has no effect on write - the data
3114
+ * passed to the write APIs must have the correct encoding (as defined
3115
+ * above.)
3116
+ *
3117
+ * If the flag is not set (the default) input 16-bit per component data is
3118
+ * assumed to be linear.
3119
+ *
3120
+ * NOTE: the flag can only be set after the png_image_begin_read_ call,
3121
+ * because that call initializes the 'flags' field.
3122
+ */
3123
+
3124
+ #ifdef PNG_SIMPLIFIED_READ_SUPPORTED
3125
+ /* READ APIs
3126
+ * ---------
3127
+ *
3128
+ * The png_image passed to the read APIs must have been initialized by setting
3129
+ * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.)
3130
+ */
3131
+ #ifdef PNG_STDIO_SUPPORTED
3132
+ PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
3133
+ const char *file_name));
3134
+ /* The named file is opened for read and the image header is filled in
3135
+ * from the PNG header in the file.
3136
+ */
3137
+
3138
+ PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
3139
+ FILE* file));
3140
+ /* The PNG header is read from the stdio FILE object. */
3141
+ #endif /* PNG_STDIO_SUPPORTED */
3142
+
3143
+ PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
3144
+ png_const_voidp memory, png_size_t size));
3145
+ /* The PNG header is read from the given memory buffer. */
3146
+
3147
+ PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
3148
+ png_const_colorp background, void *buffer, png_int_32 row_stride,
3149
+ void *colormap));
3150
+ /* Finish reading the image into the supplied buffer and clean up the
3151
+ * png_image structure.
3152
+ *
3153
+ * row_stride is the step, in byte or 2-byte units as appropriate,
3154
+ * between adjacent rows. A positive stride indicates that the top-most row
3155
+ * is first in the buffer - the normal top-down arrangement. A negative
3156
+ * stride indicates that the bottom-most row is first in the buffer.
3157
+ *
3158
+ * background need only be supplied if an alpha channel must be removed from
3159
+ * a png_byte format and the removal is to be done by compositing on a solid
3160
+ * color; otherwise it may be NULL and any composition will be done directly
3161
+ * onto the buffer. The value is an sRGB color to use for the background,
3162
+ * for grayscale output the green channel is used.
3163
+ *
3164
+ * background must be supplied when an alpha channel must be removed from a
3165
+ * single byte color-mapped output format, in other words if:
3166
+ *
3167
+ * 1) The original format from png_image_begin_read_from_* had
3168
+ * PNG_FORMAT_FLAG_ALPHA set.
3169
+ * 2) The format set by the application does not.
3170
+ * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and
3171
+ * PNG_FORMAT_FLAG_LINEAR *not* set.
3172
+ *
3173
+ * For linear output removing the alpha channel is always done by compositing
3174
+ * on black and background is ignored.
3175
+ *
3176
+ * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must
3177
+ * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE.
3178
+ * image->colormap_entries will be updated to the actual number of entries
3179
+ * written to the colormap; this may be less than the original value.
3180
+ */
3181
+
3182
+ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
3183
+ /* Free any data allocated by libpng in image->opaque, setting the pointer to
3184
+ * NULL. May be called at any time after the structure is initialized.
3185
+ */
3186
+ #endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
3187
+
3188
+ #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
3189
+ /* WRITE APIS
3190
+ * ----------
3191
+ * For write you must initialize a png_image structure to describe the image to
3192
+ * be written. To do this use memset to set the whole structure to 0 then
3193
+ * initialize fields describing your image.
3194
+ *
3195
+ * version: must be set to PNG_IMAGE_VERSION
3196
+ * opaque: must be initialized to NULL
3197
+ * width: image width in pixels
3198
+ * height: image height in rows
3199
+ * format: the format of the data (image and color-map) you wish to write
3200
+ * flags: set to 0 unless one of the defined flags applies; set
3201
+ * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB
3202
+ * values do not correspond to the colors in sRGB.
3203
+ * colormap_entries: set to the number of entries in the color-map (0 to 256)
3204
+ */
3205
+ PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
3206
+ const char *file, int convert_to_8bit, const void *buffer,
3207
+ png_int_32 row_stride, const void *colormap));
3208
+ /* Write the image to the named file. */
3209
+
3210
+ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
3211
+ int convert_to_8_bit, const void *buffer, png_int_32 row_stride,
3212
+ const void *colormap));
3213
+ /* Write the image to the given (FILE*). */
3214
+
3215
+ /* With both write APIs if image is in one of the linear formats with 16-bit
3216
+ * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG
3217
+ * gamma encoded according to the sRGB specification, otherwise a 16-bit linear
3218
+ * encoded PNG file is written.
3219
+ *
3220
+ * With color-mapped data formats the colormap parameter point to a color-map
3221
+ * with at least image->colormap_entries encoded in the specified format. If
3222
+ * the format is linear the written PNG color-map will be converted to sRGB
3223
+ * regardless of the convert_to_8_bit flag.
3224
+ *
3225
+ * With all APIs row_stride is handled as in the read APIs - it is the spacing
3226
+ * from one row to the next in component sized units (1 or 2 bytes) and if
3227
+ * negative indicates a bottom-up row layout in the buffer.
3228
+ *
3229
+ * Note that the write API does not support interlacing or sub-8-bit pixels.
3230
+ */
3231
+ #endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */
3232
+ /*******************************************************************************
3233
+ * END OF SIMPLIFIED API
3234
+ ******************************************************************************/
3235
+
3236
+ #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
3237
+ PNG_EXPORT(242, void, png_set_check_for_invalid_index,
3238
+ (png_structrp png_ptr, int allowed));
3239
+ # ifdef PNG_GET_PALETTE_MAX_SUPPORTED
3240
+ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
3241
+ png_const_infop info_ptr));
3242
+ # endif
3243
+ #endif /* CHECK_FOR_INVALID_INDEX */
3244
+
3245
+ /*******************************************************************************
3246
+ * IMPLEMENTATION OPTIONS
3247
+ *******************************************************************************
3248
+ *
3249
+ * Support for arbitrary implementation-specific optimizations. The API allows
3250
+ * particular options to be turned on or off. 'Option' is the number of the
3251
+ * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
3252
+ * by the PNG_OPTION_ defines below.
3253
+ *
3254
+ * HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
3255
+ * are detected at run time, however sometimes it may be impossible
3256
+ * to do this in user mode, in which case it is necessary to discover
3257
+ * the capabilities in an OS specific way. Such capabilities are
3258
+ * listed here when libpng has support for them and must be turned
3259
+ * ON by the application if present.
3260
+ *
3261
+ * SOFTWARE: sometimes software optimizations actually result in performance
3262
+ * decrease on some architectures or systems, or with some sets of
3263
+ * PNG images. 'Software' options allow such optimizations to be
3264
+ * selected at run time.
3265
+ */
3266
+ #ifdef PNG_SET_OPTION_SUPPORTED
3267
+ #ifdef PNG_ARM_NEON_API_SUPPORTED
3268
+ # define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
3269
+ #endif
3270
+ #define PNG_OPTION_NEXT 2 /* Next option - numbers must be even */
2717
3271
 
2718
- /* ************************************************************************* */
3272
+ /* Return values: NOTE: there are four values and 'off' is *not* zero */
3273
+ #define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
3274
+ #define PNG_OPTION_INVALID 1 /* Option number out of range */
3275
+ #define PNG_OPTION_OFF 2
3276
+ #define PNG_OPTION_ON 3
2719
3277
 
2720
- /* Various modes of operation. Note that after an init, mode is set to
2721
- * zero automatically when the structure is created.
3278
+ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
3279
+ int onoff));
3280
+ #endif
3281
+
3282
+ /*******************************************************************************
3283
+ * END OF HARDWARE OPTIONS
3284
+ ******************************************************************************/
3285
+
3286
+ /* Maintainer: Put new public prototypes here ^, in libpng.3, and project
3287
+ * defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt
2722
3288
  */
2723
- #define PNG_HAVE_IHDR 0x01
2724
- #define PNG_HAVE_PLTE 0x02
2725
- #define PNG_HAVE_IDAT 0x04
2726
- #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
2727
- #define PNG_HAVE_IEND 0x10
2728
- #define PNG_HAVE_gAMA 0x20
2729
- #define PNG_HAVE_cHRM 0x40
3289
+
3290
+ /* The last ordinal number (this is the *last* one already used; the next
3291
+ * one to use is one more than this.) Maintainer, remember to add an entry to
3292
+ * scripts/symbols.def as well.
3293
+ */
3294
+ #ifdef PNG_EXPORT_LAST_ORDINAL
3295
+ PNG_EXPORT_LAST_ORDINAL(244);
3296
+ #endif
2730
3297
 
2731
3298
  #ifdef __cplusplus
2732
3299
  }