@hxa-rn/react-native-gcanvas 6.0.24-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1280) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +207 -0
  4. package/harmony/gcanvas/LICENSE +21 -0
  5. package/harmony/gcanvas/NOTICE +33 -0
  6. package/harmony/gcanvas/OAT.xml +38 -0
  7. package/harmony/gcanvas/build-profile.json5 +16 -0
  8. package/harmony/gcanvas/consumer-rules.txt +0 -0
  9. package/harmony/gcanvas/hvigorfile.ts +2 -0
  10. package/harmony/gcanvas/index.ets +1 -0
  11. package/harmony/gcanvas/oh-package.json5 +14 -0
  12. package/harmony/gcanvas/src/main/cpp/CMakeLists.txt +126 -0
  13. package/harmony/gcanvas/src/main/cpp/GCanvasEngine.cpp +665 -0
  14. package/harmony/gcanvas/src/main/cpp/GCanvasEngine.h +123 -0
  15. package/harmony/gcanvas/src/main/cpp/GCanvasNapi.cpp +485 -0
  16. package/harmony/gcanvas/src/main/cpp/GCanvasXComponent.cpp +166 -0
  17. package/harmony/gcanvas/src/main/cpp/GcanvasPackage.h +24 -0
  18. package/harmony/gcanvas/src/main/cpp/core/CMakeLists.txt +221 -0
  19. package/harmony/gcanvas/src/main/cpp/core/README.md +1 -0
  20. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/gmanager.cpp +69 -0
  21. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/gmanager.h +34 -0
  22. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/jsc/weexjsc.h +14 -0
  23. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/auto_ptr.h +110 -0
  24. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/i_delete.h +23 -0
  25. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/ref_count.h +34 -0
  26. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/GcanvasWeexOhos.cpp +28 -0
  27. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/GcanvasWeexOhos.h +27 -0
  28. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/grenderer.cpp +677 -0
  29. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/grenderer.h +127 -0
  30. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/LICENSE.TXT +46 -0
  31. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/README +107 -0
  32. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftconfig.h +51 -0
  33. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftheader.h +836 -0
  34. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftmodule.h +33 -0
  35. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftoption.h +1030 -0
  36. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftstdlib.h +185 -0
  37. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/integer-types.h +250 -0
  38. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/mac-support.h +49 -0
  39. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/public-macros.h +138 -0
  40. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/freetype.h +5289 -0
  41. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftadvanc.h +188 -0
  42. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbbox.h +101 -0
  43. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbdf.h +212 -0
  44. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbitmap.h +329 -0
  45. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbzip2.h +102 -0
  46. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcache.h +1087 -0
  47. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftchapters.h +168 -0
  48. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcid.h +167 -0
  49. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcolor.h +1667 -0
  50. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftdriver.h +1320 -0
  51. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fterrdef.h +283 -0
  52. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fterrors.h +296 -0
  53. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftfntfmt.h +93 -0
  54. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgasp.h +143 -0
  55. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftglyph.h +750 -0
  56. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgxval.h +354 -0
  57. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgzip.h +151 -0
  58. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftimage.h +1289 -0
  59. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftincrem.h +348 -0
  60. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlcdfil.h +323 -0
  61. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlist.h +296 -0
  62. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlogging.h +184 -0
  63. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlzw.h +100 -0
  64. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmac.h +289 -0
  65. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmm.h +834 -0
  66. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmodapi.h +807 -0
  67. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmoderr.h +204 -0
  68. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftotval.h +206 -0
  69. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftoutln.h +588 -0
  70. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftparams.h +218 -0
  71. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftpfr.h +179 -0
  72. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftrender.h +244 -0
  73. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsizes.h +159 -0
  74. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsnames.h +272 -0
  75. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftstroke.h +773 -0
  76. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsynth.h +104 -0
  77. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsystem.h +350 -0
  78. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fttrigon.h +350 -0
  79. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fttypes.h +617 -0
  80. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftwinfnt.h +276 -0
  81. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/autohint.h +234 -0
  82. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/cffotypes.h +107 -0
  83. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/cfftypes.h +416 -0
  84. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/compiler-macros.h +343 -0
  85. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftcalc.h +584 -0
  86. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftdebug.h +442 -0
  87. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftdrv.h +289 -0
  88. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftgloadr.h +147 -0
  89. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/fthash.h +135 -0
  90. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftmemory.h +401 -0
  91. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftmmtypes.h +91 -0
  92. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftobjs.h +1232 -0
  93. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftpsprop.h +47 -0
  94. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftrfork.h +245 -0
  95. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftserv.h +495 -0
  96. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftstream.h +570 -0
  97. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/fttrace.h +173 -0
  98. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftvalid.h +160 -0
  99. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/psaux.h +1447 -0
  100. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/pshints.h +699 -0
  101. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svbdf.h +66 -0
  102. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svcfftl.h +90 -0
  103. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svcid.h +69 -0
  104. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svfntfmt.h +55 -0
  105. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svgldict.h +72 -0
  106. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svgxval.h +72 -0
  107. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svkern.h +51 -0
  108. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svmetric.h +131 -0
  109. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svmm.h +214 -0
  110. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svotval.h +55 -0
  111. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpfr.h +65 -0
  112. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpostnm.h +65 -0
  113. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svprop.h +66 -0
  114. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpscmap.h +145 -0
  115. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpsinfo.h +86 -0
  116. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svsfnt.h +88 -0
  117. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svttcmap.h +90 -0
  118. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svtteng.h +53 -0
  119. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svttglyf.h +56 -0
  120. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svwinfnt.h +50 -0
  121. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/sfnt.h +1099 -0
  122. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/svginterface.h +46 -0
  123. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/t1types.h +307 -0
  124. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/tttypes.h +1747 -0
  125. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/wofftypes.h +312 -0
  126. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/otsvg.h +336 -0
  127. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/t1tables.h +735 -0
  128. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ttnameid.h +1235 -0
  129. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/tttables.h +856 -0
  130. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/tttags.h +124 -0
  131. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/ft2build.h +42 -0
  132. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.c +779 -0
  133. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.cin +39 -0
  134. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.dat +1121 -0
  135. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.h +429 -0
  136. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.hin +146 -0
  137. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcjk.c +2383 -0
  138. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcjk.h +141 -0
  139. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcover.h +105 -0
  140. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afdummy.c +77 -0
  141. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afdummy.h +40 -0
  142. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aferrors.h +42 -0
  143. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afglobal.c +513 -0
  144. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afglobal.h +173 -0
  145. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afhints.c +1796 -0
  146. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afhints.h +467 -0
  147. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afindic.c +157 -0
  148. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afindic.h +41 -0
  149. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aflatin.c +3643 -0
  150. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aflatin.h +194 -0
  151. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afloader.c +706 -0
  152. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afloader.h +91 -0
  153. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afmodule.c +527 -0
  154. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afmodule.h +55 -0
  155. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afranges.c +1072 -0
  156. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afranges.h +47 -0
  157. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afscript.h +408 -0
  158. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afshaper.c +690 -0
  159. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afshaper.h +71 -0
  160. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afstyles.h +487 -0
  161. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aftypes.h +511 -0
  162. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afws-decl.h +33 -0
  163. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afws-iter.h +31 -0
  164. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/autofit.c +35 -0
  165. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/ft-hb.c +115 -0
  166. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/ft-hb.h +48 -0
  167. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/module.mk +23 -0
  168. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/rules.mk +88 -0
  169. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftadvanc.c +174 -0
  170. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbase.c +41 -0
  171. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbase.h +82 -0
  172. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbbox.c +542 -0
  173. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbdf.c +90 -0
  174. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbitmap.c +1144 -0
  175. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcalc.c +1126 -0
  176. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcid.c +117 -0
  177. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcolor.c +156 -0
  178. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftdbgmem.c +971 -0
  179. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftdebug.c +644 -0
  180. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fterrors.c +45 -0
  181. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftfntfmt.c +54 -0
  182. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftfstype.c +61 -0
  183. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgasp.c +60 -0
  184. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgloadr.c +383 -0
  185. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftglyph.c +911 -0
  186. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgxval.c +141 -0
  187. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fthash.c +338 -0
  188. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftinit.c +263 -0
  189. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftlcdfil.c +437 -0
  190. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftmac.c +1099 -0
  191. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftmm.c +704 -0
  192. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftobjs.c +5917 -0
  193. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftotval.c +90 -0
  194. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftoutln.c +1120 -0
  195. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpatent.c +50 -0
  196. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpfr.c +152 -0
  197. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpsprop.c +284 -0
  198. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftrfork.c +934 -0
  199. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsnames.c +185 -0
  200. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftstream.c +872 -0
  201. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftstroke.c +2403 -0
  202. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsynth.c +180 -0
  203. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsystem.c +338 -0
  204. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fttrigon.c +517 -0
  205. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fttype1.c +126 -0
  206. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftutil.c +442 -0
  207. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftver.rc +61 -0
  208. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftwinfnt.c +52 -0
  209. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/md5.c +291 -0
  210. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/md5.h +45 -0
  211. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/rules.mk +108 -0
  212. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/README +152 -0
  213. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdf.c +34 -0
  214. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdf.h +253 -0
  215. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdfdrivr.c +1013 -0
  216. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdfdrivr.h +72 -0
  217. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdferror.h +45 -0
  218. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdflib.c +2378 -0
  219. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/module.mk +34 -0
  220. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/rules.mk +84 -0
  221. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bzip2/ftbzip2.c +535 -0
  222. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bzip2/rules.mk +64 -0
  223. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcache.c +31 -0
  224. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcbasic.c +598 -0
  225. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccache.c +584 -0
  226. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccache.h +359 -0
  227. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccback.h +85 -0
  228. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccmap.c +323 -0
  229. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcerror.h +42 -0
  230. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcglyph.c +204 -0
  231. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcglyph.h +314 -0
  232. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcimage.c +158 -0
  233. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcimage.h +106 -0
  234. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmanag.c +677 -0
  235. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmanag.h +175 -0
  236. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmru.c +341 -0
  237. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmru.h +242 -0
  238. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcsbits.c +413 -0
  239. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcsbits.h +91 -0
  240. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/rules.mk +85 -0
  241. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cff.c +28 -0
  242. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffcmap.c +230 -0
  243. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffcmap.h +67 -0
  244. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffdrivr.c +1263 -0
  245. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffdrivr.h +35 -0
  246. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cfferrs.h +42 -0
  247. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffgload.c +762 -0
  248. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffgload.h +62 -0
  249. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffload.c +2570 -0
  250. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffload.h +124 -0
  251. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffobjs.c +1175 -0
  252. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffobjs.h +84 -0
  253. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffparse.c +1550 -0
  254. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffparse.h +144 -0
  255. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cfftoken.h +150 -0
  256. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/module.mk +23 -0
  257. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/rules.mk +75 -0
  258. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/ciderrs.h +41 -0
  259. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidgload.c +618 -0
  260. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidgload.h +58 -0
  261. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidload.c +937 -0
  262. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidload.h +52 -0
  263. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidobjs.c +543 -0
  264. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidobjs.h +154 -0
  265. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidparse.c +311 -0
  266. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidparse.h +130 -0
  267. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidriver.c +274 -0
  268. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidriver.h +36 -0
  269. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidtoken.h +115 -0
  270. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/module.mk +23 -0
  271. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/rules.mk +73 -0
  272. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/type1cid.c +28 -0
  273. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/dlg/dlgwrap.c +32 -0
  274. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/dlg/rules.mk +70 -0
  275. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/README +532 -0
  276. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvalid.c +46 -0
  277. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvalid.h +107 -0
  278. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvbsln.c +334 -0
  279. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvcommn.c +1747 -0
  280. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvcommn.h +581 -0
  281. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxverror.h +51 -0
  282. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfeat.c +339 -0
  283. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfeat.h +173 -0
  284. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfgen.c +484 -0
  285. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvjust.c +721 -0
  286. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvkern.c +920 -0
  287. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvlcar.c +224 -0
  288. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmod.c +288 -0
  289. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmod.h +46 -0
  290. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort.c +301 -0
  291. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort.h +99 -0
  292. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort0.c +152 -0
  293. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort1.c +260 -0
  294. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort2.c +312 -0
  295. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort4.c +126 -0
  296. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort5.c +234 -0
  297. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx.c +199 -0
  298. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx.h +73 -0
  299. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx0.c +112 -0
  300. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx1.c +278 -0
  301. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx2.c +331 -0
  302. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx4.c +56 -0
  303. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx5.c +226 -0
  304. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvopbd.c +218 -0
  305. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvprop.c +330 -0
  306. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvtrak.c +288 -0
  307. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/module.mk +23 -0
  308. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/rules.mk +98 -0
  309. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/README.freetype +22 -0
  310. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/adler32.c +168 -0
  311. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/crc32.c +1061 -0
  312. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/crc32.h +9446 -0
  313. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/ftgzip.c +805 -0
  314. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/ftzconf.h +551 -0
  315. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/gzguts.h +218 -0
  316. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffast.c +320 -0
  317. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffast.h +11 -0
  318. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffixed.h +94 -0
  319. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inflate.c +1534 -0
  320. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inflate.h +131 -0
  321. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inftrees.c +299 -0
  322. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inftrees.h +67 -0
  323. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/patches/freetype-zlib.diff +451 -0
  324. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/rules.mk +81 -0
  325. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zlib.h +1972 -0
  326. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zutil.c +305 -0
  327. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zutil.h +281 -0
  328. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftlzw.c +415 -0
  329. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftzopen.c +429 -0
  330. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftzopen.h +174 -0
  331. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/rules.mk +72 -0
  332. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/module.mk +23 -0
  333. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvalid.c +31 -0
  334. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvalid.h +77 -0
  335. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvbase.c +345 -0
  336. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvcommn.c +1099 -0
  337. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvcommn.h +468 -0
  338. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otverror.h +42 -0
  339. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgdef.c +303 -0
  340. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgpos.c +1051 -0
  341. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgpos.h +36 -0
  342. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgsub.c +627 -0
  343. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvjstf.c +259 -0
  344. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmath.c +453 -0
  345. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmod.c +281 -0
  346. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmod.h +38 -0
  347. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/rules.mk +81 -0
  348. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/README +96 -0
  349. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/module.mk +34 -0
  350. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcf.c +35 -0
  351. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcf.h +251 -0
  352. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfdrivr.c +836 -0
  353. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfdrivr.h +44 -0
  354. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcferror.h +41 -0
  355. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfread.c +1731 -0
  356. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfread.h +44 -0
  357. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfutil.c +119 -0
  358. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfutil.h +55 -0
  359. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/rules.mk +82 -0
  360. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/module.mk +23 -0
  361. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfr.c +29 -0
  362. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrcmap.c +188 -0
  363. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrcmap.h +45 -0
  364. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrdrivr.c +212 -0
  365. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrdrivr.h +36 -0
  366. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrerror.h +41 -0
  367. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrgload.c +849 -0
  368. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrgload.h +49 -0
  369. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrload.c +1062 -0
  370. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrload.h +123 -0
  371. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrobjs.c +603 -0
  372. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrobjs.h +96 -0
  373. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrsbit.c +813 -0
  374. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrsbit.h +37 -0
  375. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrtypes.h +331 -0
  376. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/rules.mk +76 -0
  377. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/afmparse.c +1094 -0
  378. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/afmparse.h +88 -0
  379. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/cffdecode.c +2411 -0
  380. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/cffdecode.h +63 -0
  381. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/module.mk +23 -0
  382. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psarrst.c +240 -0
  383. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psarrst.h +99 -0
  384. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psaux.c +40 -0
  385. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxerr.h +42 -0
  386. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxmod.c +190 -0
  387. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxmod.h +60 -0
  388. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psblues.c +571 -0
  389. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psblues.h +185 -0
  390. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psconv.c +610 -0
  391. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psconv.h +70 -0
  392. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pserror.c +52 -0
  393. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pserror.h +120 -0
  394. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfixed.h +94 -0
  395. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfont.c +566 -0
  396. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfont.h +134 -0
  397. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psft.c +895 -0
  398. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psft.h +167 -0
  399. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psglue.h +144 -0
  400. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pshints.c +1952 -0
  401. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pshints.h +288 -0
  402. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psintrp.c +3050 -0
  403. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psintrp.h +83 -0
  404. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psobjs.c +2560 -0
  405. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psobjs.h +312 -0
  406. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psread.c +112 -0
  407. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psread.h +68 -0
  408. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psstack.c +329 -0
  409. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psstack.h +122 -0
  410. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pstypes.h +77 -0
  411. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/rules.mk +89 -0
  412. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1cmap.c +393 -0
  413. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1cmap.h +104 -0
  414. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1decode.c +2159 -0
  415. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1decode.h +73 -0
  416. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/module.mk +23 -0
  417. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshalgo.c +2191 -0
  418. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshalgo.h +233 -0
  419. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshglob.c +795 -0
  420. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshglob.h +196 -0
  421. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshinter.c +27 -0
  422. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshmod.c +125 -0
  423. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshmod.h +38 -0
  424. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshnterr.h +41 -0
  425. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshrec.c +1224 -0
  426. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshrec.h +171 -0
  427. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/rules.mk +75 -0
  428. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/module.mk +23 -0
  429. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psmodule.c +621 -0
  430. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psmodule.h +37 -0
  431. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psnamerr.h +42 -0
  432. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psnames.c +24 -0
  433. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/pstables.h +4238 -0
  434. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/rules.mk +73 -0
  435. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftmisc.h +118 -0
  436. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftraster.c +2738 -0
  437. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftraster.h +47 -0
  438. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftrend1.c +209 -0
  439. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftrend1.h +37 -0
  440. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/module.mk +23 -0
  441. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/raster.c +25 -0
  442. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/rasterrs.h +42 -0
  443. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/rules.mk +72 -0
  444. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftbsdf.c +1350 -0
  445. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdf.c +3932 -0
  446. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdf.h +97 -0
  447. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfcommon.c +104 -0
  448. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfcommon.h +140 -0
  449. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdferrs.h +37 -0
  450. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfrend.c +603 -0
  451. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfrend.h +118 -0
  452. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/module.mk +29 -0
  453. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/rules.mk +78 -0
  454. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/sdf.c +29 -0
  455. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/module.mk +23 -0
  456. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/pngshim.c +474 -0
  457. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/pngshim.h +50 -0
  458. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/rules.mk +87 -0
  459. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfdriver.c +1384 -0
  460. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfdriver.h +35 -0
  461. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sferrors.h +41 -0
  462. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfnt.c +41 -0
  463. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfobjs.c +1552 -0
  464. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfobjs.h +58 -0
  465. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff.c +426 -0
  466. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff.h +43 -0
  467. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff2.c +2380 -0
  468. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff2.h +78 -0
  469. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttbdf.c +257 -0
  470. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttbdf.h +49 -0
  471. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmap.c +3902 -0
  472. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmap.h +126 -0
  473. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmapc.h +56 -0
  474. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcolr.c +1923 -0
  475. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcolr.h +83 -0
  476. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcpal.c +310 -0
  477. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcpal.h +48 -0
  478. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttgpos.c +598 -0
  479. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttgpos.h +53 -0
  480. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttkern.c +317 -0
  481. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttkern.h +51 -0
  482. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttload.c +1496 -0
  483. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttload.h +111 -0
  484. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttmtx.c +338 -0
  485. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttmtx.h +54 -0
  486. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttpost.c +484 -0
  487. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttpost.h +46 -0
  488. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsbit.c +1685 -0
  489. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsbit.h +62 -0
  490. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsvg.c +413 -0
  491. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsvg.h +43 -0
  492. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/woff2tags.c +119 -0
  493. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/woff2tags.h +41 -0
  494. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftgrays.c +2149 -0
  495. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftgrays.h +57 -0
  496. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmerrs.h +42 -0
  497. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmooth.c +605 -0
  498. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmooth.h +37 -0
  499. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/module.mk +23 -0
  500. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/rules.mk +73 -0
  501. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/smooth.c +25 -0
  502. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/ftsvg.c +355 -0
  503. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/ftsvg.h +35 -0
  504. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/module.mk +23 -0
  505. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/rules.mk +70 -0
  506. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/svg.c +24 -0
  507. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/svgtypes.h +42 -0
  508. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/afblue.pl +551 -0
  509. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/apinames.c +556 -0
  510. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/chktrcmp.py +119 -0
  511. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/cordic.py +32 -0
  512. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/Makefile +45 -0
  513. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/README +69 -0
  514. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/ftrandom.c +720 -0
  515. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/glnames.py +5533 -0
  516. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/make_distribution_archives.py +208 -0
  517. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/no-copyright +66 -0
  518. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_afm.c +156 -0
  519. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_bbox.c +187 -0
  520. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_trig.c +257 -0
  521. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/update-copyright +14 -0
  522. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/update-copyright-year +157 -0
  523. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/vms_shorten_symbol.c +250 -0
  524. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/module.mk +23 -0
  525. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/rules.mk +75 -0
  526. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/truetype.c +29 -0
  527. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttdriver.c +704 -0
  528. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttdriver.h +35 -0
  529. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/tterrors.h +42 -0
  530. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgload.c +2740 -0
  531. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgload.h +61 -0
  532. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgxvar.c +4594 -0
  533. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgxvar.h +453 -0
  534. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttinterp.c +7751 -0
  535. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttinterp.h +465 -0
  536. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttobjs.c +1543 -0
  537. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttobjs.h +426 -0
  538. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttpload.c +665 -0
  539. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttpload.h +74 -0
  540. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/module.mk +23 -0
  541. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/rules.mk +76 -0
  542. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1afm.c +413 -0
  543. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1afm.h +53 -0
  544. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1driver.c +807 -0
  545. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1driver.h +35 -0
  546. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1errors.h +41 -0
  547. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1gload.c +606 -0
  548. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1gload.h +52 -0
  549. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1load.c +2755 -0
  550. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1load.h +126 -0
  551. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1objs.c +655 -0
  552. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1objs.h +160 -0
  553. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1parse.c +487 -0
  554. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1parse.h +137 -0
  555. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1tokens.h +143 -0
  556. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/type1.c +29 -0
  557. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/module.mk +23 -0
  558. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/rules.mk +73 -0
  559. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42drivr.c +248 -0
  560. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42drivr.h +36 -0
  561. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42error.h +41 -0
  562. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42objs.c +698 -0
  563. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42objs.h +123 -0
  564. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42parse.c +1351 -0
  565. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42parse.h +91 -0
  566. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42types.h +56 -0
  567. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/type42.c +26 -0
  568. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/fnterrs.h +42 -0
  569. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/module.mk +23 -0
  570. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/rules.mk +68 -0
  571. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/winfnt.c +1219 -0
  572. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/winfnt.h +164 -0
  573. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/.appveyor.yml +69 -0
  574. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/.travis.yml +41 -0
  575. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ANNOUNCE +55 -0
  576. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/AUTHORS +46 -0
  577. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/CHANGES +6111 -0
  578. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/CMakeLists.txt +1042 -0
  579. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/INSTALL +465 -0
  580. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/LICENSE +134 -0
  581. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/Makefile.am +392 -0
  582. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/Makefile.in +2420 -0
  583. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/README +183 -0
  584. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/TODO +23 -0
  585. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/TRADEMARK +8 -0
  586. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/aclocal.m4 +1196 -0
  587. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/arm_init.c +136 -0
  588. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/filter_neon.S +253 -0
  589. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/filter_neon_intrinsics.c +402 -0
  590. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/palette_neon_intrinsics.c +149 -0
  591. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/autogen.sh +225 -0
  592. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_autotools.sh +95 -0
  593. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_cmake.sh +127 -0
  594. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_legacy.sh +116 -0
  595. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/compile +348 -0
  596. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.guess +1476 -0
  597. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.h.in +126 -0
  598. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.sub +1801 -0
  599. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/configure +16116 -0
  600. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/configure.ac +532 -0
  601. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/README.txt +5 -0
  602. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/README +83 -0
  603. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/android-ndk.c +39 -0
  604. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/linux-auxv.c +120 -0
  605. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/linux.c +161 -0
  606. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/README +49 -0
  607. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/pngcp.dfa +57 -0
  608. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/read.dfa +58 -0
  609. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/s_read.dfa +35 -0
  610. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/s_write.dfa +33 -0
  611. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/simple.dfa +36 -0
  612. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/write.dfa +45 -0
  613. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/README.txt +24 -0
  614. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/iccfrompng.c +185 -0
  615. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/pngpixel.c +371 -0
  616. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/pngtopng.c +98 -0
  617. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/simpleover.c +648 -0
  618. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/COPYING +340 -0
  619. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/LICENSE +50 -0
  620. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.mingw32 +131 -0
  621. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.sgi +105 -0
  622. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.unx +134 -0
  623. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.w32 +114 -0
  624. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/README +186 -0
  625. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/makevms.com +132 -0
  626. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng.c +323 -0
  627. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng.h +88 -0
  628. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng2.c +521 -0
  629. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng2.h +116 -0
  630. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readppm.c +188 -0
  631. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng-win.c +735 -0
  632. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng-x.c +911 -0
  633. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng2-win.c +1261 -0
  634. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng2-x.c +2143 -0
  635. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/toucan.png +0 -0
  636. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/wpng.c +865 -0
  637. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/writepng.c +401 -0
  638. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/writepng.h +133 -0
  639. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/fakepng.c +65 -0
  640. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/gentests.sh +100 -0
  641. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/makepng.c +1948 -0
  642. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngimage.c +1722 -0
  643. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngstest-errors.h +165 -0
  644. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngstest.c +3832 -0
  645. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngunknown.c +1305 -0
  646. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngvalid.c +12279 -0
  647. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/readpng.c +114 -0
  648. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/tarith.c +1011 -0
  649. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/timepng.c +607 -0
  650. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/mips-msa/README +83 -0
  651. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/mips-msa/linux.c +67 -0
  652. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/Dockerfile +25 -0
  653. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/README.txt +37 -0
  654. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/build.sh +51 -0
  655. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc +209 -0
  656. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/libpng_read_fuzzer.options +2 -0
  657. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/png.dict +39 -0
  658. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/README +5 -0
  659. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/README +10 -0
  660. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/pngusr.dfa +40 -0
  661. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/pngusr.h +23 -0
  662. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/README +10 -0
  663. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/pngusr.dfa +39 -0
  664. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/pngusr.h +23 -0
  665. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/README +15 -0
  666. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/pngusr.dfa +40 -0
  667. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/pngusr.h +23 -0
  668. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/CHANGES.txt +13 -0
  669. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/CMakeLists.txt +34 -0
  670. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/LICENSE.txt +22 -0
  671. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/README.txt +120 -0
  672. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/makevms.com +92 -0
  673. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.bat +41 -0
  674. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.c +427 -0
  675. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.sh +42 -0
  676. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pngminus.bat +4 -0
  677. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pngminus.sh +5 -0
  678. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.bat +41 -0
  679. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.c +620 -0
  680. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.sh +42 -0
  681. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/README +107 -0
  682. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/bad_interlace_conversions.txt +9 -0
  683. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g01.png +0 -0
  684. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g02.png +0 -0
  685. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g04.png +0 -0
  686. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g08.png +0 -0
  687. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g16.png +0 -0
  688. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn2c08.png +0 -0
  689. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn2c16.png +0 -0
  690. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p01.png +0 -0
  691. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p02.png +0 -0
  692. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p04.png +0 -0
  693. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p08.png +0 -0
  694. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn4a08.png +0 -0
  695. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn4a16.png +0 -0
  696. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn6a08.png +0 -0
  697. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn6a16.png +0 -0
  698. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g01.png +0 -0
  699. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g02.png +0 -0
  700. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g04.png +0 -0
  701. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn2c16.png +0 -0
  702. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn3p08.png +0 -0
  703. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbgn2c16.png +0 -0
  704. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbgn3p08.png +0 -0
  705. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbrn2c08.png +0 -0
  706. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbwn0g16.png +0 -0
  707. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbwn3p08.png +0 -0
  708. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbyn3p08.png +0 -0
  709. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n0g08.png +0 -0
  710. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n2c08.png +0 -0
  711. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n3p08.png +0 -0
  712. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp1n3p08.png +0 -0
  713. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn0g08.png +0 -0
  714. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn0g16.png +0 -0
  715. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn2c08.png +0 -0
  716. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn2c16.png +0 -0
  717. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn3p08.png +0 -0
  718. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn4a08.png +0 -0
  719. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn4a16.png +0 -0
  720. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn6a08.png +0 -0
  721. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn6a16.png +0 -0
  722. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbbn2c16.png +0 -0
  723. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbbn3p08.png +0 -0
  724. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbgn2c16.png +0 -0
  725. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbgn3p08.png +0 -0
  726. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbrn2c08.png +0 -0
  727. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbwn0g16.png +0 -0
  728. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbwn3p08.png +0 -0
  729. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbyn3p08.png +0 -0
  730. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n0g08.png +0 -0
  731. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n2c08.png +0 -0
  732. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n3p08.png +0 -0
  733. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp1n3p08.png +0 -0
  734. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/README +2 -0
  735. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g01.png +0 -0
  736. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g02.png +0 -0
  737. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g04.png +0 -0
  738. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p01.png +0 -0
  739. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p02.png +0 -0
  740. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p04.png +0 -0
  741. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g01.png +0 -0
  742. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g02.png +0 -0
  743. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g04.png +0 -0
  744. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/README +81 -0
  745. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/linux.c +57 -0
  746. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/linux_aux.c +34 -0
  747. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/bad_iCCP.png +0 -0
  748. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/badadler.png +0 -0
  749. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/badcrc.png +0 -0
  750. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/empty_ancillary_chunks.png +0 -0
  751. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_IDAT.png +0 -0
  752. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_bKGD_chunk.png +0 -0
  753. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_cHRM_chunk.png +0 -0
  754. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_eXIf_chunk.png +0 -0
  755. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_gAMA_chunk.png +0 -0
  756. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_hIST_chunk.png +0 -0
  757. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_iCCP_chunk.png +0 -0
  758. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_iTXt_chunk.png +0 -0
  759. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_juNK_unsafe_to_copy.png +0 -0
  760. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_juNk_safe_to_copy.png +0 -0
  761. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_pCAL_chunk.png +0 -0
  762. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_pHYs_chunk.png +0 -0
  763. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sCAL_chunk.png +0 -0
  764. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sPLT_chunk.png +0 -0
  765. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sRGB_chunk.png +0 -0
  766. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sTER_chunk.png +0 -0
  767. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_tEXt_chunk.png +0 -0
  768. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_tIME_chunk.png +0 -0
  769. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_zTXt_chunk.png +0 -0
  770. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-1.8-tRNS.png +0 -0
  771. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-1.8.png +0 -0
  772. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-linear-tRNS.png +0 -0
  773. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-linear.png +0 -0
  774. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-sRGB-tRNS.png +0 -0
  775. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-sRGB.png +0 -0
  776. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-tRNS.png +0 -0
  777. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1.png +0 -0
  778. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-1.8-tRNS.png +0 -0
  779. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-1.8.png +0 -0
  780. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-linear-tRNS.png +0 -0
  781. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-linear.png +0 -0
  782. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-sRGB-tRNS.png +0 -0
  783. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-sRGB.png +0 -0
  784. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-tRNS.png +0 -0
  785. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16.png +0 -0
  786. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-1.8-tRNS.png +0 -0
  787. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-1.8.png +0 -0
  788. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-linear-tRNS.png +0 -0
  789. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-linear.png +0 -0
  790. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-sRGB-tRNS.png +0 -0
  791. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-sRGB.png +0 -0
  792. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-tRNS.png +0 -0
  793. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2.png +0 -0
  794. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-1.8-tRNS.png +0 -0
  795. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-1.8.png +0 -0
  796. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-linear-tRNS.png +0 -0
  797. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-linear.png +0 -0
  798. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-sRGB-tRNS.png +0 -0
  799. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-sRGB.png +0 -0
  800. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-tRNS.png +0 -0
  801. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4.png +0 -0
  802. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-1.8-tRNS.png +0 -0
  803. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-1.8.png +0 -0
  804. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-linear-tRNS.png +0 -0
  805. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-linear.png +0 -0
  806. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-sRGB-tRNS.png +0 -0
  807. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-sRGB.png +0 -0
  808. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-tRNS.png +0 -0
  809. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8.png +0 -0
  810. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-1.8.png +0 -0
  811. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-linear.png +0 -0
  812. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-sRGB.png +0 -0
  813. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16.png +0 -0
  814. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-1.8.png +0 -0
  815. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-linear.png +0 -0
  816. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-sRGB.png +0 -0
  817. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8.png +0 -0
  818. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/makepngs.sh +94 -0
  819. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-1.8-tRNS.png +0 -0
  820. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-1.8.png +0 -0
  821. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-linear-tRNS.png +0 -0
  822. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-linear.png +0 -0
  823. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-sRGB-tRNS.png +0 -0
  824. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-sRGB.png +0 -0
  825. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-tRNS.png +0 -0
  826. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1.png +0 -0
  827. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-1.8-tRNS.png +0 -0
  828. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-1.8.png +0 -0
  829. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-linear-tRNS.png +0 -0
  830. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-linear.png +0 -0
  831. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-sRGB-tRNS.png +0 -0
  832. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-sRGB.png +0 -0
  833. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-tRNS.png +0 -0
  834. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2.png +0 -0
  835. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-1.8-tRNS.png +0 -0
  836. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-1.8.png +0 -0
  837. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-linear-tRNS.png +0 -0
  838. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-linear.png +0 -0
  839. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-sRGB-tRNS.png +0 -0
  840. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-sRGB.png +0 -0
  841. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-tRNS.png +0 -0
  842. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4.png +0 -0
  843. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-1.8-tRNS.png +0 -0
  844. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-1.8.png +0 -0
  845. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-linear-tRNS.png +0 -0
  846. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-linear.png +0 -0
  847. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-sRGB-tRNS.png +0 -0
  848. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-sRGB.png +0 -0
  849. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-tRNS.png +0 -0
  850. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8.png +0 -0
  851. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-1.8-tRNS.png +0 -0
  852. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-1.8.png +0 -0
  853. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-linear-tRNS.png +0 -0
  854. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-linear.png +0 -0
  855. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-sRGB-tRNS.png +0 -0
  856. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-sRGB.png +0 -0
  857. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-tRNS.png +0 -0
  858. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16.png +0 -0
  859. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-1.8-tRNS.png +0 -0
  860. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-1.8.png +0 -0
  861. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-linear-tRNS.png +0 -0
  862. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-linear.png +0 -0
  863. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-sRGB-tRNS.png +0 -0
  864. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-sRGB.png +0 -0
  865. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-tRNS.png +0 -0
  866. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8.png +0 -0
  867. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-1.8.png +0 -0
  868. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-linear.png +0 -0
  869. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-sRGB.png +0 -0
  870. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16.png +0 -0
  871. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-1.8.png +0 -0
  872. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-linear.png +0 -0
  873. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-sRGB.png +0 -0
  874. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8.png +0 -0
  875. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/README.txt +27 -0
  876. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/checksum-icc.c +102 -0
  877. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/chkfmt +144 -0
  878. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/cvtcolor.c +188 -0
  879. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/genpng.c +881 -0
  880. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/intgamma.sh +110 -0
  881. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/makesRGB.c +430 -0
  882. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/png-fix-itxt.c +164 -0
  883. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/pngcp.c +2453 -0
  884. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/pngfix.c +4049 -0
  885. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/reindent +25 -0
  886. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/sRGB.h +48 -0
  887. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/PngFile.c +454 -0
  888. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/PngFile.h +30 -0
  889. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/README.txt +61 -0
  890. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.c +978 -0
  891. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.dsp +147 -0
  892. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.dsw +29 -0
  893. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.ico +0 -0
  894. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.png +0 -0
  895. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.rc +152 -0
  896. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/cexcept.h +248 -0
  897. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/resource.h +23 -0
  898. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/depcomp +791 -0
  899. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/example.c +1041 -0
  900. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/install-sh +518 -0
  901. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/intel/filter_sse2_intrinsics.c +391 -0
  902. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/intel/intel_init.c +52 -0
  903. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng-config.in +127 -0
  904. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng-manual.txt +5409 -0
  905. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng.3 +6052 -0
  906. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng.pc.in +12 -0
  907. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpngpf.3 +24 -0
  908. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ltmain.sh +11147 -0
  909. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/mips/filter_msa_intrinsics.c +808 -0
  910. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/mips/mips_init.c +130 -0
  911. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/missing +215 -0
  912. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.5 +84 -0
  913. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.c +4607 -0
  914. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.h +3247 -0
  915. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngbar.jpg +0 -0
  916. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngbar.png +0 -0
  917. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngconf.h +623 -0
  918. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngdebug.h +153 -0
  919. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngerror.c +963 -0
  920. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngget.c +1249 -0
  921. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pnginfo.h +267 -0
  922. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pnglibconf.h +219 -0
  923. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngmem.c +284 -0
  924. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngnow.png +0 -0
  925. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngpread.c +1096 -0
  926. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngpriv.h +2152 -0
  927. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngread.c +4225 -0
  928. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrio.c +120 -0
  929. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrtran.c +5044 -0
  930. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrutil.c +4678 -0
  931. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngset.c +1802 -0
  932. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngstruct.h +489 -0
  933. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtest.c +2158 -0
  934. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtest.png +0 -0
  935. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtrans.c +864 -0
  936. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngusr.dfa +14 -0
  937. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwio.c +168 -0
  938. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwrite.c +2390 -0
  939. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwtran.c +575 -0
  940. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwutil.c +2781 -0
  941. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/powerpc/filter_vsx_intrinsics.c +768 -0
  942. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/powerpc/powerpc_init.c +126 -0
  943. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/libpng.tgt +383 -0
  944. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/libpng.wpj +112 -0
  945. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngconfig.mak +160 -0
  946. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngstest.tgt +219 -0
  947. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngtest.tgt +179 -0
  948. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngvalid.tgt +210 -0
  949. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/PRJ0041.mak +21 -0
  950. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/README.txt +58 -0
  951. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/README_zlib.txt +44 -0
  952. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/libpng.sln +60 -0
  953. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/libpng.vcproj +419 -0
  954. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/pngtest.vcproj +267 -0
  955. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/zlib.vcproj +391 -0
  956. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/README.txt +87 -0
  957. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/libpng/libpng.vcxproj +234 -0
  958. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/pnglibconf/pnglibconf.vcxproj +61 -0
  959. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/vstudio.sln +109 -0
  960. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/zlib/zlib.vcxproj +175 -0
  961. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/zlib.props +57 -0
  962. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/README.txt +83 -0
  963. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/SCOPTIONS.ppc +7 -0
  964. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/checksym.awk +173 -0
  965. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/descrip.mms +47 -0
  966. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/dfn.awk +203 -0
  967. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/genchk.cmake.in +37 -0
  968. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/genout.cmake.in +105 -0
  969. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/gensrc.cmake.in +138 -0
  970. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/intprefix.c +22 -0
  971. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng-config-body.in +96 -0
  972. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng-config-head.in +24 -0
  973. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng.pc.in +10 -0
  974. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libtool.m4 +8369 -0
  975. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltoptions.m4 +437 -0
  976. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltsugar.m4 +124 -0
  977. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltversion.m4 +23 -0
  978. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/lt~obsolete.m4 +99 -0
  979. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/macro.lst +3 -0
  980. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.32sunu +241 -0
  981. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.64sunu +241 -0
  982. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.acorn +57 -0
  983. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.aix +116 -0
  984. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.amiga +58 -0
  985. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.atari +71 -0
  986. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.bc32 +158 -0
  987. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.beos +222 -0
  988. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.cegcc +116 -0
  989. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.clang +87 -0
  990. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.darwin +222 -0
  991. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.dec +210 -0
  992. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.dj2 +72 -0
  993. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.freebsd +66 -0
  994. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.gcc +87 -0
  995. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hp64 +228 -0
  996. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hpgcc +225 -0
  997. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hpux +226 -0
  998. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.ibmc +90 -0
  999. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.intel +118 -0
  1000. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.linux +240 -0
  1001. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.linux-opt +258 -0
  1002. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.mips +100 -0
  1003. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.msys +199 -0
  1004. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.netbsd +55 -0
  1005. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.openbsd +86 -0
  1006. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sco +223 -0
  1007. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sggcc +233 -0
  1008. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sgi +234 -0
  1009. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.so9 +244 -0
  1010. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.solaris +240 -0
  1011. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.std +133 -0
  1012. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sunos +112 -0
  1013. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.vcwin32 +112 -0
  1014. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makevms.com +142 -0
  1015. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/options.awk +898 -0
  1016. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.dfa +920 -0
  1017. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.h.prebuilt +219 -0
  1018. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.mak +55 -0
  1019. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pngwin.rc +112 -0
  1020. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/prefix.c +24 -0
  1021. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/smakefile.ppc +34 -0
  1022. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/sym.c +15 -0
  1023. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/symbols.c +58 -0
  1024. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/symbols.def +255 -0
  1025. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/test.cmake.in +31 -0
  1026. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/vers.c +19 -0
  1027. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/test-driver +148 -0
  1028. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngimage-full +2 -0
  1029. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngimage-quick +2 -0
  1030. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-1.8 +2 -0
  1031. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-1.8-alpha +2 -0
  1032. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-linear +2 -0
  1033. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-linear-alpha +2 -0
  1034. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-none +2 -0
  1035. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-none-alpha +2 -0
  1036. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-sRGB +2 -0
  1037. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-sRGB-alpha +2 -0
  1038. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngtest-all +16 -0
  1039. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-IDAT +2 -0
  1040. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-discard +2 -0
  1041. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-if-safe +2 -0
  1042. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-sAPI +2 -0
  1043. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-sTER +2 -0
  1044. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-save +2 -0
  1045. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-vpAg +2 -0
  1046. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-16-to-8 +2 -0
  1047. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-alpha-mode +2 -0
  1048. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-background +2 -0
  1049. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-alpha-mode +2 -0
  1050. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-background +2 -0
  1051. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-transform +2 -0
  1052. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-sbit +2 -0
  1053. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-threshold +2 -0
  1054. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-transform +2 -0
  1055. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-interlace-standard +2 -0
  1056. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-size +2 -0
  1057. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-standard +2 -0
  1058. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-standard +2 -0
  1059. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-transform +2 -0
  1060. package/harmony/gcanvas/src/main/cpp/core/harmony/manager/GCanvasManagerOhos.cpp +50 -0
  1061. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/AutoPtr.h +99 -0
  1062. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/IDelete.h +25 -0
  1063. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/RefCount.h +55 -0
  1064. package/harmony/gcanvas/src/main/cpp/core/harmony/png/IPngCoder.h +38 -0
  1065. package/harmony/gcanvas/src/main/cpp/core/harmony/png/LodePngCoder.cpp +101 -0
  1066. package/harmony/gcanvas/src/main/cpp/core/harmony/png/LodePngCoder.h +40 -0
  1067. package/harmony/gcanvas/src/main/cpp/core/harmony/png/PngLoader.cpp +114 -0
  1068. package/harmony/gcanvas/src/main/cpp/core/harmony/png/PngLoader.h +53 -0
  1069. package/harmony/gcanvas/src/main/cpp/core/harmony/png/thirdparty/lodepng.c +6292 -0
  1070. package/harmony/gcanvas/src/main/cpp/core/harmony/png/thirdparty/lodepng.h +1890 -0
  1071. package/harmony/gcanvas/src/main/cpp/core/src/GCanvas.cpp +89 -0
  1072. package/harmony/gcanvas/src/main/cpp/core/src/GCanvas.hpp +45 -0
  1073. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasManager.cpp +158 -0
  1074. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasManager.h +56 -0
  1075. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasWeex.cpp +1925 -0
  1076. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasWeex.hpp +335 -0
  1077. package/harmony/gcanvas/src/main/cpp/core/src/RNCGCanvasBridge.h +225 -0
  1078. package/harmony/gcanvas/src/main/cpp/core/src/export.h +29 -0
  1079. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvas2dContext.cpp +2366 -0
  1080. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvas2dContext.h +449 -0
  1081. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvasState.cpp +189 -0
  1082. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvasState.h +83 -0
  1083. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GContext2dType.h +68 -0
  1084. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GConvert.cpp +476 -0
  1085. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GConvert.h +25 -0
  1086. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFillStyle.h +191 -0
  1087. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontManager.h +110 -0
  1088. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontStyle.cpp +149 -0
  1089. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontStyle.h +94 -0
  1090. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFrameBufferObject.cpp +226 -0
  1091. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFrameBufferObject.h +116 -0
  1092. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGL.h +45 -0
  1093. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGlyphCache.cpp +106 -0
  1094. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGlyphCache.h +159 -0
  1095. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPath.cpp +1213 -0
  1096. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPath.h +115 -0
  1097. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPoint.h +117 -0
  1098. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShader.cpp +346 -0
  1099. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShader.h +360 -0
  1100. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShaderManager.cpp +140 -0
  1101. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShaderManager.h +38 -0
  1102. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GStrSeparator.cpp +84 -0
  1103. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GStrSeparator.h +31 -0
  1104. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTextDefine.h +34 -0
  1105. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTexture.cpp +327 -0
  1106. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTexture.h +133 -0
  1107. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTransform.h +163 -0
  1108. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTreemap.cpp +61 -0
  1109. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTreemap.h +88 -0
  1110. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GWebglContext.cpp +3259 -0
  1111. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GWebglContext.h +13 -0
  1112. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/default.glsl +39 -0
  1113. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/grad.glsl +101 -0
  1114. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/pattern.glsl +45 -0
  1115. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/radiation.glsl +110 -0
  1116. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/shadow.glsl +39 -0
  1117. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/texture.glsl +34 -0
  1118. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextAndroid.cpp +386 -0
  1119. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextAndroid.h +113 -0
  1120. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextImpl.cpp +67 -0
  1121. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvasAndroid.cpp +41 -0
  1122. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvasAndroid.h +36 -0
  1123. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFont.cpp +806 -0
  1124. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFont.h +164 -0
  1125. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontCache.cpp +467 -0
  1126. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontCache.h +93 -0
  1127. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontFamily.cpp +187 -0
  1128. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontFamily.h +68 -0
  1129. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManager.cpp +205 -0
  1130. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerAndroid.cpp +328 -0
  1131. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerAndroid.h +63 -0
  1132. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerImpl.cpp +22 -0
  1133. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFrameBufferObjectImpl.cpp +180 -0
  1134. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GPreCompiledShaders.cpp +175 -0
  1135. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GPreCompiledShaders.h +75 -0
  1136. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GSystemFontInformation.cpp +231 -0
  1137. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GSystemFontInformation.h +69 -0
  1138. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/FontTool.hpp +892 -0
  1139. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFont.cpp +742 -0
  1140. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontCache.cpp +296 -0
  1141. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontFamily.cpp +162 -0
  1142. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontManager.cpp +230 -0
  1143. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GSystemFontInformation.cpp +232 -0
  1144. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/PortableMap.hpp +621 -0
  1145. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/argh.h +434 -0
  1146. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/fonttool.cpp +109 -0
  1147. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/utils.hpp +229 -0
  1148. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GCVFont.h +126 -0
  1149. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GCVFont.mm +573 -0
  1150. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GFontManager.mm +185 -0
  1151. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextHarmony.cpp +391 -0
  1152. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextHarmony.h +114 -0
  1153. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextOHOS.cpp +49 -0
  1154. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvasHarmony.cpp +42 -0
  1155. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvasHarmony.h +37 -0
  1156. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFont.cpp +806 -0
  1157. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFont.h +164 -0
  1158. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontCache.cpp +466 -0
  1159. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontCache.h +94 -0
  1160. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontFamily.cpp +188 -0
  1161. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontFamily.h +69 -0
  1162. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerHarmony.cpp +329 -0
  1163. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerHarmony.h +64 -0
  1164. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerImpl.cpp +23 -0
  1165. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFrameBufferObjectImpl.cpp +221 -0
  1166. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GPreCompiledShaders.cpp +176 -0
  1167. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GPreCompiledShaders.h +76 -0
  1168. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GSystemFontInformation.cpp +232 -0
  1169. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GSystemFontInformation.h +70 -0
  1170. package/harmony/gcanvas/src/main/cpp/core/src/support/CharacterSet.cpp +126 -0
  1171. package/harmony/gcanvas/src/main/cpp/core/src/support/CharacterSet.h +30 -0
  1172. package/harmony/gcanvas/src/main/cpp/core/src/support/ConcurrenceQueue.h +128 -0
  1173. package/harmony/gcanvas/src/main/cpp/core/src/support/DynArray.h +157 -0
  1174. package/harmony/gcanvas/src/main/cpp/core/src/support/Encode.cpp +116 -0
  1175. package/harmony/gcanvas/src/main/cpp/core/src/support/Encode.h +20 -0
  1176. package/harmony/gcanvas/src/main/cpp/core/src/support/FileUtils.cpp +153 -0
  1177. package/harmony/gcanvas/src/main/cpp/core/src/support/FileUtils.h +56 -0
  1178. package/harmony/gcanvas/src/main/cpp/core/src/support/GLUtil.cpp +174 -0
  1179. package/harmony/gcanvas/src/main/cpp/core/src/support/GLUtil.h +25 -0
  1180. package/harmony/gcanvas/src/main/cpp/core/src/support/Lesser.h +27 -0
  1181. package/harmony/gcanvas/src/main/cpp/core/src/support/Log.cpp +158 -0
  1182. package/harmony/gcanvas/src/main/cpp/core/src/support/Log.h +100 -0
  1183. package/harmony/gcanvas/src/main/cpp/core/src/support/Util.cpp +118 -0
  1184. package/harmony/gcanvas/src/main/cpp/core/src/support/Util.h +38 -0
  1185. package/harmony/gcanvas/src/main/cpp/core/src/support/Value.cpp +180 -0
  1186. package/harmony/gcanvas/src/main/cpp/core/src/support/Value.h +76 -0
  1187. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/BaseGcanvasPackage.h +79 -0
  1188. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/components/GCanvasViewJSIBinder.h +37 -0
  1189. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/turbo_modules/GCanvasModule.cpp +35 -0
  1190. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/turbo_modules/GCanvasModule.h +16 -0
  1191. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ComponentDescriptors.h +24 -0
  1192. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/EventEmitters.cpp +33 -0
  1193. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/EventEmitters.h +31 -0
  1194. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/Props.cpp +28 -0
  1195. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/Props.h +30 -0
  1196. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ShadowNodes.cpp +17 -0
  1197. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ShadowNodes.h +32 -0
  1198. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/States.cpp +16 -0
  1199. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/States.h +29 -0
  1200. package/harmony/gcanvas/src/main/ets/GCanvasModuleTurboModule.ts +448 -0
  1201. package/harmony/gcanvas/src/main/ets/GCanvasNativeEngine.ts +206 -0
  1202. package/harmony/gcanvas/src/main/ets/GcanvasTurboModulesFactory.ets +42 -0
  1203. package/harmony/gcanvas/src/main/ets/components/GCanvasView.ets +109 -0
  1204. package/harmony/gcanvas/src/main/ets/generated/components/GCanvasView.ts +126 -0
  1205. package/harmony/gcanvas/src/main/ets/generated/components/ts.ts +5 -0
  1206. package/harmony/gcanvas/src/main/ets/generated/index.ets +5 -0
  1207. package/harmony/gcanvas/src/main/ets/generated/ts.ts +6 -0
  1208. package/harmony/gcanvas/src/main/ets/generated/turboModules/GCanvasModule.ts +52 -0
  1209. package/harmony/gcanvas/src/main/ets/generated/turboModules/ts.ts +5 -0
  1210. package/harmony/gcanvas/src/main/module.json5 +21 -0
  1211. package/harmony/gcanvas/src/main/resources/base/element/string.json +12 -0
  1212. package/harmony/gcanvas/src/main/resources/en_US/element/string.json +8 -0
  1213. package/harmony/gcanvas/src/main/resources/zh_CN/element/string.json +12 -0
  1214. package/harmony/gcanvas.har +0 -0
  1215. package/package.json +69 -0
  1216. package/packages/gcanvas/.babelrc +5 -0
  1217. package/packages/gcanvas/.eslintrc.js +133 -0
  1218. package/packages/gcanvas/package.json +19 -0
  1219. package/packages/gcanvas/rollup.config.js +14 -0
  1220. package/packages/gcanvas/src/bridge/react-native.js +286 -0
  1221. package/packages/gcanvas/src/bridge/weex.js +210 -0
  1222. package/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +17 -0
  1223. package/packages/gcanvas/src/context/2d/FillStylePattern.js +8 -0
  1224. package/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +17 -0
  1225. package/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +49 -0
  1226. package/packages/gcanvas/src/context/2d/RenderingContext.js +787 -0
  1227. package/packages/gcanvas/src/context/webgl/ActiveInfo.js +11 -0
  1228. package/packages/gcanvas/src/context/webgl/Buffer.js +21 -0
  1229. package/packages/gcanvas/src/context/webgl/Framebuffer.js +21 -0
  1230. package/packages/gcanvas/src/context/webgl/GLenum.js +300 -0
  1231. package/packages/gcanvas/src/context/webgl/GLmethod.js +142 -0
  1232. package/packages/gcanvas/src/context/webgl/GLtype.js +22 -0
  1233. package/packages/gcanvas/src/context/webgl/Program.js +21 -0
  1234. package/packages/gcanvas/src/context/webgl/Renderbuffer.js +21 -0
  1235. package/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -0
  1236. package/packages/gcanvas/src/context/webgl/Shader.js +22 -0
  1237. package/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +11 -0
  1238. package/packages/gcanvas/src/context/webgl/Texture.js +22 -0
  1239. package/packages/gcanvas/src/context/webgl/UniformLocation.js +22 -0
  1240. package/packages/gcanvas/src/context/webgl/classUtils.js +3 -0
  1241. package/packages/gcanvas/src/env/canvas.js +210 -0
  1242. package/packages/gcanvas/src/env/image.js +76 -0
  1243. package/packages/gcanvas/src/env/off-screen-canvas.js +74 -0
  1244. package/packages/gcanvas/src/index.js +65 -0
  1245. package/src/components/CanvasView.js +20 -0
  1246. package/src/components/GCanvasComponent.js +408 -0
  1247. package/src/index.js +69 -0
  1248. package/src/packages/gcanvas/.babelrc +5 -0
  1249. package/src/packages/gcanvas/.eslintrc.js +133 -0
  1250. package/src/packages/gcanvas/package.json +19 -0
  1251. package/src/packages/gcanvas/rollup.config.js +14 -0
  1252. package/src/packages/gcanvas/src/bridge/react-native.js +288 -0
  1253. package/src/packages/gcanvas/src/bridge/weex.js +210 -0
  1254. package/src/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +17 -0
  1255. package/src/packages/gcanvas/src/context/2d/FillStylePattern.js +8 -0
  1256. package/src/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +17 -0
  1257. package/src/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +49 -0
  1258. package/src/packages/gcanvas/src/context/2d/RenderingContext.js +801 -0
  1259. package/src/packages/gcanvas/src/context/webgl/ActiveInfo.js +11 -0
  1260. package/src/packages/gcanvas/src/context/webgl/Buffer.js +21 -0
  1261. package/src/packages/gcanvas/src/context/webgl/Framebuffer.js +21 -0
  1262. package/src/packages/gcanvas/src/context/webgl/GLenum.js +300 -0
  1263. package/src/packages/gcanvas/src/context/webgl/GLmethod.js +142 -0
  1264. package/src/packages/gcanvas/src/context/webgl/GLtype.js +22 -0
  1265. package/src/packages/gcanvas/src/context/webgl/Program.js +21 -0
  1266. package/src/packages/gcanvas/src/context/webgl/Renderbuffer.js +21 -0
  1267. package/src/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -0
  1268. package/src/packages/gcanvas/src/context/webgl/Shader.js +22 -0
  1269. package/src/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +11 -0
  1270. package/src/packages/gcanvas/src/context/webgl/Texture.js +22 -0
  1271. package/src/packages/gcanvas/src/context/webgl/UniformLocation.js +22 -0
  1272. package/src/packages/gcanvas/src/context/webgl/classUtils.js +3 -0
  1273. package/src/packages/gcanvas/src/env/canvas.js +210 -0
  1274. package/src/packages/gcanvas/src/env/image.js +76 -0
  1275. package/src/packages/gcanvas/src/env/off-screen-canvas.js +74 -0
  1276. package/src/packages/gcanvas/src/index.js +65 -0
  1277. package/src/specs/v1/.gitkeep +1 -0
  1278. package/src/specs/v1/GCanvasViewNativeComponent.ts +47 -0
  1279. package/src/specs/v1/NativeGCanvasModule.ts +140 -0
  1280. package/src/specs/v2/.gitkeep +1 -0
@@ -0,0 +1,2390 @@
1
+
2
+ /* pngwrite.c - general routines to write a PNG file
3
+ *
4
+ * Copyright (c) 2018-2019 Cosmin Truta
5
+ * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
6
+ * Copyright (c) 1996-1997 Andreas Dilger
7
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
8
+ *
9
+ * This code is released under the libpng license.
10
+ * For conditions of distribution and use, see the disclaimer
11
+ * and license in png.h
12
+ */
13
+
14
+ #include "pngpriv.h"
15
+ #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
16
+ # include <errno.h>
17
+ #endif /* SIMPLIFIED_WRITE_STDIO */
18
+
19
+ #ifdef PNG_WRITE_SUPPORTED
20
+
21
+ #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
22
+ /* Write out all the unknown chunks for the current given location */
23
+ static void
24
+ write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr,
25
+ unsigned int where)
26
+ {
27
+ if (info_ptr->unknown_chunks_num != 0)
28
+ {
29
+ png_const_unknown_chunkp up;
30
+
31
+ png_debug(5, "writing extra chunks");
32
+
33
+ for (up = info_ptr->unknown_chunks;
34
+ up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
35
+ ++up)
36
+ if ((up->location & where) != 0)
37
+ {
38
+ /* If per-chunk unknown chunk handling is enabled use it, otherwise
39
+ * just write the chunks the application has set.
40
+ */
41
+ #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
42
+ int keep = png_handle_as_unknown(png_ptr, up->name);
43
+
44
+ /* NOTE: this code is radically different from the read side in the
45
+ * matter of handling an ancillary unknown chunk. In the read side
46
+ * the default behavior is to discard it, in the code below the default
47
+ * behavior is to write it. Critical chunks are, however, only
48
+ * written if explicitly listed or if the default is set to write all
49
+ * unknown chunks.
50
+ *
51
+ * The default handling is also slightly weird - it is not possible to
52
+ * stop the writing of all unsafe-to-copy chunks!
53
+ *
54
+ * TODO: REVIEW: this would seem to be a bug.
55
+ */
56
+ if (keep != PNG_HANDLE_CHUNK_NEVER &&
57
+ ((up->name[3] & 0x20) /* safe-to-copy overrides everything */ ||
58
+ keep == PNG_HANDLE_CHUNK_ALWAYS ||
59
+ (keep == PNG_HANDLE_CHUNK_AS_DEFAULT &&
60
+ png_ptr->unknown_default == PNG_HANDLE_CHUNK_ALWAYS)))
61
+ #endif
62
+ {
63
+ /* TODO: review, what is wrong with a zero length unknown chunk? */
64
+ if (up->size == 0)
65
+ png_warning(png_ptr, "Writing zero-length unknown chunk");
66
+
67
+ png_write_chunk(png_ptr, up->name, up->data, up->size);
68
+ }
69
+ }
70
+ }
71
+ }
72
+ #endif /* WRITE_UNKNOWN_CHUNKS */
73
+
74
+ /* Writes all the PNG information. This is the suggested way to use the
75
+ * library. If you have a new chunk to add, make a function to write it,
76
+ * and put it in the correct location here. If you want the chunk written
77
+ * after the image data, put it in png_write_end(). I strongly encourage
78
+ * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing
79
+ * the chunk, as that will keep the code from breaking if you want to just
80
+ * write a plain PNG file. If you have long comments, I suggest writing
81
+ * them in png_write_end(), and compressing them.
82
+ */
83
+ void PNGAPI
84
+ png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr)
85
+ {
86
+ png_debug(1, "in png_write_info_before_PLTE");
87
+
88
+ if (png_ptr == NULL || info_ptr == NULL)
89
+ return;
90
+
91
+ if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0)
92
+ {
93
+ /* Write PNG signature */
94
+ png_write_sig(png_ptr);
95
+
96
+ #ifdef PNG_MNG_FEATURES_SUPPORTED
97
+ if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \
98
+ png_ptr->mng_features_permitted != 0)
99
+ {
100
+ png_warning(png_ptr,
101
+ "MNG features are not allowed in a PNG datastream");
102
+ png_ptr->mng_features_permitted = 0;
103
+ }
104
+ #endif
105
+
106
+ /* Write IHDR information. */
107
+ png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
108
+ info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
109
+ info_ptr->filter_type,
110
+ #ifdef PNG_WRITE_INTERLACING_SUPPORTED
111
+ info_ptr->interlace_type
112
+ #else
113
+ 0
114
+ #endif
115
+ );
116
+
117
+ /* The rest of these check to see if the valid field has the appropriate
118
+ * flag set, and if it does, writes the chunk.
119
+ *
120
+ * 1.6.0: COLORSPACE support controls the writing of these chunks too, and
121
+ * the chunks will be written if the WRITE routine is there and
122
+ * information * is available in the COLORSPACE. (See
123
+ * png_colorspace_sync_info in png.c for where the valid flags get set.)
124
+ *
125
+ * Under certain circumstances the colorspace can be invalidated without
126
+ * syncing the info_struct 'valid' flags; this happens if libpng detects
127
+ * an error and calls png_error while the color space is being set, yet
128
+ * the application continues writing the PNG. So check the 'invalid'
129
+ * flag here too.
130
+ */
131
+ #ifdef PNG_GAMMA_SUPPORTED
132
+ # ifdef PNG_WRITE_gAMA_SUPPORTED
133
+ if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
134
+ (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_gAMA) != 0 &&
135
+ (info_ptr->valid & PNG_INFO_gAMA) != 0)
136
+ png_write_gAMA_fixed(png_ptr, info_ptr->colorspace.gamma);
137
+ # endif
138
+ #endif
139
+
140
+ #ifdef PNG_COLORSPACE_SUPPORTED
141
+ /* Write only one of sRGB or an ICC profile. If a profile was supplied
142
+ * and it matches one of the known sRGB ones issue a warning.
143
+ */
144
+ # ifdef PNG_WRITE_iCCP_SUPPORTED
145
+ if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
146
+ (info_ptr->valid & PNG_INFO_iCCP) != 0)
147
+ {
148
+ # ifdef PNG_WRITE_sRGB_SUPPORTED
149
+ if ((info_ptr->valid & PNG_INFO_sRGB) != 0)
150
+ png_app_warning(png_ptr,
151
+ "profile matches sRGB but writing iCCP instead");
152
+ # endif
153
+
154
+ png_write_iCCP(png_ptr, info_ptr->iccp_name,
155
+ info_ptr->iccp_profile);
156
+ }
157
+ # ifdef PNG_WRITE_sRGB_SUPPORTED
158
+ else
159
+ # endif
160
+ # endif
161
+
162
+ # ifdef PNG_WRITE_sRGB_SUPPORTED
163
+ if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
164
+ (info_ptr->valid & PNG_INFO_sRGB) != 0)
165
+ png_write_sRGB(png_ptr, info_ptr->colorspace.rendering_intent);
166
+ # endif /* WRITE_sRGB */
167
+ #endif /* COLORSPACE */
168
+
169
+ #ifdef PNG_WRITE_sBIT_SUPPORTED
170
+ if ((info_ptr->valid & PNG_INFO_sBIT) != 0)
171
+ png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
172
+ #endif
173
+
174
+ #ifdef PNG_COLORSPACE_SUPPORTED
175
+ # ifdef PNG_WRITE_cHRM_SUPPORTED
176
+ if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
177
+ (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) != 0 &&
178
+ (info_ptr->valid & PNG_INFO_cHRM) != 0)
179
+ png_write_cHRM_fixed(png_ptr, &info_ptr->colorspace.end_points_xy);
180
+ # endif
181
+ #endif
182
+
183
+ #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
184
+ write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR);
185
+ #endif
186
+
187
+ png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE;
188
+ }
189
+ }
190
+
191
+ void PNGAPI
192
+ png_write_info(png_structrp png_ptr, png_const_inforp info_ptr)
193
+ {
194
+ #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
195
+ int i;
196
+ #endif
197
+
198
+ png_debug(1, "in png_write_info");
199
+
200
+ if (png_ptr == NULL || info_ptr == NULL)
201
+ return;
202
+
203
+ png_write_info_before_PLTE(png_ptr, info_ptr);
204
+
205
+ if ((info_ptr->valid & PNG_INFO_PLTE) != 0)
206
+ png_write_PLTE(png_ptr, info_ptr->palette,
207
+ (png_uint_32)info_ptr->num_palette);
208
+
209
+ else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
210
+ png_error(png_ptr, "Valid palette required for paletted images");
211
+
212
+ #ifdef PNG_WRITE_tRNS_SUPPORTED
213
+ if ((info_ptr->valid & PNG_INFO_tRNS) !=0)
214
+ {
215
+ #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
216
+ /* Invert the alpha channel (in tRNS) */
217
+ if ((png_ptr->transformations & PNG_INVERT_ALPHA) != 0 &&
218
+ info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
219
+ {
220
+ int j, jend;
221
+
222
+ jend = info_ptr->num_trans;
223
+ if (jend > PNG_MAX_PALETTE_LENGTH)
224
+ jend = PNG_MAX_PALETTE_LENGTH;
225
+
226
+ for (j = 0; j<jend; ++j)
227
+ info_ptr->trans_alpha[j] =
228
+ (png_byte)(255 - info_ptr->trans_alpha[j]);
229
+ }
230
+ #endif
231
+ png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color),
232
+ info_ptr->num_trans, info_ptr->color_type);
233
+ }
234
+ #endif
235
+ #ifdef PNG_WRITE_bKGD_SUPPORTED
236
+ if ((info_ptr->valid & PNG_INFO_bKGD) != 0)
237
+ png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);
238
+ #endif
239
+
240
+ #ifdef PNG_WRITE_eXIf_SUPPORTED
241
+ if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
242
+ png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
243
+ #endif
244
+
245
+ #ifdef PNG_WRITE_hIST_SUPPORTED
246
+ if ((info_ptr->valid & PNG_INFO_hIST) != 0)
247
+ png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);
248
+ #endif
249
+
250
+ #ifdef PNG_WRITE_oFFs_SUPPORTED
251
+ if ((info_ptr->valid & PNG_INFO_oFFs) != 0)
252
+ png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset,
253
+ info_ptr->offset_unit_type);
254
+ #endif
255
+
256
+ #ifdef PNG_WRITE_pCAL_SUPPORTED
257
+ if ((info_ptr->valid & PNG_INFO_pCAL) != 0)
258
+ png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0,
259
+ info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
260
+ info_ptr->pcal_units, info_ptr->pcal_params);
261
+ #endif
262
+
263
+ #ifdef PNG_WRITE_sCAL_SUPPORTED
264
+ if ((info_ptr->valid & PNG_INFO_sCAL) != 0)
265
+ png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
266
+ info_ptr->scal_s_width, info_ptr->scal_s_height);
267
+ #endif /* sCAL */
268
+
269
+ #ifdef PNG_WRITE_pHYs_SUPPORTED
270
+ if ((info_ptr->valid & PNG_INFO_pHYs) != 0)
271
+ png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,
272
+ info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);
273
+ #endif /* pHYs */
274
+
275
+ #ifdef PNG_WRITE_tIME_SUPPORTED
276
+ if ((info_ptr->valid & PNG_INFO_tIME) != 0)
277
+ {
278
+ png_write_tIME(png_ptr, &(info_ptr->mod_time));
279
+ png_ptr->mode |= PNG_WROTE_tIME;
280
+ }
281
+ #endif /* tIME */
282
+
283
+ #ifdef PNG_WRITE_sPLT_SUPPORTED
284
+ if ((info_ptr->valid & PNG_INFO_sPLT) != 0)
285
+ for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
286
+ png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);
287
+ #endif /* sPLT */
288
+
289
+ #ifdef PNG_WRITE_TEXT_SUPPORTED
290
+ /* Check to see if we need to write text chunks */
291
+ for (i = 0; i < info_ptr->num_text; i++)
292
+ {
293
+ png_debug2(2, "Writing header text chunk %d, type %d", i,
294
+ info_ptr->text[i].compression);
295
+ /* An internationalized chunk? */
296
+ if (info_ptr->text[i].compression > 0)
297
+ {
298
+ #ifdef PNG_WRITE_iTXt_SUPPORTED
299
+ /* Write international chunk */
300
+ png_write_iTXt(png_ptr,
301
+ info_ptr->text[i].compression,
302
+ info_ptr->text[i].key,
303
+ info_ptr->text[i].lang,
304
+ info_ptr->text[i].lang_key,
305
+ info_ptr->text[i].text);
306
+ /* Mark this chunk as written */
307
+ if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
308
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
309
+ else
310
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
311
+ #else
312
+ png_warning(png_ptr, "Unable to write international text");
313
+ #endif
314
+ }
315
+
316
+ /* If we want a compressed text chunk */
317
+ else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt)
318
+ {
319
+ #ifdef PNG_WRITE_zTXt_SUPPORTED
320
+ /* Write compressed chunk */
321
+ png_write_zTXt(png_ptr, info_ptr->text[i].key,
322
+ info_ptr->text[i].text, info_ptr->text[i].compression);
323
+ /* Mark this chunk as written */
324
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
325
+ #else
326
+ png_warning(png_ptr, "Unable to write compressed text");
327
+ #endif
328
+ }
329
+
330
+ else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
331
+ {
332
+ #ifdef PNG_WRITE_tEXt_SUPPORTED
333
+ /* Write uncompressed chunk */
334
+ png_write_tEXt(png_ptr, info_ptr->text[i].key,
335
+ info_ptr->text[i].text,
336
+ 0);
337
+ /* Mark this chunk as written */
338
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
339
+ #else
340
+ /* Can't get here */
341
+ png_warning(png_ptr, "Unable to write uncompressed text");
342
+ #endif
343
+ }
344
+ }
345
+ #endif /* tEXt */
346
+
347
+ #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
348
+ write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_PLTE);
349
+ #endif
350
+ }
351
+
352
+ /* Writes the end of the PNG file. If you don't want to write comments or
353
+ * time information, you can pass NULL for info. If you already wrote these
354
+ * in png_write_info(), do not write them again here. If you have long
355
+ * comments, I suggest writing them here, and compressing them.
356
+ */
357
+ void PNGAPI
358
+ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
359
+ {
360
+ png_debug(1, "in png_write_end");
361
+
362
+ if (png_ptr == NULL)
363
+ return;
364
+
365
+ if ((png_ptr->mode & PNG_HAVE_IDAT) == 0)
366
+ png_error(png_ptr, "No IDATs written into file");
367
+
368
+ #ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
369
+ if (png_ptr->num_palette_max > png_ptr->num_palette)
370
+ png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
371
+ #endif
372
+
373
+ /* See if user wants us to write information chunks */
374
+ if (info_ptr != NULL)
375
+ {
376
+ #ifdef PNG_WRITE_TEXT_SUPPORTED
377
+ int i; /* local index variable */
378
+ #endif
379
+ #ifdef PNG_WRITE_tIME_SUPPORTED
380
+ /* Check to see if user has supplied a time chunk */
381
+ if ((info_ptr->valid & PNG_INFO_tIME) != 0 &&
382
+ (png_ptr->mode & PNG_WROTE_tIME) == 0)
383
+ png_write_tIME(png_ptr, &(info_ptr->mod_time));
384
+
385
+ #endif
386
+ #ifdef PNG_WRITE_TEXT_SUPPORTED
387
+ /* Loop through comment chunks */
388
+ for (i = 0; i < info_ptr->num_text; i++)
389
+ {
390
+ png_debug2(2, "Writing trailer text chunk %d, type %d", i,
391
+ info_ptr->text[i].compression);
392
+ /* An internationalized chunk? */
393
+ if (info_ptr->text[i].compression > 0)
394
+ {
395
+ #ifdef PNG_WRITE_iTXt_SUPPORTED
396
+ /* Write international chunk */
397
+ png_write_iTXt(png_ptr,
398
+ info_ptr->text[i].compression,
399
+ info_ptr->text[i].key,
400
+ info_ptr->text[i].lang,
401
+ info_ptr->text[i].lang_key,
402
+ info_ptr->text[i].text);
403
+ /* Mark this chunk as written */
404
+ if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
405
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
406
+ else
407
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
408
+ #else
409
+ png_warning(png_ptr, "Unable to write international text");
410
+ #endif
411
+ }
412
+
413
+ else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
414
+ {
415
+ #ifdef PNG_WRITE_zTXt_SUPPORTED
416
+ /* Write compressed chunk */
417
+ png_write_zTXt(png_ptr, info_ptr->text[i].key,
418
+ info_ptr->text[i].text, info_ptr->text[i].compression);
419
+ /* Mark this chunk as written */
420
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
421
+ #else
422
+ png_warning(png_ptr, "Unable to write compressed text");
423
+ #endif
424
+ }
425
+
426
+ else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
427
+ {
428
+ #ifdef PNG_WRITE_tEXt_SUPPORTED
429
+ /* Write uncompressed chunk */
430
+ png_write_tEXt(png_ptr, info_ptr->text[i].key,
431
+ info_ptr->text[i].text, 0);
432
+ /* Mark this chunk as written */
433
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
434
+ #else
435
+ png_warning(png_ptr, "Unable to write uncompressed text");
436
+ #endif
437
+ }
438
+ }
439
+ #endif
440
+
441
+ #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
442
+ write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT);
443
+ #endif
444
+ }
445
+
446
+ png_ptr->mode |= PNG_AFTER_IDAT;
447
+
448
+ /* Write end of PNG file */
449
+ png_write_IEND(png_ptr);
450
+
451
+ /* This flush, added in libpng-1.0.8, removed from libpng-1.0.9beta03,
452
+ * and restored again in libpng-1.2.30, may cause some applications that
453
+ * do not set png_ptr->output_flush_fn to crash. If your application
454
+ * experiences a problem, please try building libpng with
455
+ * PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to
456
+ * png-mng-implement at lists.sf.net .
457
+ */
458
+ #ifdef PNG_WRITE_FLUSH_SUPPORTED
459
+ # ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
460
+ png_flush(png_ptr);
461
+ # endif
462
+ #endif
463
+ }
464
+
465
+ #ifdef PNG_CONVERT_tIME_SUPPORTED
466
+ void PNGAPI
467
+ png_convert_from_struct_tm(png_timep ptime, const struct tm * ttime)
468
+ {
469
+ png_debug(1, "in png_convert_from_struct_tm");
470
+
471
+ ptime->year = (png_uint_16)(1900 + ttime->tm_year);
472
+ ptime->month = (png_byte)(ttime->tm_mon + 1);
473
+ ptime->day = (png_byte)ttime->tm_mday;
474
+ ptime->hour = (png_byte)ttime->tm_hour;
475
+ ptime->minute = (png_byte)ttime->tm_min;
476
+ ptime->second = (png_byte)ttime->tm_sec;
477
+ }
478
+
479
+ void PNGAPI
480
+ png_convert_from_time_t(png_timep ptime, time_t ttime)
481
+ {
482
+ struct tm *tbuf;
483
+
484
+ png_debug(1, "in png_convert_from_time_t");
485
+
486
+ tbuf = gmtime(&ttime);
487
+ png_convert_from_struct_tm(ptime, tbuf);
488
+ }
489
+ #endif
490
+
491
+ /* Initialize png_ptr structure, and allocate any memory needed */
492
+ PNG_FUNCTION(png_structp,PNGAPI
493
+ png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
494
+ png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED)
495
+ {
496
+ #ifndef PNG_USER_MEM_SUPPORTED
497
+ png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
498
+ error_fn, warn_fn, NULL, NULL, NULL);
499
+ #else
500
+ return png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
501
+ warn_fn, NULL, NULL, NULL);
502
+ }
503
+
504
+ /* Alternate initialize png_ptr structure, and allocate any memory needed */
505
+ PNG_FUNCTION(png_structp,PNGAPI
506
+ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
507
+ png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
508
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED)
509
+ {
510
+ png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
511
+ error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
512
+ #endif /* USER_MEM */
513
+ if (png_ptr != NULL)
514
+ {
515
+ /* Set the zlib control values to defaults; they can be overridden by the
516
+ * application after the struct has been created.
517
+ */
518
+ png_ptr->zbuffer_size = PNG_ZBUF_SIZE;
519
+
520
+ /* The 'zlib_strategy' setting is irrelevant because png_default_claim in
521
+ * pngwutil.c defaults it according to whether or not filters will be
522
+ * used, and ignores this setting.
523
+ */
524
+ png_ptr->zlib_strategy = PNG_Z_DEFAULT_STRATEGY;
525
+ png_ptr->zlib_level = PNG_Z_DEFAULT_COMPRESSION;
526
+ png_ptr->zlib_mem_level = 8;
527
+ png_ptr->zlib_window_bits = 15;
528
+ png_ptr->zlib_method = 8;
529
+
530
+ #ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
531
+ png_ptr->zlib_text_strategy = PNG_TEXT_Z_DEFAULT_STRATEGY;
532
+ png_ptr->zlib_text_level = PNG_TEXT_Z_DEFAULT_COMPRESSION;
533
+ png_ptr->zlib_text_mem_level = 8;
534
+ png_ptr->zlib_text_window_bits = 15;
535
+ png_ptr->zlib_text_method = 8;
536
+ #endif /* WRITE_COMPRESSED_TEXT */
537
+
538
+ /* This is a highly dubious configuration option; by default it is off,
539
+ * but it may be appropriate for private builds that are testing
540
+ * extensions not conformant to the current specification, or of
541
+ * applications that must not fail to write at all costs!
542
+ */
543
+ #ifdef PNG_BENIGN_WRITE_ERRORS_SUPPORTED
544
+ /* In stable builds only warn if an application error can be completely
545
+ * handled.
546
+ */
547
+ png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
548
+ #endif
549
+
550
+ /* App warnings are warnings in release (or release candidate) builds but
551
+ * are errors during development.
552
+ */
553
+ #if PNG_RELEASE_BUILD
554
+ png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN;
555
+ #endif
556
+
557
+ /* TODO: delay this, it can be done in png_init_io() (if the app doesn't
558
+ * do it itself) avoiding setting the default function if it is not
559
+ * required.
560
+ */
561
+ png_set_write_fn(png_ptr, NULL, NULL, NULL);
562
+ }
563
+
564
+ return png_ptr;
565
+ }
566
+
567
+
568
+ /* Write a few rows of image data. If the image is interlaced,
569
+ * either you will have to write the 7 sub images, or, if you
570
+ * have called png_set_interlace_handling(), you will have to
571
+ * "write" the image seven times.
572
+ */
573
+ void PNGAPI
574
+ png_write_rows(png_structrp png_ptr, png_bytepp row,
575
+ png_uint_32 num_rows)
576
+ {
577
+ png_uint_32 i; /* row counter */
578
+ png_bytepp rp; /* row pointer */
579
+
580
+ png_debug(1, "in png_write_rows");
581
+
582
+ if (png_ptr == NULL)
583
+ return;
584
+
585
+ /* Loop through the rows */
586
+ for (i = 0, rp = row; i < num_rows; i++, rp++)
587
+ {
588
+ png_write_row(png_ptr, *rp);
589
+ }
590
+ }
591
+
592
+ /* Write the image. You only need to call this function once, even
593
+ * if you are writing an interlaced image.
594
+ */
595
+ void PNGAPI
596
+ png_write_image(png_structrp png_ptr, png_bytepp image)
597
+ {
598
+ png_uint_32 i; /* row index */
599
+ int pass, num_pass; /* pass variables */
600
+ png_bytepp rp; /* points to current row */
601
+
602
+ if (png_ptr == NULL)
603
+ return;
604
+
605
+ png_debug(1, "in png_write_image");
606
+
607
+ #ifdef PNG_WRITE_INTERLACING_SUPPORTED
608
+ /* Initialize interlace handling. If image is not interlaced,
609
+ * this will set pass to 1
610
+ */
611
+ num_pass = png_set_interlace_handling(png_ptr);
612
+ #else
613
+ num_pass = 1;
614
+ #endif
615
+ /* Loop through passes */
616
+ for (pass = 0; pass < num_pass; pass++)
617
+ {
618
+ /* Loop through image */
619
+ for (i = 0, rp = image; i < png_ptr->height; i++, rp++)
620
+ {
621
+ png_write_row(png_ptr, *rp);
622
+ }
623
+ }
624
+ }
625
+
626
+ #ifdef PNG_MNG_FEATURES_SUPPORTED
627
+ /* Performs intrapixel differencing */
628
+ static void
629
+ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
630
+ {
631
+ png_debug(1, "in png_do_write_intrapixel");
632
+
633
+ if ((row_info->color_type & PNG_COLOR_MASK_COLOR) != 0)
634
+ {
635
+ int bytes_per_pixel;
636
+ png_uint_32 row_width = row_info->width;
637
+ if (row_info->bit_depth == 8)
638
+ {
639
+ png_bytep rp;
640
+ png_uint_32 i;
641
+
642
+ if (row_info->color_type == PNG_COLOR_TYPE_RGB)
643
+ bytes_per_pixel = 3;
644
+
645
+ else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
646
+ bytes_per_pixel = 4;
647
+
648
+ else
649
+ return;
650
+
651
+ for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
652
+ {
653
+ *(rp) = (png_byte)(*rp - *(rp + 1));
654
+ *(rp + 2) = (png_byte)(*(rp + 2) - *(rp + 1));
655
+ }
656
+ }
657
+
658
+ #ifdef PNG_WRITE_16BIT_SUPPORTED
659
+ else if (row_info->bit_depth == 16)
660
+ {
661
+ png_bytep rp;
662
+ png_uint_32 i;
663
+
664
+ if (row_info->color_type == PNG_COLOR_TYPE_RGB)
665
+ bytes_per_pixel = 6;
666
+
667
+ else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
668
+ bytes_per_pixel = 8;
669
+
670
+ else
671
+ return;
672
+
673
+ for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
674
+ {
675
+ png_uint_32 s0 = (png_uint_32)(*(rp ) << 8) | *(rp + 1);
676
+ png_uint_32 s1 = (png_uint_32)(*(rp + 2) << 8) | *(rp + 3);
677
+ png_uint_32 s2 = (png_uint_32)(*(rp + 4) << 8) | *(rp + 5);
678
+ png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
679
+ png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
680
+ *(rp ) = (png_byte)(red >> 8);
681
+ *(rp + 1) = (png_byte)red;
682
+ *(rp + 4) = (png_byte)(blue >> 8);
683
+ *(rp + 5) = (png_byte)blue;
684
+ }
685
+ }
686
+ #endif /* WRITE_16BIT */
687
+ }
688
+ }
689
+ #endif /* MNG_FEATURES */
690
+
691
+ /* Called by user to write a row of image data */
692
+ void PNGAPI
693
+ png_write_row(png_structrp png_ptr, png_const_bytep row)
694
+ {
695
+ /* 1.5.6: moved from png_struct to be a local structure: */
696
+ png_row_info row_info;
697
+
698
+ if (png_ptr == NULL)
699
+ return;
700
+
701
+ png_debug2(1, "in png_write_row (row %u, pass %d)",
702
+ png_ptr->row_number, png_ptr->pass);
703
+
704
+ /* Initialize transformations and other stuff if first time */
705
+ if (png_ptr->row_number == 0 && png_ptr->pass == 0)
706
+ {
707
+ /* Make sure we wrote the header info */
708
+ if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0)
709
+ png_error(png_ptr,
710
+ "png_write_info was never called before png_write_row");
711
+
712
+ /* Check for transforms that have been set but were defined out */
713
+ #if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
714
+ if ((png_ptr->transformations & PNG_INVERT_MONO) != 0)
715
+ png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined");
716
+ #endif
717
+
718
+ #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
719
+ if ((png_ptr->transformations & PNG_FILLER) != 0)
720
+ png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined");
721
+ #endif
722
+ #if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
723
+ defined(PNG_READ_PACKSWAP_SUPPORTED)
724
+ if ((png_ptr->transformations & PNG_PACKSWAP) != 0)
725
+ png_warning(png_ptr,
726
+ "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
727
+ #endif
728
+
729
+ #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
730
+ if ((png_ptr->transformations & PNG_PACK) != 0)
731
+ png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined");
732
+ #endif
733
+
734
+ #if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)
735
+ if ((png_ptr->transformations & PNG_SHIFT) != 0)
736
+ png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined");
737
+ #endif
738
+
739
+ #if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)
740
+ if ((png_ptr->transformations & PNG_BGR) != 0)
741
+ png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined");
742
+ #endif
743
+
744
+ #if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)
745
+ if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0)
746
+ png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined");
747
+ #endif
748
+
749
+ png_write_start_row(png_ptr);
750
+ }
751
+
752
+ #ifdef PNG_WRITE_INTERLACING_SUPPORTED
753
+ /* If interlaced and not interested in row, return */
754
+ if (png_ptr->interlaced != 0 &&
755
+ (png_ptr->transformations & PNG_INTERLACE) != 0)
756
+ {
757
+ switch (png_ptr->pass)
758
+ {
759
+ case 0:
760
+ if ((png_ptr->row_number & 0x07) != 0)
761
+ {
762
+ png_write_finish_row(png_ptr);
763
+ return;
764
+ }
765
+ break;
766
+
767
+ case 1:
768
+ if ((png_ptr->row_number & 0x07) != 0 || png_ptr->width < 5)
769
+ {
770
+ png_write_finish_row(png_ptr);
771
+ return;
772
+ }
773
+ break;
774
+
775
+ case 2:
776
+ if ((png_ptr->row_number & 0x07) != 4)
777
+ {
778
+ png_write_finish_row(png_ptr);
779
+ return;
780
+ }
781
+ break;
782
+
783
+ case 3:
784
+ if ((png_ptr->row_number & 0x03) != 0 || png_ptr->width < 3)
785
+ {
786
+ png_write_finish_row(png_ptr);
787
+ return;
788
+ }
789
+ break;
790
+
791
+ case 4:
792
+ if ((png_ptr->row_number & 0x03) != 2)
793
+ {
794
+ png_write_finish_row(png_ptr);
795
+ return;
796
+ }
797
+ break;
798
+
799
+ case 5:
800
+ if ((png_ptr->row_number & 0x01) != 0 || png_ptr->width < 2)
801
+ {
802
+ png_write_finish_row(png_ptr);
803
+ return;
804
+ }
805
+ break;
806
+
807
+ case 6:
808
+ if ((png_ptr->row_number & 0x01) == 0)
809
+ {
810
+ png_write_finish_row(png_ptr);
811
+ return;
812
+ }
813
+ break;
814
+
815
+ default: /* error: ignore it */
816
+ break;
817
+ }
818
+ }
819
+ #endif
820
+
821
+ /* Set up row info for transformations */
822
+ row_info.color_type = png_ptr->color_type;
823
+ row_info.width = png_ptr->usr_width;
824
+ row_info.channels = png_ptr->usr_channels;
825
+ row_info.bit_depth = png_ptr->usr_bit_depth;
826
+ row_info.pixel_depth = (png_byte)(row_info.bit_depth * row_info.channels);
827
+ row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width);
828
+
829
+ png_debug1(3, "row_info->color_type = %d", row_info.color_type);
830
+ png_debug1(3, "row_info->width = %u", row_info.width);
831
+ png_debug1(3, "row_info->channels = %d", row_info.channels);
832
+ png_debug1(3, "row_info->bit_depth = %d", row_info.bit_depth);
833
+ png_debug1(3, "row_info->pixel_depth = %d", row_info.pixel_depth);
834
+ png_debug1(3, "row_info->rowbytes = %lu", (unsigned long)row_info.rowbytes);
835
+
836
+ /* Copy user's row into buffer, leaving room for filter byte. */
837
+ memcpy(png_ptr->row_buf + 1, row, row_info.rowbytes);
838
+
839
+ #ifdef PNG_WRITE_INTERLACING_SUPPORTED
840
+ /* Handle interlacing */
841
+ if (png_ptr->interlaced && png_ptr->pass < 6 &&
842
+ (png_ptr->transformations & PNG_INTERLACE) != 0)
843
+ {
844
+ png_do_write_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass);
845
+ /* This should always get caught above, but still ... */
846
+ if (row_info.width == 0)
847
+ {
848
+ png_write_finish_row(png_ptr);
849
+ return;
850
+ }
851
+ }
852
+ #endif
853
+
854
+ #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
855
+ /* Handle other transformations */
856
+ if (png_ptr->transformations != 0)
857
+ png_do_write_transformations(png_ptr, &row_info);
858
+ #endif
859
+
860
+ /* At this point the row_info pixel depth must match the 'transformed' depth,
861
+ * which is also the output depth.
862
+ */
863
+ if (row_info.pixel_depth != png_ptr->pixel_depth ||
864
+ row_info.pixel_depth != png_ptr->transformed_pixel_depth)
865
+ png_error(png_ptr, "internal write transform logic error");
866
+
867
+ #ifdef PNG_MNG_FEATURES_SUPPORTED
868
+ /* Write filter_method 64 (intrapixel differencing) only if
869
+ * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
870
+ * 2. Libpng did not write a PNG signature (this filter_method is only
871
+ * used in PNG datastreams that are embedded in MNG datastreams) and
872
+ * 3. The application called png_permit_mng_features with a mask that
873
+ * included PNG_FLAG_MNG_FILTER_64 and
874
+ * 4. The filter_method is 64 and
875
+ * 5. The color_type is RGB or RGBA
876
+ */
877
+ if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 &&
878
+ (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
879
+ {
880
+ /* Intrapixel differencing */
881
+ png_do_write_intrapixel(&row_info, png_ptr->row_buf + 1);
882
+ }
883
+ #endif
884
+
885
+ /* Added at libpng-1.5.10 */
886
+ #ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
887
+ /* Check for out-of-range palette index */
888
+ if (row_info.color_type == PNG_COLOR_TYPE_PALETTE &&
889
+ png_ptr->num_palette_max >= 0)
890
+ png_do_check_palette_indexes(png_ptr, &row_info);
891
+ #endif
892
+
893
+ /* Find a filter if necessary, filter the row and write it out. */
894
+ png_write_find_filter(png_ptr, &row_info);
895
+
896
+ if (png_ptr->write_row_fn != NULL)
897
+ (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
898
+ }
899
+
900
+ #ifdef PNG_WRITE_FLUSH_SUPPORTED
901
+ /* Set the automatic flush interval or 0 to turn flushing off */
902
+ void PNGAPI
903
+ png_set_flush(png_structrp png_ptr, int nrows)
904
+ {
905
+ png_debug(1, "in png_set_flush");
906
+
907
+ if (png_ptr == NULL)
908
+ return;
909
+
910
+ png_ptr->flush_dist = (nrows < 0 ? 0 : (png_uint_32)nrows);
911
+ }
912
+
913
+ /* Flush the current output buffers now */
914
+ void PNGAPI
915
+ png_write_flush(png_structrp png_ptr)
916
+ {
917
+ png_debug(1, "in png_write_flush");
918
+
919
+ if (png_ptr == NULL)
920
+ return;
921
+
922
+ /* We have already written out all of the data */
923
+ if (png_ptr->row_number >= png_ptr->num_rows)
924
+ return;
925
+
926
+ png_compress_IDAT(png_ptr, NULL, 0, Z_SYNC_FLUSH);
927
+ png_ptr->flush_rows = 0;
928
+ png_flush(png_ptr);
929
+ }
930
+ #endif /* WRITE_FLUSH */
931
+
932
+ /* Free any memory used in png_ptr struct without freeing the struct itself. */
933
+ static void
934
+ png_write_destroy(png_structrp png_ptr)
935
+ {
936
+ png_debug(1, "in png_write_destroy");
937
+
938
+ /* Free any memory zlib uses */
939
+ if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0)
940
+ deflateEnd(&png_ptr->zstream);
941
+
942
+ /* Free our memory. png_free checks NULL for us. */
943
+ png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list);
944
+ png_free(png_ptr, png_ptr->row_buf);
945
+ png_ptr->row_buf = NULL;
946
+ #ifdef PNG_WRITE_FILTER_SUPPORTED
947
+ png_free(png_ptr, png_ptr->prev_row);
948
+ png_free(png_ptr, png_ptr->try_row);
949
+ png_free(png_ptr, png_ptr->tst_row);
950
+ png_ptr->prev_row = NULL;
951
+ png_ptr->try_row = NULL;
952
+ png_ptr->tst_row = NULL;
953
+ #endif
954
+
955
+ #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
956
+ png_free(png_ptr, png_ptr->chunk_list);
957
+ png_ptr->chunk_list = NULL;
958
+ #endif
959
+
960
+ /* The error handling and memory handling information is left intact at this
961
+ * point: the jmp_buf may still have to be freed. See png_destroy_png_struct
962
+ * for how this happens.
963
+ */
964
+ }
965
+
966
+ /* Free all memory used by the write.
967
+ * In libpng 1.6.0 this API changed quietly to no longer accept a NULL value for
968
+ * *png_ptr_ptr. Prior to 1.6.0 it would accept such a value and it would free
969
+ * the passed in info_structs but it would quietly fail to free any of the data
970
+ * inside them. In 1.6.0 it quietly does nothing (it has to be quiet because it
971
+ * has no png_ptr.)
972
+ */
973
+ void PNGAPI
974
+ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
975
+ {
976
+ png_debug(1, "in png_destroy_write_struct");
977
+
978
+ if (png_ptr_ptr != NULL)
979
+ {
980
+ png_structrp png_ptr = *png_ptr_ptr;
981
+
982
+ if (png_ptr != NULL) /* added in libpng 1.6.0 */
983
+ {
984
+ png_destroy_info_struct(png_ptr, info_ptr_ptr);
985
+
986
+ *png_ptr_ptr = NULL;
987
+ png_write_destroy(png_ptr);
988
+ png_destroy_png_struct(png_ptr);
989
+ }
990
+ }
991
+ }
992
+
993
+ /* Allow the application to select one or more row filters to use. */
994
+ void PNGAPI
995
+ png_set_filter(png_structrp png_ptr, int method, int filters)
996
+ {
997
+ png_debug(1, "in png_set_filter");
998
+
999
+ if (png_ptr == NULL)
1000
+ return;
1001
+
1002
+ #ifdef PNG_MNG_FEATURES_SUPPORTED
1003
+ if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 &&
1004
+ (method == PNG_INTRAPIXEL_DIFFERENCING))
1005
+ method = PNG_FILTER_TYPE_BASE;
1006
+
1007
+ #endif
1008
+ if (method == PNG_FILTER_TYPE_BASE)
1009
+ {
1010
+ switch (filters & (PNG_ALL_FILTERS | 0x07))
1011
+ {
1012
+ #ifdef PNG_WRITE_FILTER_SUPPORTED
1013
+ case 5:
1014
+ case 6:
1015
+ case 7: png_app_error(png_ptr, "Unknown row filter for method 0");
1016
+ #endif /* WRITE_FILTER */
1017
+ /* FALLTHROUGH */
1018
+ case PNG_FILTER_VALUE_NONE:
1019
+ png_ptr->do_filter = PNG_FILTER_NONE; break;
1020
+
1021
+ #ifdef PNG_WRITE_FILTER_SUPPORTED
1022
+ case PNG_FILTER_VALUE_SUB:
1023
+ png_ptr->do_filter = PNG_FILTER_SUB; break;
1024
+
1025
+ case PNG_FILTER_VALUE_UP:
1026
+ png_ptr->do_filter = PNG_FILTER_UP; break;
1027
+
1028
+ case PNG_FILTER_VALUE_AVG:
1029
+ png_ptr->do_filter = PNG_FILTER_AVG; break;
1030
+
1031
+ case PNG_FILTER_VALUE_PAETH:
1032
+ png_ptr->do_filter = PNG_FILTER_PAETH; break;
1033
+
1034
+ default:
1035
+ png_ptr->do_filter = (png_byte)filters; break;
1036
+ #else
1037
+ default:
1038
+ png_app_error(png_ptr, "Unknown row filter for method 0");
1039
+ #endif /* WRITE_FILTER */
1040
+ }
1041
+
1042
+ #ifdef PNG_WRITE_FILTER_SUPPORTED
1043
+ /* If we have allocated the row_buf, this means we have already started
1044
+ * with the image and we should have allocated all of the filter buffers
1045
+ * that have been selected. If prev_row isn't already allocated, then
1046
+ * it is too late to start using the filters that need it, since we
1047
+ * will be missing the data in the previous row. If an application
1048
+ * wants to start and stop using particular filters during compression,
1049
+ * it should start out with all of the filters, and then remove them
1050
+ * or add them back after the start of compression.
1051
+ *
1052
+ * NOTE: this is a nasty constraint on the code, because it means that the
1053
+ * prev_row buffer must be maintained even if there are currently no
1054
+ * 'prev_row' requiring filters active.
1055
+ */
1056
+ if (png_ptr->row_buf != NULL)
1057
+ {
1058
+ int num_filters;
1059
+ png_alloc_size_t buf_size;
1060
+
1061
+ /* Repeat the checks in png_write_start_row; 1 pixel high or wide
1062
+ * images cannot benefit from certain filters. If this isn't done here
1063
+ * the check below will fire on 1 pixel high images.
1064
+ */
1065
+ if (png_ptr->height == 1)
1066
+ filters &= ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH);
1067
+
1068
+ if (png_ptr->width == 1)
1069
+ filters &= ~(PNG_FILTER_SUB|PNG_FILTER_AVG|PNG_FILTER_PAETH);
1070
+
1071
+ if ((filters & (PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH)) != 0
1072
+ && png_ptr->prev_row == NULL)
1073
+ {
1074
+ /* This is the error case, however it is benign - the previous row
1075
+ * is not available so the filter can't be used. Just warn here.
1076
+ */
1077
+ png_app_warning(png_ptr,
1078
+ "png_set_filter: UP/AVG/PAETH cannot be added after start");
1079
+ filters &= ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH);
1080
+ }
1081
+
1082
+ num_filters = 0;
1083
+
1084
+ if (filters & PNG_FILTER_SUB)
1085
+ num_filters++;
1086
+
1087
+ if (filters & PNG_FILTER_UP)
1088
+ num_filters++;
1089
+
1090
+ if (filters & PNG_FILTER_AVG)
1091
+ num_filters++;
1092
+
1093
+ if (filters & PNG_FILTER_PAETH)
1094
+ num_filters++;
1095
+
1096
+ /* Allocate needed row buffers if they have not already been
1097
+ * allocated.
1098
+ */
1099
+ buf_size = PNG_ROWBYTES(png_ptr->usr_channels * png_ptr->usr_bit_depth,
1100
+ png_ptr->width) + 1;
1101
+
1102
+ if (png_ptr->try_row == NULL)
1103
+ png_ptr->try_row = png_voidcast(png_bytep,
1104
+ png_malloc(png_ptr, buf_size));
1105
+
1106
+ if (num_filters > 1)
1107
+ {
1108
+ if (png_ptr->tst_row == NULL)
1109
+ png_ptr->tst_row = png_voidcast(png_bytep,
1110
+ png_malloc(png_ptr, buf_size));
1111
+ }
1112
+ }
1113
+ png_ptr->do_filter = (png_byte)filters;
1114
+ #endif
1115
+ }
1116
+ else
1117
+ png_error(png_ptr, "Unknown custom filter method");
1118
+ }
1119
+
1120
+ #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */
1121
+ /* Provide floating and fixed point APIs */
1122
+ #ifdef PNG_FLOATING_POINT_SUPPORTED
1123
+ void PNGAPI
1124
+ png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method,
1125
+ int num_weights, png_const_doublep filter_weights,
1126
+ png_const_doublep filter_costs)
1127
+ {
1128
+ PNG_UNUSED(png_ptr)
1129
+ PNG_UNUSED(heuristic_method)
1130
+ PNG_UNUSED(num_weights)
1131
+ PNG_UNUSED(filter_weights)
1132
+ PNG_UNUSED(filter_costs)
1133
+ }
1134
+ #endif /* FLOATING_POINT */
1135
+
1136
+ #ifdef PNG_FIXED_POINT_SUPPORTED
1137
+ void PNGAPI
1138
+ png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method,
1139
+ int num_weights, png_const_fixed_point_p filter_weights,
1140
+ png_const_fixed_point_p filter_costs)
1141
+ {
1142
+ PNG_UNUSED(png_ptr)
1143
+ PNG_UNUSED(heuristic_method)
1144
+ PNG_UNUSED(num_weights)
1145
+ PNG_UNUSED(filter_weights)
1146
+ PNG_UNUSED(filter_costs)
1147
+ }
1148
+ #endif /* FIXED_POINT */
1149
+ #endif /* WRITE_WEIGHTED_FILTER */
1150
+
1151
+ #ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
1152
+ void PNGAPI
1153
+ png_set_compression_level(png_structrp png_ptr, int level)
1154
+ {
1155
+ png_debug(1, "in png_set_compression_level");
1156
+
1157
+ if (png_ptr == NULL)
1158
+ return;
1159
+
1160
+ png_ptr->zlib_level = level;
1161
+ }
1162
+
1163
+ void PNGAPI
1164
+ png_set_compression_mem_level(png_structrp png_ptr, int mem_level)
1165
+ {
1166
+ png_debug(1, "in png_set_compression_mem_level");
1167
+
1168
+ if (png_ptr == NULL)
1169
+ return;
1170
+
1171
+ png_ptr->zlib_mem_level = mem_level;
1172
+ }
1173
+
1174
+ void PNGAPI
1175
+ png_set_compression_strategy(png_structrp png_ptr, int strategy)
1176
+ {
1177
+ png_debug(1, "in png_set_compression_strategy");
1178
+
1179
+ if (png_ptr == NULL)
1180
+ return;
1181
+
1182
+ /* The flag setting here prevents the libpng dynamic selection of strategy.
1183
+ */
1184
+ png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
1185
+ png_ptr->zlib_strategy = strategy;
1186
+ }
1187
+
1188
+ /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1189
+ * smaller value of window_bits if it can do so safely.
1190
+ */
1191
+ void PNGAPI
1192
+ png_set_compression_window_bits(png_structrp png_ptr, int window_bits)
1193
+ {
1194
+ if (png_ptr == NULL)
1195
+ return;
1196
+
1197
+ /* Prior to 1.6.0 this would warn but then set the window_bits value. This
1198
+ * meant that negative window bits values could be selected that would cause
1199
+ * libpng to write a non-standard PNG file with raw deflate or gzip
1200
+ * compressed IDAT or ancillary chunks. Such files can be read and there is
1201
+ * no warning on read, so this seems like a very bad idea.
1202
+ */
1203
+ if (window_bits > 15)
1204
+ {
1205
+ png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
1206
+ window_bits = 15;
1207
+ }
1208
+
1209
+ else if (window_bits < 8)
1210
+ {
1211
+ png_warning(png_ptr, "Only compression windows >= 256 supported by PNG");
1212
+ window_bits = 8;
1213
+ }
1214
+
1215
+ png_ptr->zlib_window_bits = window_bits;
1216
+ }
1217
+
1218
+ void PNGAPI
1219
+ png_set_compression_method(png_structrp png_ptr, int method)
1220
+ {
1221
+ png_debug(1, "in png_set_compression_method");
1222
+
1223
+ if (png_ptr == NULL)
1224
+ return;
1225
+
1226
+ /* This would produce an invalid PNG file if it worked, but it doesn't and
1227
+ * deflate will fault it, so it is harmless to just warn here.
1228
+ */
1229
+ if (method != 8)
1230
+ png_warning(png_ptr, "Only compression method 8 is supported by PNG");
1231
+
1232
+ png_ptr->zlib_method = method;
1233
+ }
1234
+ #endif /* WRITE_CUSTOMIZE_COMPRESSION */
1235
+
1236
+ /* The following were added to libpng-1.5.4 */
1237
+ #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
1238
+ void PNGAPI
1239
+ png_set_text_compression_level(png_structrp png_ptr, int level)
1240
+ {
1241
+ png_debug(1, "in png_set_text_compression_level");
1242
+
1243
+ if (png_ptr == NULL)
1244
+ return;
1245
+
1246
+ png_ptr->zlib_text_level = level;
1247
+ }
1248
+
1249
+ void PNGAPI
1250
+ png_set_text_compression_mem_level(png_structrp png_ptr, int mem_level)
1251
+ {
1252
+ png_debug(1, "in png_set_text_compression_mem_level");
1253
+
1254
+ if (png_ptr == NULL)
1255
+ return;
1256
+
1257
+ png_ptr->zlib_text_mem_level = mem_level;
1258
+ }
1259
+
1260
+ void PNGAPI
1261
+ png_set_text_compression_strategy(png_structrp png_ptr, int strategy)
1262
+ {
1263
+ png_debug(1, "in png_set_text_compression_strategy");
1264
+
1265
+ if (png_ptr == NULL)
1266
+ return;
1267
+
1268
+ png_ptr->zlib_text_strategy = strategy;
1269
+ }
1270
+
1271
+ /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
1272
+ * smaller value of window_bits if it can do so safely.
1273
+ */
1274
+ void PNGAPI
1275
+ png_set_text_compression_window_bits(png_structrp png_ptr, int window_bits)
1276
+ {
1277
+ if (png_ptr == NULL)
1278
+ return;
1279
+
1280
+ if (window_bits > 15)
1281
+ {
1282
+ png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
1283
+ window_bits = 15;
1284
+ }
1285
+
1286
+ else if (window_bits < 8)
1287
+ {
1288
+ png_warning(png_ptr, "Only compression windows >= 256 supported by PNG");
1289
+ window_bits = 8;
1290
+ }
1291
+
1292
+ png_ptr->zlib_text_window_bits = window_bits;
1293
+ }
1294
+
1295
+ void PNGAPI
1296
+ png_set_text_compression_method(png_structrp png_ptr, int method)
1297
+ {
1298
+ png_debug(1, "in png_set_text_compression_method");
1299
+
1300
+ if (png_ptr == NULL)
1301
+ return;
1302
+
1303
+ if (method != 8)
1304
+ png_warning(png_ptr, "Only compression method 8 is supported by PNG");
1305
+
1306
+ png_ptr->zlib_text_method = method;
1307
+ }
1308
+ #endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
1309
+ /* end of API added to libpng-1.5.4 */
1310
+
1311
+ void PNGAPI
1312
+ png_set_write_status_fn(png_structrp png_ptr, png_write_status_ptr write_row_fn)
1313
+ {
1314
+ if (png_ptr == NULL)
1315
+ return;
1316
+
1317
+ png_ptr->write_row_fn = write_row_fn;
1318
+ }
1319
+
1320
+ #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
1321
+ void PNGAPI
1322
+ png_set_write_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr
1323
+ write_user_transform_fn)
1324
+ {
1325
+ png_debug(1, "in png_set_write_user_transform_fn");
1326
+
1327
+ if (png_ptr == NULL)
1328
+ return;
1329
+
1330
+ png_ptr->transformations |= PNG_USER_TRANSFORM;
1331
+ png_ptr->write_user_transform_fn = write_user_transform_fn;
1332
+ }
1333
+ #endif
1334
+
1335
+
1336
+ #ifdef PNG_INFO_IMAGE_SUPPORTED
1337
+ void PNGAPI
1338
+ png_write_png(png_structrp png_ptr, png_inforp info_ptr,
1339
+ int transforms, voidp params)
1340
+ {
1341
+ if (png_ptr == NULL || info_ptr == NULL)
1342
+ return;
1343
+
1344
+ if ((info_ptr->valid & PNG_INFO_IDAT) == 0)
1345
+ {
1346
+ png_app_error(png_ptr, "no rows for png_write_image to write");
1347
+ return;
1348
+ }
1349
+
1350
+ /* Write the file header information. */
1351
+ png_write_info(png_ptr, info_ptr);
1352
+
1353
+ /* ------ these transformations don't touch the info structure ------- */
1354
+
1355
+ /* Invert monochrome pixels */
1356
+ if ((transforms & PNG_TRANSFORM_INVERT_MONO) != 0)
1357
+ #ifdef PNG_WRITE_INVERT_SUPPORTED
1358
+ png_set_invert_mono(png_ptr);
1359
+ #else
1360
+ png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_MONO not supported");
1361
+ #endif
1362
+
1363
+ /* Shift the pixels up to a legal bit depth and fill in
1364
+ * as appropriate to correctly scale the image.
1365
+ */
1366
+ if ((transforms & PNG_TRANSFORM_SHIFT) != 0)
1367
+ #ifdef PNG_WRITE_SHIFT_SUPPORTED
1368
+ if ((info_ptr->valid & PNG_INFO_sBIT) != 0)
1369
+ png_set_shift(png_ptr, &info_ptr->sig_bit);
1370
+ #else
1371
+ png_app_error(png_ptr, "PNG_TRANSFORM_SHIFT not supported");
1372
+ #endif
1373
+
1374
+ /* Pack pixels into bytes */
1375
+ if ((transforms & PNG_TRANSFORM_PACKING) != 0)
1376
+ #ifdef PNG_WRITE_PACK_SUPPORTED
1377
+ png_set_packing(png_ptr);
1378
+ #else
1379
+ png_app_error(png_ptr, "PNG_TRANSFORM_PACKING not supported");
1380
+ #endif
1381
+
1382
+ /* Swap location of alpha bytes from ARGB to RGBA */
1383
+ if ((transforms & PNG_TRANSFORM_SWAP_ALPHA) != 0)
1384
+ #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
1385
+ png_set_swap_alpha(png_ptr);
1386
+ #else
1387
+ png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ALPHA not supported");
1388
+ #endif
1389
+
1390
+ /* Remove a filler (X) from XRGB/RGBX/AG/GA into to convert it into
1391
+ * RGB, note that the code expects the input color type to be G or RGB; no
1392
+ * alpha channel.
1393
+ */
1394
+ if ((transforms & (PNG_TRANSFORM_STRIP_FILLER_AFTER|
1395
+ PNG_TRANSFORM_STRIP_FILLER_BEFORE)) != 0)
1396
+ {
1397
+ #ifdef PNG_WRITE_FILLER_SUPPORTED
1398
+ if ((transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) != 0)
1399
+ {
1400
+ if ((transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) != 0)
1401
+ png_app_error(png_ptr,
1402
+ "PNG_TRANSFORM_STRIP_FILLER: BEFORE+AFTER not supported");
1403
+
1404
+ /* Continue if ignored - this is the pre-1.6.10 behavior */
1405
+ png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
1406
+ }
1407
+
1408
+ else if ((transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) != 0)
1409
+ png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
1410
+ #else
1411
+ png_app_error(png_ptr, "PNG_TRANSFORM_STRIP_FILLER not supported");
1412
+ #endif
1413
+ }
1414
+
1415
+ /* Flip BGR pixels to RGB */
1416
+ if ((transforms & PNG_TRANSFORM_BGR) != 0)
1417
+ #ifdef PNG_WRITE_BGR_SUPPORTED
1418
+ png_set_bgr(png_ptr);
1419
+ #else
1420
+ png_app_error(png_ptr, "PNG_TRANSFORM_BGR not supported");
1421
+ #endif
1422
+
1423
+ /* Swap bytes of 16-bit files to most significant byte first */
1424
+ if ((transforms & PNG_TRANSFORM_SWAP_ENDIAN) != 0)
1425
+ #ifdef PNG_WRITE_SWAP_SUPPORTED
1426
+ png_set_swap(png_ptr);
1427
+ #else
1428
+ png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ENDIAN not supported");
1429
+ #endif
1430
+
1431
+ /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */
1432
+ if ((transforms & PNG_TRANSFORM_PACKSWAP) != 0)
1433
+ #ifdef PNG_WRITE_PACKSWAP_SUPPORTED
1434
+ png_set_packswap(png_ptr);
1435
+ #else
1436
+ png_app_error(png_ptr, "PNG_TRANSFORM_PACKSWAP not supported");
1437
+ #endif
1438
+
1439
+ /* Invert the alpha channel from opacity to transparency */
1440
+ if ((transforms & PNG_TRANSFORM_INVERT_ALPHA) != 0)
1441
+ #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
1442
+ png_set_invert_alpha(png_ptr);
1443
+ #else
1444
+ png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_ALPHA not supported");
1445
+ #endif
1446
+
1447
+ /* ----------------------- end of transformations ------------------- */
1448
+
1449
+ /* Write the bits */
1450
+ png_write_image(png_ptr, info_ptr->row_pointers);
1451
+
1452
+ /* It is REQUIRED to call this to finish writing the rest of the file */
1453
+ png_write_end(png_ptr, info_ptr);
1454
+
1455
+ PNG_UNUSED(params)
1456
+ }
1457
+ #endif
1458
+
1459
+
1460
+ #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
1461
+ /* Initialize the write structure - general purpose utility. */
1462
+ static int
1463
+ png_image_write_init(png_imagep image)
1464
+ {
1465
+ png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, image,
1466
+ png_safe_error, png_safe_warning);
1467
+
1468
+ if (png_ptr != NULL)
1469
+ {
1470
+ png_infop info_ptr = png_create_info_struct(png_ptr);
1471
+
1472
+ if (info_ptr != NULL)
1473
+ {
1474
+ png_controlp control = png_voidcast(png_controlp,
1475
+ png_malloc_warn(png_ptr, (sizeof *control)));
1476
+
1477
+ if (control != NULL)
1478
+ {
1479
+ memset(control, 0, (sizeof *control));
1480
+
1481
+ control->png_ptr = png_ptr;
1482
+ control->info_ptr = info_ptr;
1483
+ control->for_write = 1;
1484
+
1485
+ image->opaque = control;
1486
+ return 1;
1487
+ }
1488
+
1489
+ /* Error clean up */
1490
+ png_destroy_info_struct(png_ptr, &info_ptr);
1491
+ }
1492
+
1493
+ png_destroy_write_struct(&png_ptr, NULL);
1494
+ }
1495
+
1496
+ return png_image_error(image, "png_image_write_: out of memory");
1497
+ }
1498
+
1499
+ /* Arguments to png_image_write_main: */
1500
+ typedef struct
1501
+ {
1502
+ /* Arguments: */
1503
+ png_imagep image;
1504
+ png_const_voidp buffer;
1505
+ png_int_32 row_stride;
1506
+ png_const_voidp colormap;
1507
+ int convert_to_8bit;
1508
+ /* Local variables: */
1509
+ png_const_voidp first_row;
1510
+ ptrdiff_t row_bytes;
1511
+ png_voidp local_row;
1512
+ /* Byte count for memory writing */
1513
+ png_bytep memory;
1514
+ png_alloc_size_t memory_bytes; /* not used for STDIO */
1515
+ png_alloc_size_t output_bytes; /* running total */
1516
+ } png_image_write_control;
1517
+
1518
+ /* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to
1519
+ * do any necessary byte swapping. The component order is defined by the
1520
+ * png_image format value.
1521
+ */
1522
+ static int
1523
+ png_write_image_16bit(png_voidp argument)
1524
+ {
1525
+ png_image_write_control *display = png_voidcast(png_image_write_control*,
1526
+ argument);
1527
+ png_imagep image = display->image;
1528
+ png_structrp png_ptr = image->opaque->png_ptr;
1529
+
1530
+ png_const_uint_16p input_row = png_voidcast(png_const_uint_16p,
1531
+ display->first_row);
1532
+ png_uint_16p output_row = png_voidcast(png_uint_16p, display->local_row);
1533
+ png_uint_16p row_end;
1534
+ unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
1535
+ 3 : 1;
1536
+ int aindex = 0;
1537
+ png_uint_32 y = image->height;
1538
+
1539
+ if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0)
1540
+ {
1541
+ # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
1542
+ if ((image->format & PNG_FORMAT_FLAG_AFIRST) != 0)
1543
+ {
1544
+ aindex = -1;
1545
+ ++input_row; /* To point to the first component */
1546
+ ++output_row;
1547
+ }
1548
+ else
1549
+ aindex = (int)channels;
1550
+ # else
1551
+ aindex = (int)channels;
1552
+ # endif
1553
+ }
1554
+
1555
+ else
1556
+ png_error(png_ptr, "png_write_image: internal call error");
1557
+
1558
+ /* Work out the output row end and count over this, note that the increment
1559
+ * above to 'row' means that row_end can actually be beyond the end of the
1560
+ * row; this is correct.
1561
+ */
1562
+ row_end = output_row + image->width * (channels+1);
1563
+
1564
+ for (; y > 0; --y)
1565
+ {
1566
+ png_const_uint_16p in_ptr = input_row;
1567
+ png_uint_16p out_ptr = output_row;
1568
+
1569
+ while (out_ptr < row_end)
1570
+ {
1571
+ png_uint_16 alpha = in_ptr[aindex];
1572
+ png_uint_32 reciprocal = 0;
1573
+ int c;
1574
+
1575
+ out_ptr[aindex] = alpha;
1576
+
1577
+ /* Calculate a reciprocal. The correct calculation is simply
1578
+ * component/alpha*65535 << 15. (I.e. 15 bits of precision); this
1579
+ * allows correct rounding by adding .5 before the shift. 'reciprocal'
1580
+ * is only initialized when required.
1581
+ */
1582
+ if (alpha > 0 && alpha < 65535)
1583
+ reciprocal = ((0xffff<<15)+(alpha>>1))/alpha;
1584
+
1585
+ c = (int)channels;
1586
+ do /* always at least one channel */
1587
+ {
1588
+ png_uint_16 component = *in_ptr++;
1589
+
1590
+ /* The following gives 65535 for an alpha of 0, which is fine,
1591
+ * otherwise if 0/0 is represented as some other value there is more
1592
+ * likely to be a discontinuity which will probably damage
1593
+ * compression when moving from a fully transparent area to a
1594
+ * nearly transparent one. (The assumption here is that opaque
1595
+ * areas tend not to be 0 intensity.)
1596
+ */
1597
+ if (component >= alpha)
1598
+ component = 65535;
1599
+
1600
+ /* component<alpha, so component/alpha is less than one and
1601
+ * component*reciprocal is less than 2^31.
1602
+ */
1603
+ else if (component > 0 && alpha < 65535)
1604
+ {
1605
+ png_uint_32 calc = component * reciprocal;
1606
+ calc += 16384; /* round to nearest */
1607
+ component = (png_uint_16)(calc >> 15);
1608
+ }
1609
+
1610
+ *out_ptr++ = component;
1611
+ }
1612
+ while (--c > 0);
1613
+
1614
+ /* Skip to next component (skip the intervening alpha channel) */
1615
+ ++in_ptr;
1616
+ ++out_ptr;
1617
+ }
1618
+
1619
+ png_write_row(png_ptr, png_voidcast(png_const_bytep, display->local_row));
1620
+ input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
1621
+ }
1622
+
1623
+ return 1;
1624
+ }
1625
+
1626
+ /* Given 16-bit input (1 to 4 channels) write 8-bit output. If an alpha channel
1627
+ * is present it must be removed from the components, the components are then
1628
+ * written in sRGB encoding. No components are added or removed.
1629
+ *
1630
+ * Calculate an alpha reciprocal to reverse pre-multiplication. As above the
1631
+ * calculation can be done to 15 bits of accuracy; however, the output needs to
1632
+ * be scaled in the range 0..255*65535, so include that scaling here.
1633
+ */
1634
+ # define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+((alpha)>>1))/(alpha))
1635
+
1636
+ static png_byte
1637
+ png_unpremultiply(png_uint_32 component, png_uint_32 alpha,
1638
+ png_uint_32 reciprocal/*from the above macro*/)
1639
+ {
1640
+ /* The following gives 1.0 for an alpha of 0, which is fine, otherwise if 0/0
1641
+ * is represented as some other value there is more likely to be a
1642
+ * discontinuity which will probably damage compression when moving from a
1643
+ * fully transparent area to a nearly transparent one. (The assumption here
1644
+ * is that opaque areas tend not to be 0 intensity.)
1645
+ *
1646
+ * There is a rounding problem here; if alpha is less than 128 it will end up
1647
+ * as 0 when scaled to 8 bits. To avoid introducing spurious colors into the
1648
+ * output change for this too.
1649
+ */
1650
+ if (component >= alpha || alpha < 128)
1651
+ return 255;
1652
+
1653
+ /* component<alpha, so component/alpha is less than one and
1654
+ * component*reciprocal is less than 2^31.
1655
+ */
1656
+ else if (component > 0)
1657
+ {
1658
+ /* The test is that alpha/257 (rounded) is less than 255, the first value
1659
+ * that becomes 255 is 65407.
1660
+ * NOTE: this must agree with the PNG_DIV257 macro (which must, therefore,
1661
+ * be exact!) [Could also test reciprocal != 0]
1662
+ */
1663
+ if (alpha < 65407)
1664
+ {
1665
+ component *= reciprocal;
1666
+ component += 64; /* round to nearest */
1667
+ component >>= 7;
1668
+ }
1669
+
1670
+ else
1671
+ component *= 255;
1672
+
1673
+ /* Convert the component to sRGB. */
1674
+ return (png_byte)PNG_sRGB_FROM_LINEAR(component);
1675
+ }
1676
+
1677
+ else
1678
+ return 0;
1679
+ }
1680
+
1681
+ static int
1682
+ png_write_image_8bit(png_voidp argument)
1683
+ {
1684
+ png_image_write_control *display = png_voidcast(png_image_write_control*,
1685
+ argument);
1686
+ png_imagep image = display->image;
1687
+ png_structrp png_ptr = image->opaque->png_ptr;
1688
+
1689
+ png_const_uint_16p input_row = png_voidcast(png_const_uint_16p,
1690
+ display->first_row);
1691
+ png_bytep output_row = png_voidcast(png_bytep, display->local_row);
1692
+ png_uint_32 y = image->height;
1693
+ unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
1694
+ 3 : 1;
1695
+
1696
+ if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0)
1697
+ {
1698
+ png_bytep row_end;
1699
+ int aindex;
1700
+
1701
+ # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
1702
+ if ((image->format & PNG_FORMAT_FLAG_AFIRST) != 0)
1703
+ {
1704
+ aindex = -1;
1705
+ ++input_row; /* To point to the first component */
1706
+ ++output_row;
1707
+ }
1708
+
1709
+ else
1710
+ # endif
1711
+ aindex = (int)channels;
1712
+
1713
+ /* Use row_end in place of a loop counter: */
1714
+ row_end = output_row + image->width * (channels+1);
1715
+
1716
+ for (; y > 0; --y)
1717
+ {
1718
+ png_const_uint_16p in_ptr = input_row;
1719
+ png_bytep out_ptr = output_row;
1720
+
1721
+ while (out_ptr < row_end)
1722
+ {
1723
+ png_uint_16 alpha = in_ptr[aindex];
1724
+ png_byte alphabyte = (png_byte)PNG_DIV257(alpha);
1725
+ png_uint_32 reciprocal = 0;
1726
+ int c;
1727
+
1728
+ /* Scale and write the alpha channel. */
1729
+ out_ptr[aindex] = alphabyte;
1730
+
1731
+ if (alphabyte > 0 && alphabyte < 255)
1732
+ reciprocal = UNP_RECIPROCAL(alpha);
1733
+
1734
+ c = (int)channels;
1735
+ do /* always at least one channel */
1736
+ *out_ptr++ = png_unpremultiply(*in_ptr++, alpha, reciprocal);
1737
+ while (--c > 0);
1738
+
1739
+ /* Skip to next component (skip the intervening alpha channel) */
1740
+ ++in_ptr;
1741
+ ++out_ptr;
1742
+ } /* while out_ptr < row_end */
1743
+
1744
+ png_write_row(png_ptr, png_voidcast(png_const_bytep,
1745
+ display->local_row));
1746
+ input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
1747
+ } /* while y */
1748
+ }
1749
+
1750
+ else
1751
+ {
1752
+ /* No alpha channel, so the row_end really is the end of the row and it
1753
+ * is sufficient to loop over the components one by one.
1754
+ */
1755
+ png_bytep row_end = output_row + image->width * channels;
1756
+
1757
+ for (; y > 0; --y)
1758
+ {
1759
+ png_const_uint_16p in_ptr = input_row;
1760
+ png_bytep out_ptr = output_row;
1761
+
1762
+ while (out_ptr < row_end)
1763
+ {
1764
+ png_uint_32 component = *in_ptr++;
1765
+
1766
+ component *= 255;
1767
+ *out_ptr++ = (png_byte)PNG_sRGB_FROM_LINEAR(component);
1768
+ }
1769
+
1770
+ png_write_row(png_ptr, output_row);
1771
+ input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
1772
+ }
1773
+ }
1774
+
1775
+ return 1;
1776
+ }
1777
+
1778
+ static void
1779
+ png_image_set_PLTE(png_image_write_control *display)
1780
+ {
1781
+ png_imagep image = display->image;
1782
+ const void *cmap = display->colormap;
1783
+ int entries = image->colormap_entries > 256 ? 256 :
1784
+ (int)image->colormap_entries;
1785
+
1786
+ /* NOTE: the caller must check for cmap != NULL and entries != 0 */
1787
+ png_uint_32 format = image->format;
1788
+ unsigned int channels = PNG_IMAGE_SAMPLE_CHANNELS(format);
1789
+
1790
+ # if defined(PNG_FORMAT_BGR_SUPPORTED) &&\
1791
+ defined(PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED)
1792
+ int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 &&
1793
+ (format & PNG_FORMAT_FLAG_ALPHA) != 0;
1794
+ # else
1795
+ # define afirst 0
1796
+ # endif
1797
+
1798
+ # ifdef PNG_FORMAT_BGR_SUPPORTED
1799
+ int bgr = (format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0;
1800
+ # else
1801
+ # define bgr 0
1802
+ # endif
1803
+
1804
+ int i, num_trans;
1805
+ png_color palette[256];
1806
+ png_byte tRNS[256];
1807
+
1808
+ memset(tRNS, 255, (sizeof tRNS));
1809
+ memset(palette, 0, (sizeof palette));
1810
+
1811
+ for (i=num_trans=0; i<entries; ++i)
1812
+ {
1813
+ /* This gets automatically converted to sRGB with reversal of the
1814
+ * pre-multiplication if the color-map has an alpha channel.
1815
+ */
1816
+ if ((format & PNG_FORMAT_FLAG_LINEAR) != 0)
1817
+ {
1818
+ png_const_uint_16p entry = png_voidcast(png_const_uint_16p, cmap);
1819
+
1820
+ entry += (unsigned int)i * channels;
1821
+
1822
+ if ((channels & 1) != 0) /* no alpha */
1823
+ {
1824
+ if (channels >= 3) /* RGB */
1825
+ {
1826
+ palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 *
1827
+ entry[(2 ^ bgr)]);
1828
+ palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 *
1829
+ entry[1]);
1830
+ palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 *
1831
+ entry[bgr]);
1832
+ }
1833
+
1834
+ else /* Gray */
1835
+ palette[i].blue = palette[i].red = palette[i].green =
1836
+ (png_byte)PNG_sRGB_FROM_LINEAR(255 * *entry);
1837
+ }
1838
+
1839
+ else /* alpha */
1840
+ {
1841
+ png_uint_16 alpha = entry[afirst ? 0 : channels-1];
1842
+ png_byte alphabyte = (png_byte)PNG_DIV257(alpha);
1843
+ png_uint_32 reciprocal = 0;
1844
+
1845
+ /* Calculate a reciprocal, as in the png_write_image_8bit code above
1846
+ * this is designed to produce a value scaled to 255*65535 when
1847
+ * divided by 128 (i.e. asr 7).
1848
+ */
1849
+ if (alphabyte > 0 && alphabyte < 255)
1850
+ reciprocal = (((0xffff*0xff)<<7)+(alpha>>1))/alpha;
1851
+
1852
+ tRNS[i] = alphabyte;
1853
+ if (alphabyte < 255)
1854
+ num_trans = i+1;
1855
+
1856
+ if (channels >= 3) /* RGB */
1857
+ {
1858
+ palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)],
1859
+ alpha, reciprocal);
1860
+ palette[i].green = png_unpremultiply(entry[afirst + 1], alpha,
1861
+ reciprocal);
1862
+ palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha,
1863
+ reciprocal);
1864
+ }
1865
+
1866
+ else /* gray */
1867
+ palette[i].blue = palette[i].red = palette[i].green =
1868
+ png_unpremultiply(entry[afirst], alpha, reciprocal);
1869
+ }
1870
+ }
1871
+
1872
+ else /* Color-map has sRGB values */
1873
+ {
1874
+ png_const_bytep entry = png_voidcast(png_const_bytep, cmap);
1875
+
1876
+ entry += (unsigned int)i * channels;
1877
+
1878
+ switch (channels)
1879
+ {
1880
+ case 4:
1881
+ tRNS[i] = entry[afirst ? 0 : 3];
1882
+ if (tRNS[i] < 255)
1883
+ num_trans = i+1;
1884
+ /* FALLTHROUGH */
1885
+ case 3:
1886
+ palette[i].blue = entry[afirst + (2 ^ bgr)];
1887
+ palette[i].green = entry[afirst + 1];
1888
+ palette[i].red = entry[afirst + bgr];
1889
+ break;
1890
+
1891
+ case 2:
1892
+ tRNS[i] = entry[1 ^ afirst];
1893
+ if (tRNS[i] < 255)
1894
+ num_trans = i+1;
1895
+ /* FALLTHROUGH */
1896
+ case 1:
1897
+ palette[i].blue = palette[i].red = palette[i].green =
1898
+ entry[afirst];
1899
+ break;
1900
+
1901
+ default:
1902
+ break;
1903
+ }
1904
+ }
1905
+ }
1906
+
1907
+ # ifdef afirst
1908
+ # undef afirst
1909
+ # endif
1910
+ # ifdef bgr
1911
+ # undef bgr
1912
+ # endif
1913
+
1914
+ png_set_PLTE(image->opaque->png_ptr, image->opaque->info_ptr, palette,
1915
+ entries);
1916
+
1917
+ if (num_trans > 0)
1918
+ png_set_tRNS(image->opaque->png_ptr, image->opaque->info_ptr, tRNS,
1919
+ num_trans, NULL);
1920
+
1921
+ image->colormap_entries = (png_uint_32)entries;
1922
+ }
1923
+
1924
+ static int
1925
+ png_image_write_main(png_voidp argument)
1926
+ {
1927
+ png_image_write_control *display = png_voidcast(png_image_write_control*,
1928
+ argument);
1929
+ png_imagep image = display->image;
1930
+ png_structrp png_ptr = image->opaque->png_ptr;
1931
+ png_inforp info_ptr = image->opaque->info_ptr;
1932
+ png_uint_32 format = image->format;
1933
+
1934
+ /* The following four ints are actually booleans */
1935
+ int colormap = (format & PNG_FORMAT_FLAG_COLORMAP);
1936
+ int linear = !colormap && (format & PNG_FORMAT_FLAG_LINEAR); /* input */
1937
+ int alpha = !colormap && (format & PNG_FORMAT_FLAG_ALPHA);
1938
+ int write_16bit = linear && (display->convert_to_8bit == 0);
1939
+
1940
+ # ifdef PNG_BENIGN_ERRORS_SUPPORTED
1941
+ /* Make sure we error out on any bad situation */
1942
+ png_set_benign_errors(png_ptr, 0/*error*/);
1943
+ # endif
1944
+
1945
+ /* Default the 'row_stride' parameter if required, also check the row stride
1946
+ * and total image size to ensure that they are within the system limits.
1947
+ */
1948
+ {
1949
+ unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format);
1950
+
1951
+ if (image->width <= 0x7fffffffU/channels) /* no overflow */
1952
+ {
1953
+ png_uint_32 check;
1954
+ png_uint_32 png_row_stride = image->width * channels;
1955
+
1956
+ if (display->row_stride == 0)
1957
+ display->row_stride = (png_int_32)/*SAFE*/png_row_stride;
1958
+
1959
+ if (display->row_stride < 0)
1960
+ check = (png_uint_32)(-display->row_stride);
1961
+
1962
+ else
1963
+ check = (png_uint_32)display->row_stride;
1964
+
1965
+ if (check >= png_row_stride)
1966
+ {
1967
+ /* Now check for overflow of the image buffer calculation; this
1968
+ * limits the whole image size to 32 bits for API compatibility with
1969
+ * the current, 32-bit, PNG_IMAGE_BUFFER_SIZE macro.
1970
+ */
1971
+ if (image->height > 0xffffffffU/png_row_stride)
1972
+ png_error(image->opaque->png_ptr, "memory image too large");
1973
+ }
1974
+
1975
+ else
1976
+ png_error(image->opaque->png_ptr, "supplied row stride too small");
1977
+ }
1978
+
1979
+ else
1980
+ png_error(image->opaque->png_ptr, "image row stride too large");
1981
+ }
1982
+
1983
+ /* Set the required transforms then write the rows in the correct order. */
1984
+ if ((format & PNG_FORMAT_FLAG_COLORMAP) != 0)
1985
+ {
1986
+ if (display->colormap != NULL && image->colormap_entries > 0)
1987
+ {
1988
+ png_uint_32 entries = image->colormap_entries;
1989
+
1990
+ png_set_IHDR(png_ptr, info_ptr, image->width, image->height,
1991
+ entries > 16 ? 8 : (entries > 4 ? 4 : (entries > 2 ? 2 : 1)),
1992
+ PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE,
1993
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
1994
+
1995
+ png_image_set_PLTE(display);
1996
+ }
1997
+
1998
+ else
1999
+ png_error(image->opaque->png_ptr,
2000
+ "no color-map for color-mapped image");
2001
+ }
2002
+
2003
+ else
2004
+ png_set_IHDR(png_ptr, info_ptr, image->width, image->height,
2005
+ write_16bit ? 16 : 8,
2006
+ ((format & PNG_FORMAT_FLAG_COLOR) ? PNG_COLOR_MASK_COLOR : 0) +
2007
+ ((format & PNG_FORMAT_FLAG_ALPHA) ? PNG_COLOR_MASK_ALPHA : 0),
2008
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
2009
+
2010
+ /* Counter-intuitively the data transformations must be called *after*
2011
+ * png_write_info, not before as in the read code, but the 'set' functions
2012
+ * must still be called before. Just set the color space information, never
2013
+ * write an interlaced image.
2014
+ */
2015
+
2016
+ if (write_16bit != 0)
2017
+ {
2018
+ /* The gamma here is 1.0 (linear) and the cHRM chunk matches sRGB. */
2019
+ png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_LINEAR);
2020
+
2021
+ if ((image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB) == 0)
2022
+ png_set_cHRM_fixed(png_ptr, info_ptr,
2023
+ /* color x y */
2024
+ /* white */ 31270, 32900,
2025
+ /* red */ 64000, 33000,
2026
+ /* green */ 30000, 60000,
2027
+ /* blue */ 15000, 6000
2028
+ );
2029
+ }
2030
+
2031
+ else if ((image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB) == 0)
2032
+ png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_PERCEPTUAL);
2033
+
2034
+ /* Else writing an 8-bit file and the *colors* aren't sRGB, but the 8-bit
2035
+ * space must still be gamma encoded.
2036
+ */
2037
+ else
2038
+ png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE);
2039
+
2040
+ /* Write the file header. */
2041
+ png_write_info(png_ptr, info_ptr);
2042
+
2043
+ /* Now set up the data transformations (*after* the header is written),
2044
+ * remove the handled transformations from the 'format' flags for checking.
2045
+ *
2046
+ * First check for a little endian system if writing 16-bit files.
2047
+ */
2048
+ if (write_16bit != 0)
2049
+ {
2050
+ png_uint_16 le = 0x0001;
2051
+
2052
+ if ((*(png_const_bytep) & le) != 0)
2053
+ png_set_swap(png_ptr);
2054
+ }
2055
+
2056
+ # ifdef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
2057
+ if ((format & PNG_FORMAT_FLAG_BGR) != 0)
2058
+ {
2059
+ if (colormap == 0 && (format & PNG_FORMAT_FLAG_COLOR) != 0)
2060
+ png_set_bgr(png_ptr);
2061
+ format &= ~PNG_FORMAT_FLAG_BGR;
2062
+ }
2063
+ # endif
2064
+
2065
+ # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
2066
+ if ((format & PNG_FORMAT_FLAG_AFIRST) != 0)
2067
+ {
2068
+ if (colormap == 0 && (format & PNG_FORMAT_FLAG_ALPHA) != 0)
2069
+ png_set_swap_alpha(png_ptr);
2070
+ format &= ~PNG_FORMAT_FLAG_AFIRST;
2071
+ }
2072
+ # endif
2073
+
2074
+ /* If there are 16 or fewer color-map entries we wrote a lower bit depth
2075
+ * above, but the application data is still byte packed.
2076
+ */
2077
+ if (colormap != 0 && image->colormap_entries <= 16)
2078
+ png_set_packing(png_ptr);
2079
+
2080
+ /* That should have handled all (both) the transforms. */
2081
+ if ((format & ~(png_uint_32)(PNG_FORMAT_FLAG_COLOR | PNG_FORMAT_FLAG_LINEAR |
2082
+ PNG_FORMAT_FLAG_ALPHA | PNG_FORMAT_FLAG_COLORMAP)) != 0)
2083
+ png_error(png_ptr, "png_write_image: unsupported transformation");
2084
+
2085
+ {
2086
+ png_const_bytep row = png_voidcast(png_const_bytep, display->buffer);
2087
+ ptrdiff_t row_bytes = display->row_stride;
2088
+
2089
+ if (linear != 0)
2090
+ row_bytes *= (sizeof (png_uint_16));
2091
+
2092
+ if (row_bytes < 0)
2093
+ row += (image->height-1) * (-row_bytes);
2094
+
2095
+ display->first_row = row;
2096
+ display->row_bytes = row_bytes;
2097
+ }
2098
+
2099
+ /* Apply 'fast' options if the flag is set. */
2100
+ if ((image->flags & PNG_IMAGE_FLAG_FAST) != 0)
2101
+ {
2102
+ png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_NO_FILTERS);
2103
+ /* NOTE: determined by experiment using pngstest, this reflects some
2104
+ * balance between the time to write the image once and the time to read
2105
+ * it about 50 times. The speed-up in pngstest was about 10-20% of the
2106
+ * total (user) time on a heavily loaded system.
2107
+ */
2108
+ # ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
2109
+ png_set_compression_level(png_ptr, 3);
2110
+ # endif
2111
+ }
2112
+
2113
+ /* Check for the cases that currently require a pre-transform on the row
2114
+ * before it is written. This only applies when the input is 16-bit and
2115
+ * either there is an alpha channel or it is converted to 8-bit.
2116
+ */
2117
+ if ((linear != 0 && alpha != 0 ) ||
2118
+ (colormap == 0 && display->convert_to_8bit != 0))
2119
+ {
2120
+ png_bytep row = png_voidcast(png_bytep, png_malloc(png_ptr,
2121
+ png_get_rowbytes(png_ptr, info_ptr)));
2122
+ int result;
2123
+
2124
+ display->local_row = row;
2125
+ if (write_16bit != 0)
2126
+ result = png_safe_execute(image, png_write_image_16bit, display);
2127
+ else
2128
+ result = png_safe_execute(image, png_write_image_8bit, display);
2129
+ display->local_row = NULL;
2130
+
2131
+ png_free(png_ptr, row);
2132
+
2133
+ /* Skip the 'write_end' on error: */
2134
+ if (result == 0)
2135
+ return 0;
2136
+ }
2137
+
2138
+ /* Otherwise this is the case where the input is in a format currently
2139
+ * supported by the rest of the libpng write code; call it directly.
2140
+ */
2141
+ else
2142
+ {
2143
+ png_const_bytep row = png_voidcast(png_const_bytep, display->first_row);
2144
+ ptrdiff_t row_bytes = display->row_bytes;
2145
+ png_uint_32 y = image->height;
2146
+
2147
+ for (; y > 0; --y)
2148
+ {
2149
+ png_write_row(png_ptr, row);
2150
+ row += row_bytes;
2151
+ }
2152
+ }
2153
+
2154
+ png_write_end(png_ptr, info_ptr);
2155
+ return 1;
2156
+ }
2157
+
2158
+
2159
+ static void (PNGCBAPI
2160
+ image_memory_write)(png_structp png_ptr, png_bytep/*const*/ data, size_t size)
2161
+ {
2162
+ png_image_write_control *display = png_voidcast(png_image_write_control*,
2163
+ png_ptr->io_ptr/*backdoor: png_get_io_ptr(png_ptr)*/);
2164
+ png_alloc_size_t ob = display->output_bytes;
2165
+
2166
+ /* Check for overflow; this should never happen: */
2167
+ if (size <= ((png_alloc_size_t)-1) - ob)
2168
+ {
2169
+ /* I don't think libpng ever does this, but just in case: */
2170
+ if (size > 0)
2171
+ {
2172
+ if (display->memory_bytes >= ob+size) /* writing */
2173
+ memcpy(display->memory+ob, data, size);
2174
+
2175
+ /* Always update the size: */
2176
+ display->output_bytes = ob+size;
2177
+ }
2178
+ }
2179
+
2180
+ else
2181
+ png_error(png_ptr, "png_image_write_to_memory: PNG too big");
2182
+ }
2183
+
2184
+ static void (PNGCBAPI
2185
+ image_memory_flush)(png_structp png_ptr)
2186
+ {
2187
+ PNG_UNUSED(png_ptr)
2188
+ }
2189
+
2190
+ static int
2191
+ png_image_write_memory(png_voidp argument)
2192
+ {
2193
+ png_image_write_control *display = png_voidcast(png_image_write_control*,
2194
+ argument);
2195
+
2196
+ /* The rest of the memory-specific init and write_main in an error protected
2197
+ * environment. This case needs to use callbacks for the write operations
2198
+ * since libpng has no built in support for writing to memory.
2199
+ */
2200
+ png_set_write_fn(display->image->opaque->png_ptr, display/*io_ptr*/,
2201
+ image_memory_write, image_memory_flush);
2202
+
2203
+ return png_image_write_main(display);
2204
+ }
2205
+
2206
+ int PNGAPI
2207
+ png_image_write_to_memory(png_imagep image, void *memory,
2208
+ png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8bit,
2209
+ const void *buffer, png_int_32 row_stride, const void *colormap)
2210
+ {
2211
+ /* Write the image to the given buffer, or count the bytes if it is NULL */
2212
+ if (image != NULL && image->version == PNG_IMAGE_VERSION)
2213
+ {
2214
+ if (memory_bytes != NULL && buffer != NULL)
2215
+ {
2216
+ /* This is to give the caller an easier error detection in the NULL
2217
+ * case and guard against uninitialized variable problems:
2218
+ */
2219
+ if (memory == NULL)
2220
+ *memory_bytes = 0;
2221
+
2222
+ if (png_image_write_init(image) != 0)
2223
+ {
2224
+ png_image_write_control display;
2225
+ int result;
2226
+
2227
+ memset(&display, 0, (sizeof display));
2228
+ display.image = image;
2229
+ display.buffer = buffer;
2230
+ display.row_stride = row_stride;
2231
+ display.colormap = colormap;
2232
+ display.convert_to_8bit = convert_to_8bit;
2233
+ display.memory = png_voidcast(png_bytep, memory);
2234
+ display.memory_bytes = *memory_bytes;
2235
+ display.output_bytes = 0;
2236
+
2237
+ result = png_safe_execute(image, png_image_write_memory, &display);
2238
+ png_image_free(image);
2239
+
2240
+ /* write_memory returns true even if we ran out of buffer. */
2241
+ if (result)
2242
+ {
2243
+ /* On out-of-buffer this function returns '0' but still updates
2244
+ * memory_bytes:
2245
+ */
2246
+ if (memory != NULL && display.output_bytes > *memory_bytes)
2247
+ result = 0;
2248
+
2249
+ *memory_bytes = display.output_bytes;
2250
+ }
2251
+
2252
+ return result;
2253
+ }
2254
+
2255
+ else
2256
+ return 0;
2257
+ }
2258
+
2259
+ else
2260
+ return png_image_error(image,
2261
+ "png_image_write_to_memory: invalid argument");
2262
+ }
2263
+
2264
+ else if (image != NULL)
2265
+ return png_image_error(image,
2266
+ "png_image_write_to_memory: incorrect PNG_IMAGE_VERSION");
2267
+
2268
+ else
2269
+ return 0;
2270
+ }
2271
+
2272
+ #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
2273
+ int PNGAPI
2274
+ png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit,
2275
+ const void *buffer, png_int_32 row_stride, const void *colormap)
2276
+ {
2277
+ /* Write the image to the given (FILE*). */
2278
+ if (image != NULL && image->version == PNG_IMAGE_VERSION)
2279
+ {
2280
+ if (file != NULL && buffer != NULL)
2281
+ {
2282
+ if (png_image_write_init(image) != 0)
2283
+ {
2284
+ png_image_write_control display;
2285
+ int result;
2286
+
2287
+ /* This is slightly evil, but png_init_io doesn't do anything other
2288
+ * than this and we haven't changed the standard IO functions so
2289
+ * this saves a 'safe' function.
2290
+ */
2291
+ image->opaque->png_ptr->io_ptr = file;
2292
+
2293
+ memset(&display, 0, (sizeof display));
2294
+ display.image = image;
2295
+ display.buffer = buffer;
2296
+ display.row_stride = row_stride;
2297
+ display.colormap = colormap;
2298
+ display.convert_to_8bit = convert_to_8bit;
2299
+
2300
+ result = png_safe_execute(image, png_image_write_main, &display);
2301
+ png_image_free(image);
2302
+ return result;
2303
+ }
2304
+
2305
+ else
2306
+ return 0;
2307
+ }
2308
+
2309
+ else
2310
+ return png_image_error(image,
2311
+ "png_image_write_to_stdio: invalid argument");
2312
+ }
2313
+
2314
+ else if (image != NULL)
2315
+ return png_image_error(image,
2316
+ "png_image_write_to_stdio: incorrect PNG_IMAGE_VERSION");
2317
+
2318
+ else
2319
+ return 0;
2320
+ }
2321
+
2322
+ int PNGAPI
2323
+ png_image_write_to_file(png_imagep image, const char *file_name,
2324
+ int convert_to_8bit, const void *buffer, png_int_32 row_stride,
2325
+ const void *colormap)
2326
+ {
2327
+ /* Write the image to the named file. */
2328
+ if (image != NULL && image->version == PNG_IMAGE_VERSION)
2329
+ {
2330
+ if (file_name != NULL && buffer != NULL)
2331
+ {
2332
+ FILE *fp = fopen(file_name, "wb");
2333
+
2334
+ if (fp != NULL)
2335
+ {
2336
+ if (png_image_write_to_stdio(image, fp, convert_to_8bit, buffer,
2337
+ row_stride, colormap) != 0)
2338
+ {
2339
+ int error; /* from fflush/fclose */
2340
+
2341
+ /* Make sure the file is flushed correctly. */
2342
+ if (fflush(fp) == 0 && ferror(fp) == 0)
2343
+ {
2344
+ if (fclose(fp) == 0)
2345
+ return 1;
2346
+
2347
+ error = errno; /* from fclose */
2348
+ }
2349
+
2350
+ else
2351
+ {
2352
+ error = errno; /* from fflush or ferror */
2353
+ (void)fclose(fp);
2354
+ }
2355
+
2356
+ (void)remove(file_name);
2357
+ /* The image has already been cleaned up; this is just used to
2358
+ * set the error (because the original write succeeded).
2359
+ */
2360
+ return png_image_error(image, strerror(error));
2361
+ }
2362
+
2363
+ else
2364
+ {
2365
+ /* Clean up: just the opened file. */
2366
+ (void)fclose(fp);
2367
+ (void)remove(file_name);
2368
+ return 0;
2369
+ }
2370
+ }
2371
+
2372
+ else
2373
+ return png_image_error(image, strerror(errno));
2374
+ }
2375
+
2376
+ else
2377
+ return png_image_error(image,
2378
+ "png_image_write_to_file: invalid argument");
2379
+ }
2380
+
2381
+ else if (image != NULL)
2382
+ return png_image_error(image,
2383
+ "png_image_write_to_file: incorrect PNG_IMAGE_VERSION");
2384
+
2385
+ else
2386
+ return 0;
2387
+ }
2388
+ #endif /* SIMPLIFIED_WRITE_STDIO */
2389
+ #endif /* SIMPLIFIED_WRITE */
2390
+ #endif /* WRITE */