@img/sharp-libvips-dev 0.0.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 (656) hide show
  1. package/README.md +47 -0
  2. package/cplusplus/VConnection.cpp +151 -0
  3. package/cplusplus/VError.cpp +49 -0
  4. package/cplusplus/VImage.cpp +1548 -0
  5. package/cplusplus/VInterpolate.cpp +62 -0
  6. package/cplusplus/VRegion.cpp +27 -0
  7. package/cplusplus/index.js +1 -0
  8. package/cplusplus/vips-operators.cpp +3760 -0
  9. package/include/aom/aom.h +127 -0
  10. package/include/aom/aom_codec.h +573 -0
  11. package/include/aom/aom_decoder.h +257 -0
  12. package/include/aom/aom_encoder.h +1137 -0
  13. package/include/aom/aom_external_partition.h +452 -0
  14. package/include/aom/aom_frame_buffer.h +84 -0
  15. package/include/aom/aom_image.h +448 -0
  16. package/include/aom/aom_integer.h +68 -0
  17. package/include/aom/aomcx.h +2112 -0
  18. package/include/aom/aomdx.h +604 -0
  19. package/include/archive.h +1212 -0
  20. package/include/archive_entry.h +723 -0
  21. package/include/cairo/cairo-deprecated.h +123 -0
  22. package/include/cairo/cairo-features.h +29 -0
  23. package/include/cairo/cairo-ft.h +118 -0
  24. package/include/cairo/cairo-gobject.h +192 -0
  25. package/include/cairo/cairo-svg.h +130 -0
  26. package/include/cairo/cairo-version.h +8 -0
  27. package/include/cairo/cairo.h +3281 -0
  28. package/include/cgif.h +80 -0
  29. package/include/expat.h +1064 -0
  30. package/include/expat_config.h +140 -0
  31. package/include/expat_external.h +165 -0
  32. package/include/ffi.h +531 -0
  33. package/include/ffitarget.h +164 -0
  34. package/include/fontconfig/fcfreetype.h +59 -0
  35. package/include/fontconfig/fcprivate.h +134 -0
  36. package/include/fontconfig/fontconfig.h +1158 -0
  37. package/include/freetype2/freetype/config/ftconfig.h +51 -0
  38. package/include/freetype2/freetype/config/ftheader.h +836 -0
  39. package/include/freetype2/freetype/config/ftmodule.h +21 -0
  40. package/include/freetype2/freetype/config/ftoption.h +1014 -0
  41. package/include/freetype2/freetype/config/ftstdlib.h +185 -0
  42. package/include/freetype2/freetype/config/integer-types.h +250 -0
  43. package/include/freetype2/freetype/config/mac-support.h +49 -0
  44. package/include/freetype2/freetype/config/public-macros.h +138 -0
  45. package/include/freetype2/freetype/freetype.h +5337 -0
  46. package/include/freetype2/freetype/ftadvanc.h +188 -0
  47. package/include/freetype2/freetype/ftbbox.h +101 -0
  48. package/include/freetype2/freetype/ftbdf.h +212 -0
  49. package/include/freetype2/freetype/ftbitmap.h +329 -0
  50. package/include/freetype2/freetype/ftbzip2.h +102 -0
  51. package/include/freetype2/freetype/ftcache.h +1087 -0
  52. package/include/freetype2/freetype/ftchapters.h +168 -0
  53. package/include/freetype2/freetype/ftcid.h +167 -0
  54. package/include/freetype2/freetype/ftcolor.h +1667 -0
  55. package/include/freetype2/freetype/ftdriver.h +1246 -0
  56. package/include/freetype2/freetype/fterrdef.h +283 -0
  57. package/include/freetype2/freetype/fterrors.h +296 -0
  58. package/include/freetype2/freetype/ftfntfmt.h +93 -0
  59. package/include/freetype2/freetype/ftgasp.h +143 -0
  60. package/include/freetype2/freetype/ftglyph.h +750 -0
  61. package/include/freetype2/freetype/ftgxval.h +354 -0
  62. package/include/freetype2/freetype/ftgzip.h +151 -0
  63. package/include/freetype2/freetype/ftimage.h +1284 -0
  64. package/include/freetype2/freetype/ftincrem.h +348 -0
  65. package/include/freetype2/freetype/ftlcdfil.h +323 -0
  66. package/include/freetype2/freetype/ftlist.h +296 -0
  67. package/include/freetype2/freetype/ftlzw.h +100 -0
  68. package/include/freetype2/freetype/ftmac.h +289 -0
  69. package/include/freetype2/freetype/ftmm.h +805 -0
  70. package/include/freetype2/freetype/ftmodapi.h +807 -0
  71. package/include/freetype2/freetype/ftmoderr.h +204 -0
  72. package/include/freetype2/freetype/ftotval.h +206 -0
  73. package/include/freetype2/freetype/ftoutln.h +588 -0
  74. package/include/freetype2/freetype/ftparams.h +218 -0
  75. package/include/freetype2/freetype/ftpfr.h +179 -0
  76. package/include/freetype2/freetype/ftrender.h +244 -0
  77. package/include/freetype2/freetype/ftsizes.h +159 -0
  78. package/include/freetype2/freetype/ftsnames.h +272 -0
  79. package/include/freetype2/freetype/ftstroke.h +773 -0
  80. package/include/freetype2/freetype/ftsynth.h +104 -0
  81. package/include/freetype2/freetype/ftsystem.h +350 -0
  82. package/include/freetype2/freetype/fttrigon.h +350 -0
  83. package/include/freetype2/freetype/fttypes.h +617 -0
  84. package/include/freetype2/freetype/ftwinfnt.h +276 -0
  85. package/include/freetype2/freetype/otsvg.h +336 -0
  86. package/include/freetype2/freetype/t1tables.h +793 -0
  87. package/include/freetype2/freetype/ttnameid.h +1235 -0
  88. package/include/freetype2/freetype/tttables.h +855 -0
  89. package/include/freetype2/freetype/tttags.h +124 -0
  90. package/include/freetype2/ft2build.h +42 -0
  91. package/include/fribidi/fribidi-arabic.h +81 -0
  92. package/include/fribidi/fribidi-begindecls.h +3 -0
  93. package/include/fribidi/fribidi-bidi-types-list.h +96 -0
  94. package/include/fribidi/fribidi-bidi-types.h +405 -0
  95. package/include/fribidi/fribidi-bidi.h +142 -0
  96. package/include/fribidi/fribidi-brackets.h +89 -0
  97. package/include/fribidi/fribidi-char-sets-list.h +54 -0
  98. package/include/fribidi/fribidi-char-sets.h +106 -0
  99. package/include/fribidi/fribidi-common.h +152 -0
  100. package/include/fribidi/fribidi-config.h +23 -0
  101. package/include/fribidi/fribidi-deprecated.h +175 -0
  102. package/include/fribidi/fribidi-enddecls.h +3 -0
  103. package/include/fribidi/fribidi-flags.h +72 -0
  104. package/include/fribidi/fribidi-joining-types-list.h +44 -0
  105. package/include/fribidi/fribidi-joining-types.h +249 -0
  106. package/include/fribidi/fribidi-joining.h +74 -0
  107. package/include/fribidi/fribidi-mirroring.h +86 -0
  108. package/include/fribidi/fribidi-shape.h +71 -0
  109. package/include/fribidi/fribidi-types.h +79 -0
  110. package/include/fribidi/fribidi-unicode-version.h +10 -0
  111. package/include/fribidi/fribidi-unicode.h +105 -0
  112. package/include/fribidi/fribidi.h +129 -0
  113. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +221 -0
  114. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h +37 -0
  115. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +525 -0
  116. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h +40 -0
  117. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +115 -0
  118. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +481 -0
  119. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +113 -0
  120. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h +718 -0
  121. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h +33 -0
  122. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +70 -0
  123. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +168 -0
  124. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h +46 -0
  125. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h +165 -0
  126. package/include/gio-unix-2.0/gio/gdesktopappinfo.h +200 -0
  127. package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +67 -0
  128. package/include/gio-unix-2.0/gio/gunixfdmessage.h +86 -0
  129. package/include/gio-unix-2.0/gio/gunixinputstream.h +85 -0
  130. package/include/gio-unix-2.0/gio/gunixmounts.h +172 -0
  131. package/include/gio-unix-2.0/gio/gunixoutputstream.h +84 -0
  132. package/include/glib-2.0/gio/gaction.h +100 -0
  133. package/include/glib-2.0/gio/gactiongroup.h +163 -0
  134. package/include/glib-2.0/gio/gactiongroupexporter.h +47 -0
  135. package/include/glib-2.0/gio/gactionmap.h +101 -0
  136. package/include/glib-2.0/gio/gappinfo.h +369 -0
  137. package/include/glib-2.0/gio/gapplication.h +257 -0
  138. package/include/glib-2.0/gio/gapplicationcommandline.h +124 -0
  139. package/include/glib-2.0/gio/gasyncinitable.h +132 -0
  140. package/include/glib-2.0/gio/gasyncresult.h +87 -0
  141. package/include/glib-2.0/gio/gbufferedinputstream.h +135 -0
  142. package/include/glib-2.0/gio/gbufferedoutputstream.h +88 -0
  143. package/include/glib-2.0/gio/gbytesicon.h +54 -0
  144. package/include/glib-2.0/gio/gcancellable.h +120 -0
  145. package/include/glib-2.0/gio/gcharsetconverter.h +65 -0
  146. package/include/glib-2.0/gio/gcontenttype.h +84 -0
  147. package/include/glib-2.0/gio/gconverter.h +98 -0
  148. package/include/glib-2.0/gio/gconverterinputstream.h +82 -0
  149. package/include/glib-2.0/gio/gconverteroutputstream.h +82 -0
  150. package/include/glib-2.0/gio/gcredentials.h +87 -0
  151. package/include/glib-2.0/gio/gdatagrambased.h +146 -0
  152. package/include/glib-2.0/gio/gdatainputstream.h +182 -0
  153. package/include/glib-2.0/gio/gdataoutputstream.h +127 -0
  154. package/include/glib-2.0/gio/gdbusactiongroup.h +56 -0
  155. package/include/glib-2.0/gio/gdbusaddress.h +67 -0
  156. package/include/glib-2.0/gio/gdbusauthobserver.h +53 -0
  157. package/include/glib-2.0/gio/gdbusconnection.h +691 -0
  158. package/include/glib-2.0/gio/gdbuserror.h +111 -0
  159. package/include/glib-2.0/gio/gdbusinterface.h +83 -0
  160. package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +129 -0
  161. package/include/glib-2.0/gio/gdbusintrospection.h +327 -0
  162. package/include/glib-2.0/gio/gdbusmenumodel.h +47 -0
  163. package/include/glib-2.0/gio/gdbusmessage.h +204 -0
  164. package/include/glib-2.0/gio/gdbusmethodinvocation.h +136 -0
  165. package/include/glib-2.0/gio/gdbusnameowning.h +117 -0
  166. package/include/glib-2.0/gio/gdbusnamewatching.h +104 -0
  167. package/include/glib-2.0/gio/gdbusobject.h +80 -0
  168. package/include/glib-2.0/gio/gdbusobjectmanager.h +96 -0
  169. package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +148 -0
  170. package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +95 -0
  171. package/include/glib-2.0/gio/gdbusobjectproxy.h +81 -0
  172. package/include/glib-2.0/gio/gdbusobjectskeleton.h +98 -0
  173. package/include/glib-2.0/gio/gdbusproxy.h +220 -0
  174. package/include/glib-2.0/gio/gdbusserver.h +62 -0
  175. package/include/glib-2.0/gio/gdbusutils.h +65 -0
  176. package/include/glib-2.0/gio/gdebugcontroller.h +81 -0
  177. package/include/glib-2.0/gio/gdebugcontrollerdbus.h +71 -0
  178. package/include/glib-2.0/gio/gdrive.h +274 -0
  179. package/include/glib-2.0/gio/gdtlsclientconnection.h +77 -0
  180. package/include/glib-2.0/gio/gdtlsconnection.h +230 -0
  181. package/include/glib-2.0/gio/gdtlsserverconnection.h +71 -0
  182. package/include/glib-2.0/gio/gemblem.h +63 -0
  183. package/include/glib-2.0/gio/gemblemedicon.h +83 -0
  184. package/include/glib-2.0/gio/gfile.h +1359 -0
  185. package/include/glib-2.0/gio/gfileattribute.h +86 -0
  186. package/include/glib-2.0/gio/gfileenumerator.h +154 -0
  187. package/include/glib-2.0/gio/gfileicon.h +59 -0
  188. package/include/glib-2.0/gio/gfileinfo.h +1546 -0
  189. package/include/glib-2.0/gio/gfileinputstream.h +116 -0
  190. package/include/glib-2.0/gio/gfileiostream.h +123 -0
  191. package/include/glib-2.0/gio/gfilemonitor.h +100 -0
  192. package/include/glib-2.0/gio/gfilenamecompleter.h +81 -0
  193. package/include/glib-2.0/gio/gfileoutputstream.h +124 -0
  194. package/include/glib-2.0/gio/gfilterinputstream.h +80 -0
  195. package/include/glib-2.0/gio/gfilteroutputstream.h +80 -0
  196. package/include/glib-2.0/gio/gicon.h +133 -0
  197. package/include/glib-2.0/gio/ginetaddress.h +125 -0
  198. package/include/glib-2.0/gio/ginetaddressmask.h +86 -0
  199. package/include/glib-2.0/gio/ginetsocketaddress.h +80 -0
  200. package/include/glib-2.0/gio/ginitable.h +107 -0
  201. package/include/glib-2.0/gio/ginputstream.h +218 -0
  202. package/include/glib-2.0/gio/gio-autocleanups.h +155 -0
  203. package/include/glib-2.0/gio/gio-visibility.h +952 -0
  204. package/include/glib-2.0/gio/gio.h +186 -0
  205. package/include/glib-2.0/gio/gioenums.h +2149 -0
  206. package/include/glib-2.0/gio/gioenumtypes.h +207 -0
  207. package/include/glib-2.0/gio/gioerror.h +58 -0
  208. package/include/glib-2.0/gio/giomodule.h +199 -0
  209. package/include/glib-2.0/gio/gioscheduler.h +56 -0
  210. package/include/glib-2.0/gio/giostream.h +137 -0
  211. package/include/glib-2.0/gio/giotypes.h +660 -0
  212. package/include/glib-2.0/gio/glistmodel.h +74 -0
  213. package/include/glib-2.0/gio/gliststore.h +97 -0
  214. package/include/glib-2.0/gio/gloadableicon.h +101 -0
  215. package/include/glib-2.0/gio/gmemoryinputstream.h +92 -0
  216. package/include/glib-2.0/gio/gmemorymonitor.h +64 -0
  217. package/include/glib-2.0/gio/gmemoryoutputstream.h +109 -0
  218. package/include/glib-2.0/gio/gmenu.h +184 -0
  219. package/include/glib-2.0/gio/gmenuexporter.h +55 -0
  220. package/include/glib-2.0/gio/gmenumodel.h +307 -0
  221. package/include/glib-2.0/gio/gmount.h +278 -0
  222. package/include/glib-2.0/gio/gmountoperation.h +179 -0
  223. package/include/glib-2.0/gio/gnativesocketaddress.h +67 -0
  224. package/include/glib-2.0/gio/gnativevolumemonitor.h +63 -0
  225. package/include/glib-2.0/gio/gnetworkaddress.h +82 -0
  226. package/include/glib-2.0/gio/gnetworking.h +81 -0
  227. package/include/glib-2.0/gio/gnetworkmonitor.h +101 -0
  228. package/include/glib-2.0/gio/gnetworkservice.h +77 -0
  229. package/include/glib-2.0/gio/gnotification.h +103 -0
  230. package/include/glib-2.0/gio/goutputstream.h +334 -0
  231. package/include/glib-2.0/gio/gpermission.h +129 -0
  232. package/include/glib-2.0/gio/gpollableinputstream.h +106 -0
  233. package/include/glib-2.0/gio/gpollableoutputstream.h +127 -0
  234. package/include/glib-2.0/gio/gpollableutils.h +66 -0
  235. package/include/glib-2.0/gio/gpowerprofilemonitor.h +65 -0
  236. package/include/glib-2.0/gio/gpropertyaction.h +49 -0
  237. package/include/glib-2.0/gio/gproxy.h +130 -0
  238. package/include/glib-2.0/gio/gproxyaddress.h +88 -0
  239. package/include/glib-2.0/gio/gproxyaddressenumerator.h +83 -0
  240. package/include/glib-2.0/gio/gproxyresolver.h +97 -0
  241. package/include/glib-2.0/gio/gremoteactiongroup.h +77 -0
  242. package/include/glib-2.0/gio/gresolver.h +299 -0
  243. package/include/glib-2.0/gio/gresource.h +132 -0
  244. package/include/glib-2.0/gio/gseekable.h +105 -0
  245. package/include/glib-2.0/gio/gsettings.h +347 -0
  246. package/include/glib-2.0/gio/gsettingsbackend.h +176 -0
  247. package/include/glib-2.0/gio/gsettingsschema.h +115 -0
  248. package/include/glib-2.0/gio/gsimpleaction.h +65 -0
  249. package/include/glib-2.0/gio/gsimpleactiongroup.h +99 -0
  250. package/include/glib-2.0/gio/gsimpleasyncresult.h +164 -0
  251. package/include/glib-2.0/gio/gsimpleiostream.h +47 -0
  252. package/include/glib-2.0/gio/gsimplepermission.h +47 -0
  253. package/include/glib-2.0/gio/gsimpleproxyresolver.h +91 -0
  254. package/include/glib-2.0/gio/gsocket.h +330 -0
  255. package/include/glib-2.0/gio/gsocketaddress.h +84 -0
  256. package/include/glib-2.0/gio/gsocketaddressenumerator.h +103 -0
  257. package/include/glib-2.0/gio/gsocketclient.h +199 -0
  258. package/include/glib-2.0/gio/gsocketconnectable.h +83 -0
  259. package/include/glib-2.0/gio/gsocketconnection.h +117 -0
  260. package/include/glib-2.0/gio/gsocketcontrolmessage.h +113 -0
  261. package/include/glib-2.0/gio/gsocketlistener.h +157 -0
  262. package/include/glib-2.0/gio/gsocketservice.h +95 -0
  263. package/include/glib-2.0/gio/gsrvtarget.h +60 -0
  264. package/include/glib-2.0/gio/gsubprocess.h +169 -0
  265. package/include/glib-2.0/gio/gsubprocesslauncher.h +121 -0
  266. package/include/glib-2.0/gio/gtask.h +207 -0
  267. package/include/glib-2.0/gio/gtcpconnection.h +71 -0
  268. package/include/glib-2.0/gio/gtcpwrapperconnection.h +71 -0
  269. package/include/glib-2.0/gio/gtestdbus.h +74 -0
  270. package/include/glib-2.0/gio/gthemedicon.h +70 -0
  271. package/include/glib-2.0/gio/gthreadedsocketservice.h +83 -0
  272. package/include/glib-2.0/gio/gtlsbackend.h +115 -0
  273. package/include/glib-2.0/gio/gtlscertificate.h +125 -0
  274. package/include/glib-2.0/gio/gtlsclientconnection.h +88 -0
  275. package/include/glib-2.0/gio/gtlsconnection.h +214 -0
  276. package/include/glib-2.0/gio/gtlsdatabase.h +249 -0
  277. package/include/glib-2.0/gio/gtlsfiledatabase.h +60 -0
  278. package/include/glib-2.0/gio/gtlsinteraction.h +150 -0
  279. package/include/glib-2.0/gio/gtlspassword.h +121 -0
  280. package/include/glib-2.0/gio/gtlsserverconnection.h +71 -0
  281. package/include/glib-2.0/gio/gunixconnection.h +102 -0
  282. package/include/glib-2.0/gio/gunixcredentialsmessage.h +89 -0
  283. package/include/glib-2.0/gio/gunixfdlist.h +97 -0
  284. package/include/glib-2.0/gio/gunixsocketaddress.h +83 -0
  285. package/include/glib-2.0/gio/gvfs.h +170 -0
  286. package/include/glib-2.0/gio/gvolume.h +255 -0
  287. package/include/glib-2.0/gio/gvolumemonitor.h +156 -0
  288. package/include/glib-2.0/gio/gzlibcompressor.h +64 -0
  289. package/include/glib-2.0/gio/gzlibdecompressor.h +60 -0
  290. package/include/glib-2.0/glib/deprecated/gallocator.h +88 -0
  291. package/include/glib-2.0/glib/deprecated/gcache.h +77 -0
  292. package/include/glib-2.0/glib/deprecated/gcompletion.h +85 -0
  293. package/include/glib-2.0/glib/deprecated/gmain.h +137 -0
  294. package/include/glib-2.0/glib/deprecated/grel.h +107 -0
  295. package/include/glib-2.0/glib/deprecated/gthread.h +295 -0
  296. package/include/glib-2.0/glib/galloca.h +147 -0
  297. package/include/glib-2.0/glib/garray.h +323 -0
  298. package/include/glib-2.0/glib/gasyncqueue.h +126 -0
  299. package/include/glib-2.0/glib/gatomic.h +587 -0
  300. package/include/glib-2.0/glib/gbacktrace.h +74 -0
  301. package/include/glib-2.0/glib/gbase64.h +63 -0
  302. package/include/glib-2.0/glib/gbitlock.h +78 -0
  303. package/include/glib-2.0/glib/gbookmarkfile.h +300 -0
  304. package/include/glib-2.0/glib/gbytes.h +99 -0
  305. package/include/glib-2.0/glib/gcharset.h +49 -0
  306. package/include/glib-2.0/glib/gchecksum.h +106 -0
  307. package/include/glib-2.0/glib/gconvert.h +179 -0
  308. package/include/glib-2.0/glib/gdataset.h +156 -0
  309. package/include/glib-2.0/glib/gdate.h +309 -0
  310. package/include/glib-2.0/glib/gdatetime.h +275 -0
  311. package/include/glib-2.0/glib/gdir.h +54 -0
  312. package/include/glib-2.0/glib/genviron.h +65 -0
  313. package/include/glib-2.0/glib/gerror.h +263 -0
  314. package/include/glib-2.0/glib/gfileutils.h +223 -0
  315. package/include/glib-2.0/glib/ggettext.h +65 -0
  316. package/include/glib-2.0/glib/ghash.h +206 -0
  317. package/include/glib-2.0/glib/ghmac.h +85 -0
  318. package/include/glib-2.0/glib/ghook.h +204 -0
  319. package/include/glib-2.0/glib/ghostutils.h +45 -0
  320. package/include/glib-2.0/glib/gi18n-lib.h +38 -0
  321. package/include/glib-2.0/glib/gi18n.h +34 -0
  322. package/include/glib-2.0/glib/giochannel.h +407 -0
  323. package/include/glib-2.0/glib/gkeyfile.h +332 -0
  324. package/include/glib-2.0/glib/glib-autocleanups.h +105 -0
  325. package/include/glib-2.0/glib/glib-typeof.h +47 -0
  326. package/include/glib-2.0/glib/glib-visibility.h +952 -0
  327. package/include/glib-2.0/glib/glist.h +179 -0
  328. package/include/glib-2.0/glib/gmacros.h +1425 -0
  329. package/include/glib-2.0/glib/gmain.h +862 -0
  330. package/include/glib-2.0/glib/gmappedfile.h +60 -0
  331. package/include/glib-2.0/glib/gmarkup.h +265 -0
  332. package/include/glib-2.0/glib/gmem.h +425 -0
  333. package/include/glib-2.0/glib/gmessages.h +690 -0
  334. package/include/glib-2.0/glib/gnode.h +309 -0
  335. package/include/glib-2.0/glib/goption.h +409 -0
  336. package/include/glib-2.0/glib/gpathbuf.h +90 -0
  337. package/include/glib-2.0/glib/gpattern.h +65 -0
  338. package/include/glib-2.0/glib/gpoll.h +122 -0
  339. package/include/glib-2.0/glib/gprimes.h +52 -0
  340. package/include/glib-2.0/glib/gprintf.h +59 -0
  341. package/include/glib-2.0/glib/gqsort.h +47 -0
  342. package/include/glib-2.0/glib/gquark.h +70 -0
  343. package/include/glib-2.0/glib/gqueue.h +205 -0
  344. package/include/glib-2.0/glib/grand.h +101 -0
  345. package/include/glib-2.0/glib/grcbox.h +91 -0
  346. package/include/glib-2.0/glib/grefcount.h +179 -0
  347. package/include/glib-2.0/glib/grefstring.h +59 -0
  348. package/include/glib-2.0/glib/gscanner.h +301 -0
  349. package/include/glib-2.0/glib/gsequence.h +175 -0
  350. package/include/glib-2.0/glib/gshell.h +59 -0
  351. package/include/glib-2.0/glib/gslice.h +117 -0
  352. package/include/glib-2.0/glib/gslist.h +166 -0
  353. package/include/glib-2.0/glib/gspawn.h +323 -0
  354. package/include/glib-2.0/glib/gstdio.h +231 -0
  355. package/include/glib-2.0/glib/gstrfuncs.h +504 -0
  356. package/include/glib-2.0/glib/gstring.h +296 -0
  357. package/include/glib-2.0/glib/gstringchunk.h +59 -0
  358. package/include/glib-2.0/glib/gstrvbuilder.h +69 -0
  359. package/include/glib-2.0/glib/gtestutils.h +763 -0
  360. package/include/glib-2.0/glib/gthread.h +603 -0
  361. package/include/glib-2.0/glib/gthreadpool.h +105 -0
  362. package/include/glib-2.0/glib/gtimer.h +80 -0
  363. package/include/glib-2.0/glib/gtimezone.h +98 -0
  364. package/include/glib-2.0/glib/gtrashstack.h +60 -0
  365. package/include/glib-2.0/glib/gtree.h +181 -0
  366. package/include/glib-2.0/glib/gtypes.h +591 -0
  367. package/include/glib-2.0/glib/gunicode.h +974 -0
  368. package/include/glib-2.0/glib/guri.h +420 -0
  369. package/include/glib-2.0/glib/gutils.h +479 -0
  370. package/include/glib-2.0/glib/guuid.h +42 -0
  371. package/include/glib-2.0/glib/gvariant.h +541 -0
  372. package/include/glib-2.0/glib/gvarianttype.h +384 -0
  373. package/include/glib-2.0/glib/gversion.h +57 -0
  374. package/include/glib-2.0/glib/gversionmacros.h +490 -0
  375. package/include/glib-2.0/glib/gwin32.h +142 -0
  376. package/include/glib-2.0/glib-object.h +46 -0
  377. package/include/glib-2.0/glib-unix.h +125 -0
  378. package/include/glib-2.0/glib.h +121 -0
  379. package/include/glib-2.0/gmodule/gmodule-visibility.h +952 -0
  380. package/include/glib-2.0/gmodule.h +147 -0
  381. package/include/glib-2.0/gobject/gbinding.h +156 -0
  382. package/include/glib-2.0/gobject/gbindinggroup.h +85 -0
  383. package/include/glib-2.0/gobject/gboxed.h +124 -0
  384. package/include/glib-2.0/gobject/gclosure.h +323 -0
  385. package/include/glib-2.0/gobject/genums.h +381 -0
  386. package/include/glib-2.0/gobject/glib-enumtypes.h +25 -0
  387. package/include/glib-2.0/gobject/glib-types.h +400 -0
  388. package/include/glib-2.0/gobject/gmarshal.h +434 -0
  389. package/include/glib-2.0/gobject/gobject-autocleanups.h +33 -0
  390. package/include/glib-2.0/gobject/gobject-visibility.h +952 -0
  391. package/include/glib-2.0/gobject/gobject.h +953 -0
  392. package/include/glib-2.0/gobject/gobjectnotifyqueue.c +199 -0
  393. package/include/glib-2.0/gobject/gparam.h +476 -0
  394. package/include/glib-2.0/gobject/gparamspecs.h +1151 -0
  395. package/include/glib-2.0/gobject/gsignal.h +647 -0
  396. package/include/glib-2.0/gobject/gsignalgroup.h +98 -0
  397. package/include/glib-2.0/gobject/gsourceclosure.h +40 -0
  398. package/include/glib-2.0/gobject/gtype.h +2703 -0
  399. package/include/glib-2.0/gobject/gtypemodule.h +302 -0
  400. package/include/glib-2.0/gobject/gtypeplugin.h +136 -0
  401. package/include/glib-2.0/gobject/gvalue.h +212 -0
  402. package/include/glib-2.0/gobject/gvaluearray.h +106 -0
  403. package/include/glib-2.0/gobject/gvaluecollector.h +290 -0
  404. package/include/glib-2.0/gobject/gvaluetypes.h +318 -0
  405. package/include/harfbuzz/hb-aat-layout.h +795 -0
  406. package/include/harfbuzz/hb-aat.h +38 -0
  407. package/include/harfbuzz/hb-blob.h +160 -0
  408. package/include/harfbuzz/hb-buffer.h +799 -0
  409. package/include/harfbuzz/hb-common.h +938 -0
  410. package/include/harfbuzz/hb-cplusplus.hh +223 -0
  411. package/include/harfbuzz/hb-deprecated.h +309 -0
  412. package/include/harfbuzz/hb-draw.h +340 -0
  413. package/include/harfbuzz/hb-face.h +187 -0
  414. package/include/harfbuzz/hb-features.h +119 -0
  415. package/include/harfbuzz/hb-font.h +1153 -0
  416. package/include/harfbuzz/hb-ft.h +145 -0
  417. package/include/harfbuzz/hb-glib.h +56 -0
  418. package/include/harfbuzz/hb-map.h +143 -0
  419. package/include/harfbuzz/hb-ot-color.h +155 -0
  420. package/include/harfbuzz/hb-ot-deprecated.h +147 -0
  421. package/include/harfbuzz/hb-ot-font.h +45 -0
  422. package/include/harfbuzz/hb-ot-layout.h +549 -0
  423. package/include/harfbuzz/hb-ot-math.h +333 -0
  424. package/include/harfbuzz/hb-ot-meta.h +72 -0
  425. package/include/harfbuzz/hb-ot-metrics.h +129 -0
  426. package/include/harfbuzz/hb-ot-name.h +164 -0
  427. package/include/harfbuzz/hb-ot-shape.h +53 -0
  428. package/include/harfbuzz/hb-ot-var.h +191 -0
  429. package/include/harfbuzz/hb-ot.h +49 -0
  430. package/include/harfbuzz/hb-paint.h +1029 -0
  431. package/include/harfbuzz/hb-set.h +203 -0
  432. package/include/harfbuzz/hb-shape-plan.h +122 -0
  433. package/include/harfbuzz/hb-shape.h +74 -0
  434. package/include/harfbuzz/hb-style.h +81 -0
  435. package/include/harfbuzz/hb-subset-repacker.h +81 -0
  436. package/include/harfbuzz/hb-subset.h +241 -0
  437. package/include/harfbuzz/hb-unicode.h +643 -0
  438. package/include/harfbuzz/hb-version.h +95 -0
  439. package/include/harfbuzz/hb.h +51 -0
  440. package/include/index.js +1 -0
  441. package/include/jconfig.h +37 -0
  442. package/include/jerror.h +335 -0
  443. package/include/jmorecfg.h +382 -0
  444. package/include/jpeglib.h +1210 -0
  445. package/include/lcms2.h +1958 -0
  446. package/include/lcms2_plugin.h +700 -0
  447. package/include/libexif/_stdint.h +2 -0
  448. package/include/libexif/exif-byte-order.h +48 -0
  449. package/include/libexif/exif-content.h +181 -0
  450. package/include/libexif/exif-data-type.h +46 -0
  451. package/include/libexif/exif-data.h +267 -0
  452. package/include/libexif/exif-entry.h +186 -0
  453. package/include/libexif/exif-format.h +65 -0
  454. package/include/libexif/exif-ifd.h +51 -0
  455. package/include/libexif/exif-loader.h +128 -0
  456. package/include/libexif/exif-log.h +116 -0
  457. package/include/libexif/exif-mem.h +91 -0
  458. package/include/libexif/exif-mnote-data.h +122 -0
  459. package/include/libexif/exif-tag.h +307 -0
  460. package/include/libexif/exif-utils.h +194 -0
  461. package/include/libheif/heif.h +2092 -0
  462. package/include/libheif/heif_cxx.h +1359 -0
  463. package/include/libheif/heif_plugin.h +306 -0
  464. package/include/libheif/heif_version.h +38 -0
  465. package/include/libimagequant.h +111 -0
  466. package/include/libpng16/png.h +3247 -0
  467. package/include/libpng16/pngconf.h +623 -0
  468. package/include/libpng16/pnglibconf.h +219 -0
  469. package/include/librsvg-2.0/librsvg/rsvg-cairo.h +395 -0
  470. package/include/librsvg-2.0/librsvg/rsvg-features.h +184 -0
  471. package/include/librsvg-2.0/librsvg/rsvg-version.h +13 -0
  472. package/include/librsvg-2.0/librsvg/rsvg.h +1456 -0
  473. package/include/libxml2/libxml/HTMLparser.h +320 -0
  474. package/include/libxml2/libxml/HTMLtree.h +147 -0
  475. package/include/libxml2/libxml/SAX.h +204 -0
  476. package/include/libxml2/libxml/SAX2.h +173 -0
  477. package/include/libxml2/libxml/c14n.h +128 -0
  478. package/include/libxml2/libxml/catalog.h +182 -0
  479. package/include/libxml2/libxml/chvalid.h +230 -0
  480. package/include/libxml2/libxml/debugXML.h +217 -0
  481. package/include/libxml2/libxml/dict.h +81 -0
  482. package/include/libxml2/libxml/encoding.h +233 -0
  483. package/include/libxml2/libxml/entities.h +151 -0
  484. package/include/libxml2/libxml/globals.h +529 -0
  485. package/include/libxml2/libxml/hash.h +236 -0
  486. package/include/libxml2/libxml/list.h +137 -0
  487. package/include/libxml2/libxml/nanoftp.h +186 -0
  488. package/include/libxml2/libxml/nanohttp.h +81 -0
  489. package/include/libxml2/libxml/parser.h +1265 -0
  490. package/include/libxml2/libxml/parserInternals.h +662 -0
  491. package/include/libxml2/libxml/pattern.h +100 -0
  492. package/include/libxml2/libxml/relaxng.h +218 -0
  493. package/include/libxml2/libxml/schemasInternals.h +958 -0
  494. package/include/libxml2/libxml/schematron.h +142 -0
  495. package/include/libxml2/libxml/threads.h +94 -0
  496. package/include/libxml2/libxml/tree.h +1314 -0
  497. package/include/libxml2/libxml/uri.h +94 -0
  498. package/include/libxml2/libxml/valid.h +448 -0
  499. package/include/libxml2/libxml/xinclude.h +129 -0
  500. package/include/libxml2/libxml/xlink.h +189 -0
  501. package/include/libxml2/libxml/xmlIO.h +369 -0
  502. package/include/libxml2/libxml/xmlautomata.h +146 -0
  503. package/include/libxml2/libxml/xmlerror.h +919 -0
  504. package/include/libxml2/libxml/xmlexports.h +50 -0
  505. package/include/libxml2/libxml/xmlmemory.h +228 -0
  506. package/include/libxml2/libxml/xmlmodule.h +57 -0
  507. package/include/libxml2/libxml/xmlreader.h +428 -0
  508. package/include/libxml2/libxml/xmlregexp.h +222 -0
  509. package/include/libxml2/libxml/xmlsave.h +88 -0
  510. package/include/libxml2/libxml/xmlschemas.h +246 -0
  511. package/include/libxml2/libxml/xmlschemastypes.h +152 -0
  512. package/include/libxml2/libxml/xmlstring.h +140 -0
  513. package/include/libxml2/libxml/xmlunicode.h +202 -0
  514. package/include/libxml2/libxml/xmlversion.h +526 -0
  515. package/include/libxml2/libxml/xmlwriter.h +488 -0
  516. package/include/libxml2/libxml/xpath.h +575 -0
  517. package/include/libxml2/libxml/xpathInternals.h +632 -0
  518. package/include/libxml2/libxml/xpointer.h +137 -0
  519. package/include/orc-0.4/orc/orc-stdint.h +1 -0
  520. package/include/orc-0.4/orc/orc.h +16 -0
  521. package/include/orc-0.4/orc/orcarm.h +879 -0
  522. package/include/orc-0.4/orc/orcbytecode.h +35 -0
  523. package/include/orc-0.4/orc/orcbytecodes.h +255 -0
  524. package/include/orc-0.4/orc/orccode.h +53 -0
  525. package/include/orc-0.4/orc/orccompiler.h +176 -0
  526. package/include/orc-0.4/orc/orcconstant.h +39 -0
  527. package/include/orc-0.4/orc/orccpu.h +21 -0
  528. package/include/orc-0.4/orc/orccpuinsn.h +40 -0
  529. package/include/orc-0.4/orc/orcdebug.h +158 -0
  530. package/include/orc-0.4/orc/orcemulateopcodes.h +203 -0
  531. package/include/orc-0.4/orc/orcexecutor.h +135 -0
  532. package/include/orc-0.4/orc/orcfunctions.h +93 -0
  533. package/include/orc-0.4/orc/orcinstruction.h +39 -0
  534. package/include/orc-0.4/orc/orcinternal.h +46 -0
  535. package/include/orc-0.4/orc/orclimits.h +94 -0
  536. package/include/orc-0.4/orc/orcmips.h +229 -0
  537. package/include/orc-0.4/orc/orcmmx.h +79 -0
  538. package/include/orc-0.4/orc/orcneon.h +43 -0
  539. package/include/orc-0.4/orc/orconce.h +166 -0
  540. package/include/orc-0.4/orc/orcopcode.h +63 -0
  541. package/include/orc-0.4/orc/orcparse.h +27 -0
  542. package/include/orc-0.4/orc/orcpowerpc.h +209 -0
  543. package/include/orc-0.4/orc/orcprogram.h +192 -0
  544. package/include/orc-0.4/orc/orcrule.h +52 -0
  545. package/include/orc-0.4/orc/orcsse.h +55 -0
  546. package/include/orc-0.4/orc/orctarget.h +115 -0
  547. package/include/orc-0.4/orc/orcutils.h +238 -0
  548. package/include/orc-0.4/orc/orcvariable.h +81 -0
  549. package/include/orc-0.4/orc/orcx86.h +199 -0
  550. package/include/orc-0.4/orc/orcx86insn.h +672 -0
  551. package/include/pango-1.0/pango/pango-attributes.h +748 -0
  552. package/include/pango-1.0/pango/pango-bidi-type.h +117 -0
  553. package/include/pango-1.0/pango/pango-break.h +144 -0
  554. package/include/pango-1.0/pango/pango-color.h +75 -0
  555. package/include/pango-1.0/pango/pango-context.h +116 -0
  556. package/include/pango-1.0/pango/pango-coverage.h +108 -0
  557. package/include/pango-1.0/pango/pango-direction.h +72 -0
  558. package/include/pango-1.0/pango/pango-engine.h +457 -0
  559. package/include/pango-1.0/pango/pango-enum-types.h +120 -0
  560. package/include/pango-1.0/pango/pango-features.h +10 -0
  561. package/include/pango-1.0/pango/pango-font.h +699 -0
  562. package/include/pango-1.0/pango/pango-fontmap.h +132 -0
  563. package/include/pango-1.0/pango/pango-fontset-simple.h +64 -0
  564. package/include/pango-1.0/pango/pango-fontset.h +134 -0
  565. package/include/pango-1.0/pango/pango-glyph-item.h +175 -0
  566. package/include/pango-1.0/pango/pango-glyph.h +270 -0
  567. package/include/pango-1.0/pango/pango-gravity.h +137 -0
  568. package/include/pango-1.0/pango/pango-item.h +165 -0
  569. package/include/pango-1.0/pango/pango-language.h +70 -0
  570. package/include/pango-1.0/pango/pango-layout.h +554 -0
  571. package/include/pango-1.0/pango/pango-markup.h +52 -0
  572. package/include/pango-1.0/pango/pango-matrix.h +130 -0
  573. package/include/pango-1.0/pango/pango-modules.h +84 -0
  574. package/include/pango-1.0/pango/pango-ot.h +427 -0
  575. package/include/pango-1.0/pango/pango-renderer.h +290 -0
  576. package/include/pango-1.0/pango/pango-script.h +335 -0
  577. package/include/pango-1.0/pango/pango-tabs.h +117 -0
  578. package/include/pango-1.0/pango/pango-types.h +244 -0
  579. package/include/pango-1.0/pango/pango-utils.h +187 -0
  580. package/include/pango-1.0/pango/pango-version-macros.h +756 -0
  581. package/include/pango-1.0/pango/pango.h +54 -0
  582. package/include/pango-1.0/pango/pangocairo.h +220 -0
  583. package/include/pango-1.0/pango/pangofc-decoder.h +122 -0
  584. package/include/pango-1.0/pango/pangofc-font.h +120 -0
  585. package/include/pango-1.0/pango/pangofc-fontmap.h +244 -0
  586. package/include/pango-1.0/pango/pangoft2.h +158 -0
  587. package/include/pixman-1/pixman-version.h +54 -0
  588. package/include/pixman-1/pixman.h +1419 -0
  589. package/include/png.h +3247 -0
  590. package/include/pngconf.h +623 -0
  591. package/include/pnglibconf.h +219 -0
  592. package/include/spng.h +537 -0
  593. package/include/tiff.h +899 -0
  594. package/include/tiffconf.h +145 -0
  595. package/include/tiffio.h +653 -0
  596. package/include/tiffvers.h +36 -0
  597. package/include/vips/VConnection8.h +150 -0
  598. package/include/vips/VError8.h +76 -0
  599. package/include/vips/VImage8.h +6065 -0
  600. package/include/vips/VInterpolate8.h +77 -0
  601. package/include/vips/VRegion8.h +155 -0
  602. package/include/vips/arithmetic.h +571 -0
  603. package/include/vips/basic.h +113 -0
  604. package/include/vips/buf.h +118 -0
  605. package/include/vips/colour.h +306 -0
  606. package/include/vips/connection.h +570 -0
  607. package/include/vips/conversion.h +357 -0
  608. package/include/vips/convolution.h +95 -0
  609. package/include/vips/create.h +161 -0
  610. package/include/vips/dbuf.h +103 -0
  611. package/include/vips/debug.h +74 -0
  612. package/include/vips/draw.h +113 -0
  613. package/include/vips/enumtypes.h +181 -0
  614. package/include/vips/error.h +142 -0
  615. package/include/vips/foreign.h +993 -0
  616. package/include/vips/format.h +135 -0
  617. package/include/vips/freqfilt.h +64 -0
  618. package/include/vips/gate.h +82 -0
  619. package/include/vips/generate.h +92 -0
  620. package/include/vips/header.h +312 -0
  621. package/include/vips/histogram.h +85 -0
  622. package/include/vips/image.h +605 -0
  623. package/include/vips/interpolate.h +141 -0
  624. package/include/vips/memory.h +96 -0
  625. package/include/vips/morphology.h +73 -0
  626. package/include/vips/mosaicing.h +80 -0
  627. package/include/vips/object.h +706 -0
  628. package/include/vips/operation.h +182 -0
  629. package/include/vips/private.h +227 -0
  630. package/include/vips/rect.h +80 -0
  631. package/include/vips/region.h +238 -0
  632. package/include/vips/resample.h +123 -0
  633. package/include/vips/sbuf.h +144 -0
  634. package/include/vips/semaphore.h +77 -0
  635. package/include/vips/thread.h +72 -0
  636. package/include/vips/threadpool.h +160 -0
  637. package/include/vips/transform.h +89 -0
  638. package/include/vips/type.h +305 -0
  639. package/include/vips/util.h +406 -0
  640. package/include/vips/vector.h +183 -0
  641. package/include/vips/version.h +26 -0
  642. package/include/vips/vips.h +194 -0
  643. package/include/vips/vips8 +60 -0
  644. package/include/webp/decode.h +504 -0
  645. package/include/webp/demux.h +363 -0
  646. package/include/webp/encode.h +552 -0
  647. package/include/webp/mux.h +530 -0
  648. package/include/webp/mux_types.h +98 -0
  649. package/include/webp/sharpyuv/sharpyuv.h +103 -0
  650. package/include/webp/sharpyuv/sharpyuv_csp.h +60 -0
  651. package/include/webp/types.h +72 -0
  652. package/include/zconf.h +203 -0
  653. package/include/zlib.h +1855 -0
  654. package/include/zlib_name_mangling.h +8 -0
  655. package/package.json +30 -0
  656. package/versions.json +31 -0
@@ -0,0 +1,2092 @@
1
+ /*
2
+ * HEIF codec.
3
+ * Copyright (c) 2017 struktur AG, Dirk Farin <farin@struktur.de>
4
+ *
5
+ * This file is part of libheif.
6
+ *
7
+ * libheif is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as
9
+ * published by the Free Software Foundation, either version 3 of
10
+ * the License, or (at your option) any later version.
11
+ *
12
+ * libheif is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with libheif. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #ifndef LIBHEIF_HEIF_H
22
+ #define LIBHEIF_HEIF_H
23
+
24
+ #ifdef __cplusplus
25
+ extern "C" {
26
+ #endif
27
+
28
+ #include <stddef.h>
29
+ #include <stdint.h>
30
+
31
+ #include <libheif/heif_version.h>
32
+
33
+
34
+ // API versions table
35
+ //
36
+ // release dec.options enc.options heif_reader heif_writer depth.rep col.profile
37
+ // ------------------------------------------------------------------------------------------
38
+ // 1.0 1 N/A N/A N/A 1 N/A
39
+ // 1.1 1 N/A N/A 1 1 N/A
40
+ // 1.3 1 1 1 1 1 N/A
41
+ // 1.4 1 1 1 1 1 1
42
+ // 1.7 2 1 1 1 1 1
43
+ // 1.9.2 2 2 1 1 1 1
44
+ // 1.10 2 3 1 1 1 1
45
+ // 1.11 2 4 1 1 1 1
46
+ // 1.13 3 4 1 1 1 1
47
+ // 1.14 3 5 1 1 1 1
48
+ // 1.15 4 5 1 1 1 1
49
+ // 1.16 5 6 1 1 1 1
50
+
51
+ #if defined(_MSC_VER) && !defined(LIBHEIF_STATIC_BUILD)
52
+ #ifdef LIBHEIF_EXPORTS
53
+ #define LIBHEIF_API __declspec(dllexport)
54
+ #else
55
+ #define LIBHEIF_API __declspec(dllimport)
56
+ #endif
57
+ #elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
58
+ #ifdef LIBHEIF_EXPORTS
59
+ #define LIBHEIF_API __attribute__((__visibility__("default")))
60
+ #else
61
+ #define LIBHEIF_API
62
+ #endif
63
+ #else
64
+ #define LIBHEIF_API
65
+ #endif
66
+
67
+ #define heif_fourcc(a, b, c, d) ((uint32_t)((a<<24) | (b<<16) | (c<<8) | d))
68
+
69
+
70
+ /* === version numbers === */
71
+
72
+ // Version string of linked libheif library.
73
+ LIBHEIF_API const char* heif_get_version(void);
74
+
75
+ // Numeric version of linked libheif library, encoded as BCD 0xHHMMLL00 = HH.MM.LL.
76
+ // For example: 0x02143000 is version 2.14.30
77
+ LIBHEIF_API uint32_t heif_get_version_number(void);
78
+
79
+ // Numeric part "HH" from above. Returned as a decimal number (not BCD).
80
+ LIBHEIF_API int heif_get_version_number_major(void);
81
+ // Numeric part "MM" from above. Returned as a decimal number (not BCD).
82
+ LIBHEIF_API int heif_get_version_number_minor(void);
83
+ // Numeric part "LL" from above. Returned as a decimal number (not BCD).
84
+ LIBHEIF_API int heif_get_version_number_maintenance(void);
85
+
86
+ // Helper macros to check for given versions of libheif at compile time.
87
+ // Note: h, m, l should be 2-digit BCD numbers. I.e., decimal 17 = 0x17 (BCD)
88
+ #define LIBHEIF_MAKE_VERSION(h, m, l) ((h) << 24 | (m) << 16 | (l) << 8)
89
+ #define LIBHEIF_HAVE_VERSION(h, m, l) (LIBHEIF_NUMERIC_VERSION >= LIBHEIF_MAKE_VERSION(h, m, l))
90
+
91
+ struct heif_context;
92
+ struct heif_image_handle;
93
+ struct heif_image;
94
+
95
+
96
+ enum heif_error_code
97
+ {
98
+ // Everything ok, no error occurred.
99
+ heif_error_Ok = 0,
100
+
101
+ // Input file does not exist.
102
+ heif_error_Input_does_not_exist = 1,
103
+
104
+ // Error in input file. Corrupted or invalid content.
105
+ heif_error_Invalid_input = 2,
106
+
107
+ // Input file type is not supported.
108
+ heif_error_Unsupported_filetype = 3,
109
+
110
+ // Image requires an unsupported decoder feature.
111
+ heif_error_Unsupported_feature = 4,
112
+
113
+ // Library API has been used in an invalid way.
114
+ heif_error_Usage_error = 5,
115
+
116
+ // Could not allocate enough memory.
117
+ heif_error_Memory_allocation_error = 6,
118
+
119
+ // The decoder plugin generated an error
120
+ heif_error_Decoder_plugin_error = 7,
121
+
122
+ // The encoder plugin generated an error
123
+ heif_error_Encoder_plugin_error = 8,
124
+
125
+ // Error during encoding or when writing to the output
126
+ heif_error_Encoding_error = 9,
127
+
128
+ // Application has asked for a color profile type that does not exist
129
+ heif_error_Color_profile_does_not_exist = 10,
130
+
131
+ // Error loading a dynamic plugin
132
+ heif_error_Plugin_loading_error = 11
133
+ };
134
+
135
+
136
+ enum heif_suberror_code
137
+ {
138
+ // no further information available
139
+ heif_suberror_Unspecified = 0,
140
+
141
+ // --- Invalid_input ---
142
+
143
+ // End of data reached unexpectedly.
144
+ heif_suberror_End_of_data = 100,
145
+
146
+ // Size of box (defined in header) is wrong
147
+ heif_suberror_Invalid_box_size = 101,
148
+
149
+ // Mandatory 'ftyp' box is missing
150
+ heif_suberror_No_ftyp_box = 102,
151
+
152
+ heif_suberror_No_idat_box = 103,
153
+
154
+ heif_suberror_No_meta_box = 104,
155
+
156
+ heif_suberror_No_hdlr_box = 105,
157
+
158
+ heif_suberror_No_hvcC_box = 106,
159
+
160
+ heif_suberror_No_pitm_box = 107,
161
+
162
+ heif_suberror_No_ipco_box = 108,
163
+
164
+ heif_suberror_No_ipma_box = 109,
165
+
166
+ heif_suberror_No_iloc_box = 110,
167
+
168
+ heif_suberror_No_iinf_box = 111,
169
+
170
+ heif_suberror_No_iprp_box = 112,
171
+
172
+ heif_suberror_No_iref_box = 113,
173
+
174
+ heif_suberror_No_pict_handler = 114,
175
+
176
+ // An item property referenced in the 'ipma' box is not existing in the 'ipco' container.
177
+ heif_suberror_Ipma_box_references_nonexisting_property = 115,
178
+
179
+ // No properties have been assigned to an item.
180
+ heif_suberror_No_properties_assigned_to_item = 116,
181
+
182
+ // Image has no (compressed) data
183
+ heif_suberror_No_item_data = 117,
184
+
185
+ // Invalid specification of image grid (tiled image)
186
+ heif_suberror_Invalid_grid_data = 118,
187
+
188
+ // Tile-images in a grid image are missing
189
+ heif_suberror_Missing_grid_images = 119,
190
+
191
+ heif_suberror_Invalid_clean_aperture = 120,
192
+
193
+ // Invalid specification of overlay image
194
+ heif_suberror_Invalid_overlay_data = 121,
195
+
196
+ // Overlay image completely outside of visible canvas area
197
+ heif_suberror_Overlay_image_outside_of_canvas = 122,
198
+
199
+ heif_suberror_Auxiliary_image_type_unspecified = 123,
200
+
201
+ heif_suberror_No_or_invalid_primary_item = 124,
202
+
203
+ heif_suberror_No_infe_box = 125,
204
+
205
+ heif_suberror_Unknown_color_profile_type = 126,
206
+
207
+ heif_suberror_Wrong_tile_image_chroma_format = 127,
208
+
209
+ heif_suberror_Invalid_fractional_number = 128,
210
+
211
+ heif_suberror_Invalid_image_size = 129,
212
+
213
+ heif_suberror_Invalid_pixi_box = 130,
214
+
215
+ heif_suberror_No_av1C_box = 131,
216
+
217
+ heif_suberror_Wrong_tile_image_pixel_depth = 132,
218
+
219
+ heif_suberror_Unknown_NCLX_color_primaries = 133,
220
+
221
+ heif_suberror_Unknown_NCLX_transfer_characteristics = 134,
222
+
223
+ heif_suberror_Unknown_NCLX_matrix_coefficients = 135,
224
+
225
+ // Invalid specification of region item
226
+ heif_suberror_Invalid_region_data = 136,
227
+
228
+
229
+ // --- Memory_allocation_error ---
230
+
231
+ // A security limit preventing unreasonable memory allocations was exceeded by the input file.
232
+ // Please check whether the file is valid. If it is, contact us so that we could increase the
233
+ // security limits further.
234
+ heif_suberror_Security_limit_exceeded = 1000,
235
+
236
+
237
+ // --- Usage_error ---
238
+
239
+ // An item ID was used that is not present in the file.
240
+ heif_suberror_Nonexisting_item_referenced = 2000, // also used for Invalid_input
241
+
242
+ // An API argument was given a NULL pointer, which is not allowed for that function.
243
+ heif_suberror_Null_pointer_argument = 2001,
244
+
245
+ // Image channel referenced that does not exist in the image
246
+ heif_suberror_Nonexisting_image_channel_referenced = 2002,
247
+
248
+ // The version of the passed plugin is not supported.
249
+ heif_suberror_Unsupported_plugin_version = 2003,
250
+
251
+ // The version of the passed writer is not supported.
252
+ heif_suberror_Unsupported_writer_version = 2004,
253
+
254
+ // The given (encoder) parameter name does not exist.
255
+ heif_suberror_Unsupported_parameter = 2005,
256
+
257
+ // The value for the given parameter is not in the valid range.
258
+ heif_suberror_Invalid_parameter_value = 2006,
259
+
260
+ // Error in property specification
261
+ heif_suberror_Invalid_property = 2007,
262
+
263
+ // Image reference cycle found in iref
264
+ heif_suberror_Item_reference_cycle = 2008,
265
+
266
+
267
+ // --- Unsupported_feature ---
268
+
269
+ // Image was coded with an unsupported compression method.
270
+ heif_suberror_Unsupported_codec = 3000,
271
+
272
+ // Image is specified in an unknown way, e.g. as tiled grid image (which is supported)
273
+ heif_suberror_Unsupported_image_type = 3001,
274
+
275
+ heif_suberror_Unsupported_data_version = 3002,
276
+
277
+ // The conversion of the source image to the requested chroma / colorspace is not supported.
278
+ heif_suberror_Unsupported_color_conversion = 3003,
279
+
280
+ heif_suberror_Unsupported_item_construction_method = 3004,
281
+
282
+ heif_suberror_Unsupported_header_compression_method = 3005,
283
+
284
+
285
+ // --- Encoder_plugin_error ---
286
+
287
+ heif_suberror_Unsupported_bit_depth = 4000,
288
+
289
+
290
+ // --- Encoding_error ---
291
+
292
+ heif_suberror_Cannot_write_output_data = 5000,
293
+
294
+ heif_suberror_Encoder_initialization = 5001,
295
+ heif_suberror_Encoder_encoding = 5002,
296
+ heif_suberror_Encoder_cleanup = 5003,
297
+
298
+ heif_suberror_Too_many_regions = 5004,
299
+
300
+
301
+ // --- Plugin loading error ---
302
+
303
+ heif_suberror_Plugin_loading_error = 6000, // a specific plugin file cannot be loaded
304
+ heif_suberror_Plugin_is_not_loaded = 6001, // trying to remove a plugin that is not loaded
305
+ heif_suberror_Cannot_read_plugin_directory = 6002 // error while scanning the directory for plugins
306
+ };
307
+
308
+
309
+ struct heif_error
310
+ {
311
+ // main error category
312
+ enum heif_error_code code;
313
+
314
+ // more detailed error code
315
+ enum heif_suberror_code subcode;
316
+
317
+ // textual error message (is always defined, you do not have to check for NULL)
318
+ const char* message;
319
+ };
320
+
321
+
322
+ typedef uint32_t heif_item_id;
323
+ typedef uint32_t heif_property_id;
324
+
325
+
326
+
327
+ // ========================= library initialization ======================
328
+
329
+ // You should call heif_init() when you start using libheif and heif_deinit() when you are finished.
330
+ // These calls are reference counted. Each call to heif_init() should be matched by one call to heif_deinit().
331
+ // For backwards compatibility, it is not really necessary to call heif_init(), but if you don't, the plugins
332
+ // registered by default may not be freed correctly.
333
+ // However, this should not be mixed, i.e. one part of your program does use heif_init()/heif_deinit() and another doesn't.
334
+ // If in doubt, enclose everything with init/deinit.
335
+
336
+ struct heif_init_params
337
+ {
338
+ int version;
339
+
340
+ // currently no parameters
341
+ };
342
+
343
+
344
+ // You may pass nullptr to get default parameters. Currently, no parameters are supported.
345
+ LIBHEIF_API
346
+ struct heif_error heif_init(struct heif_init_params*);
347
+
348
+ LIBHEIF_API
349
+ void heif_deinit();
350
+
351
+
352
+ // --- Plugins are currently only supported on Unix platforms.
353
+
354
+ enum heif_plugin_type
355
+ {
356
+ heif_plugin_type_encoder,
357
+ heif_plugin_type_decoder
358
+ };
359
+
360
+ struct heif_plugin_info
361
+ {
362
+ int version; // version of this info struct
363
+ enum heif_plugin_type type;
364
+ const void* plugin;
365
+ void* internal_handle; // for internal use only
366
+ };
367
+
368
+ LIBHEIF_API
369
+ struct heif_error heif_load_plugin(const char* filename, struct heif_plugin_info const** out_plugin);
370
+
371
+ LIBHEIF_API
372
+ struct heif_error heif_load_plugins(const char* directory,
373
+ const struct heif_plugin_info** out_plugins,
374
+ int* out_nPluginsLoaded,
375
+ int output_array_size);
376
+
377
+ LIBHEIF_API
378
+ struct heif_error heif_unload_plugin(const struct heif_plugin_info* plugin);
379
+
380
+
381
+ // ========================= file type check ======================
382
+
383
+ enum heif_filetype_result
384
+ {
385
+ heif_filetype_no,
386
+ heif_filetype_yes_supported, // it is heif and can be read by libheif
387
+ heif_filetype_yes_unsupported, // it is heif, but cannot be read by libheif
388
+ heif_filetype_maybe // not sure whether it is an heif, try detection with more input data
389
+ };
390
+
391
+ // input data should be at least 12 bytes
392
+ LIBHEIF_API
393
+ enum heif_filetype_result heif_check_filetype(const uint8_t* data, int len);
394
+
395
+ LIBHEIF_API
396
+ int heif_check_jpeg_filetype(const uint8_t* data, int len);
397
+
398
+
399
+ // DEPRECATED, use heif_brand2 and the heif_brand2_* constants below instead
400
+ enum heif_brand
401
+ {
402
+ heif_unknown_brand,
403
+ heif_heic, // HEIF image with h265
404
+ heif_heix, // 10bit images, or anything that uses h265 with range extension
405
+ heif_hevc, heif_hevx, // brands for image sequences
406
+ heif_heim, // multiview
407
+ heif_heis, // scalable
408
+ heif_hevm, // multiview sequence
409
+ heif_hevs, // scalable sequence
410
+ heif_mif1, // image, any coding algorithm
411
+ heif_msf1, // sequence, any coding algorithm
412
+ heif_avif, // HEIF image with AV1
413
+ heif_avis,
414
+ heif_vvic, // VVC image
415
+ heif_vvis, // VVC sequence
416
+ heif_evbi, // EVC image
417
+ heif_evbs, // EVC sequence
418
+ };
419
+
420
+ // input data should be at least 12 bytes
421
+ // DEPRECATED, use heif_read_main_brand() instead
422
+ LIBHEIF_API
423
+ enum heif_brand heif_main_brand(const uint8_t* data, int len);
424
+
425
+
426
+ typedef uint32_t heif_brand2;
427
+
428
+ #define heif_brand2_heic heif_fourcc('h','e','i','c') // HEIF image with h265
429
+ #define heif_brand2_heix heif_fourcc('h','e','i','x') // 10bit images, or anything that uses h265 with range extension
430
+ #define heif_brand2_hevc heif_fourcc('h','e','v','c') // image sequences
431
+ #define heif_brand2_hevx heif_fourcc('h','e','v','x') // HDR image sequence
432
+ #define heif_brand2_heim heif_fourcc('h','e','i','m') // multiview
433
+ #define heif_brand2_heis heif_fourcc('h','e','i','s') // scalable
434
+ #define heif_brand2_hevm heif_fourcc('h','e','v','m') // multiview sequence
435
+ #define heif_brand2_hevs heif_fourcc('h','e','v','s') // scalable sequence
436
+ #define heif_brand2_avif heif_fourcc('a','v','i','f') // AVIF image (AV1)
437
+ #define heif_brand2_avis heif_fourcc('a','v','i','s') // AVIF sequence
438
+ #define heif_brand2_mif1 heif_fourcc('m','i','f','1') // image, any coding algorithm
439
+ #define heif_brand2_mif2 heif_fourcc('m','i','f','2') // image, any coding algorithm
440
+ #define heif_brand2_msf1 heif_fourcc('m','s','f','1') // sequence, any coding algorithm
441
+ #define heif_brand2_vvic heif_fourcc('v','v','i','c') // VVC image
442
+ #define heif_brand2_vvis heif_fourcc('v','v','i','s') // VVC sequence
443
+ #define heif_brand2_evbi heif_fourcc('e','v','b','i') // EVC image
444
+ #define heif_brand2_evbs heif_fourcc('e','v','b','s') // EVC sequence
445
+
446
+
447
+ // input data should be at least 12 bytes
448
+ LIBHEIF_API
449
+ heif_brand2 heif_read_main_brand(const uint8_t* data, int len);
450
+
451
+ // 'brand_fourcc' must be 4 character long, but need not be 0-terminated
452
+ LIBHEIF_API
453
+ heif_brand2 heif_fourcc_to_brand(const char* brand_fourcc);
454
+
455
+ // the output buffer must be at least 4 bytes long
456
+ LIBHEIF_API
457
+ void heif_brand_to_fourcc(heif_brand2 brand, char* out_fourcc);
458
+
459
+ // 'brand_fourcc' must be 4 character long, but need not be 0-terminated
460
+ // returns 1 if file includes the brand, and 0 if it does not
461
+ // returns -1 if the provided data is not sufficient
462
+ // (you should input at least as many bytes as indicated in the first 4 bytes of the file, usually ~50 bytes will do)
463
+ // returns -2 on other errors
464
+ LIBHEIF_API
465
+ int heif_has_compatible_brand(const uint8_t* data, int len, const char* brand_fourcc);
466
+
467
+ // Returns an array of compatible brands. The array is allocated by this function and has to be freed with 'heif_free_list_of_compatible_brands()'.
468
+ // The number of entries is returned in out_size.
469
+ LIBHEIF_API
470
+ struct heif_error heif_list_compatible_brands(const uint8_t* data, int len, heif_brand2** out_brands, int* out_size);
471
+
472
+ LIBHEIF_API
473
+ void heif_free_list_of_compatible_brands(heif_brand2* brands_list);
474
+
475
+
476
+ // Returns one of these MIME types:
477
+ // - image/heic HEIF file using h265 compression
478
+ // - image/heif HEIF file using any other compression
479
+ // - image/heic-sequence HEIF image sequence using h265 compression
480
+ // - image/heif-sequence HEIF image sequence using any other compression
481
+ // - image/avif AVIF image
482
+ // - image/avif-sequence AVIF sequence
483
+ // - image/jpeg JPEG image
484
+ // - image/png PNG image
485
+ // If the format could not be detected, an empty string is returned.
486
+ //
487
+ // Provide at least 12 bytes of input. With less input, its format might not
488
+ // be detected. You may also provide more input to increase detection accuracy.
489
+ //
490
+ // Note that JPEG and PNG images cannot be decoded by libheif even though the
491
+ // formats are detected by this function.
492
+ LIBHEIF_API
493
+ const char* heif_get_file_mime_type(const uint8_t* data, int len);
494
+
495
+
496
+
497
+ // ========================= heif_context =========================
498
+ // A heif_context represents a HEIF file that has been read.
499
+ // In the future, you will also be able to add pictures to a heif_context
500
+ // and write it into a file again.
501
+
502
+
503
+ // Allocate a new context for reading HEIF files.
504
+ // Has to be freed again with heif_context_free().
505
+ LIBHEIF_API
506
+ struct heif_context* heif_context_alloc(void);
507
+
508
+ // Free a previously allocated HEIF context. You should not free a context twice.
509
+ LIBHEIF_API
510
+ void heif_context_free(struct heif_context*);
511
+
512
+
513
+ struct heif_reading_options;
514
+
515
+ enum heif_reader_grow_status
516
+ {
517
+ heif_reader_grow_status_size_reached, // requested size has been reached, we can read until this point
518
+ heif_reader_grow_status_timeout, // size has not been reached yet, but it may still grow further
519
+ heif_reader_grow_status_size_beyond_eof // size has not been reached and never will. The file has grown to its full size
520
+ };
521
+
522
+ struct heif_reader
523
+ {
524
+ // API version supported by this reader
525
+ int reader_api_version;
526
+
527
+ // --- version 1 functions ---
528
+ int64_t (* get_position)(void* userdata);
529
+
530
+ // The functions read(), and seek() return 0 on success.
531
+ // Generally, libheif will make sure that we do not read past the file size.
532
+ int (* read)(void* data,
533
+ size_t size,
534
+ void* userdata);
535
+
536
+ int (* seek)(int64_t position,
537
+ void* userdata);
538
+
539
+ // When calling this function, libheif wants to make sure that it can read the file
540
+ // up to 'target_size'. This is useful when the file is currently downloaded and may
541
+ // grow with time. You may, for example, extract the image sizes even before the actual
542
+ // compressed image data has been completely downloaded.
543
+ //
544
+ // Even if your input files will not grow, you will have to implement at least
545
+ // detection whether the target_size is above the (fixed) file length
546
+ // (in this case, return 'size_beyond_eof').
547
+ enum heif_reader_grow_status (* wait_for_file_size)(int64_t target_size, void* userdata);
548
+ };
549
+
550
+
551
+ // Read a HEIF file from a named disk file.
552
+ // The heif_reading_options should currently be set to NULL.
553
+ LIBHEIF_API
554
+ struct heif_error heif_context_read_from_file(struct heif_context*, const char* filename,
555
+ const struct heif_reading_options*);
556
+
557
+ // Read a HEIF file stored completely in memory.
558
+ // The heif_reading_options should currently be set to NULL.
559
+ // DEPRECATED: use heif_context_read_from_memory_without_copy() instead.
560
+ LIBHEIF_API
561
+ struct heif_error heif_context_read_from_memory(struct heif_context*,
562
+ const void* mem, size_t size,
563
+ const struct heif_reading_options*);
564
+
565
+ // Same as heif_context_read_from_memory() except that the provided memory is not copied.
566
+ // That means, you will have to keep the memory area alive as long as you use the heif_context.
567
+ LIBHEIF_API
568
+ struct heif_error heif_context_read_from_memory_without_copy(struct heif_context*,
569
+ const void* mem, size_t size,
570
+ const struct heif_reading_options*);
571
+
572
+ LIBHEIF_API
573
+ struct heif_error heif_context_read_from_reader(struct heif_context*,
574
+ const struct heif_reader* reader,
575
+ void* userdata,
576
+ const struct heif_reading_options*);
577
+
578
+ // Number of top-level images in the HEIF file. This does not include the thumbnails or the
579
+ // tile images that are composed to an image grid. You can get access to the thumbnails via
580
+ // the main image handle.
581
+ LIBHEIF_API
582
+ int heif_context_get_number_of_top_level_images(struct heif_context* ctx);
583
+
584
+ LIBHEIF_API
585
+ int heif_context_is_top_level_image_ID(struct heif_context* ctx, heif_item_id id);
586
+
587
+ // Fills in image IDs into the user-supplied int-array 'ID_array', preallocated with 'count' entries.
588
+ // Function returns the total number of IDs filled into the array.
589
+ LIBHEIF_API
590
+ int heif_context_get_list_of_top_level_image_IDs(struct heif_context* ctx,
591
+ heif_item_id* ID_array,
592
+ int count);
593
+
594
+ LIBHEIF_API
595
+ struct heif_error heif_context_get_primary_image_ID(struct heif_context* ctx, heif_item_id* id);
596
+
597
+ // Get a handle to the primary image of the HEIF file.
598
+ // This is the image that should be displayed primarily when there are several images in the file.
599
+ LIBHEIF_API
600
+ struct heif_error heif_context_get_primary_image_handle(struct heif_context* ctx,
601
+ struct heif_image_handle**);
602
+
603
+ // Get the handle for a specific top-level image from an image ID.
604
+ LIBHEIF_API
605
+ struct heif_error heif_context_get_image_handle(struct heif_context* ctx,
606
+ heif_item_id id,
607
+ struct heif_image_handle**);
608
+
609
+ // Print information about the boxes of a HEIF file to file descriptor.
610
+ // This is for debugging and informational purposes only. You should not rely on
611
+ // the output having a specific format. At best, you should not use this at all.
612
+ LIBHEIF_API
613
+ void heif_context_debug_dump_boxes_to_file(struct heif_context* ctx, int fd);
614
+
615
+
616
+ LIBHEIF_API
617
+ void heif_context_set_maximum_image_size_limit(struct heif_context* ctx, int maximum_width);
618
+
619
+ // If the maximum threads number is set to 0, the image tiles are decoded in the main thread.
620
+ // This is different from setting it to 1, which will generate a single background thread to decode the tiles.
621
+ // Note that this setting only affects libheif itself. The codecs itself may still use multi-threaded decoding.
622
+ // You can use it, for example, in cases where you are decoding several images in parallel anyway you thus want
623
+ // to minimize parallelism in each decoder.
624
+ LIBHEIF_API
625
+ void heif_context_set_max_decoding_threads(struct heif_context* ctx, int max_threads);
626
+
627
+
628
+ // ========================= heif_image_handle =========================
629
+
630
+ // An heif_image_handle is a handle to a logical image in the HEIF file.
631
+ // To get the actual pixel data, you have to decode the handle to an heif_image.
632
+ // An heif_image_handle also gives you access to the thumbnails and Exif data
633
+ // associated with an image.
634
+
635
+ // Once you obtained an heif_image_handle, you can already release the heif_context,
636
+ // since it is internally ref-counted.
637
+
638
+ // Release image handle.
639
+ LIBHEIF_API
640
+ void heif_image_handle_release(const struct heif_image_handle*);
641
+
642
+ // Check whether the given image_handle is the primary image of the file.
643
+ LIBHEIF_API
644
+ int heif_image_handle_is_primary_image(const struct heif_image_handle* handle);
645
+
646
+ LIBHEIF_API
647
+ heif_item_id heif_image_handle_get_item_id(const struct heif_image_handle* handle);
648
+
649
+ // Get the resolution of an image.
650
+ LIBHEIF_API
651
+ int heif_image_handle_get_width(const struct heif_image_handle* handle);
652
+
653
+ LIBHEIF_API
654
+ int heif_image_handle_get_height(const struct heif_image_handle* handle);
655
+
656
+ LIBHEIF_API
657
+ int heif_image_handle_has_alpha_channel(const struct heif_image_handle*);
658
+
659
+ LIBHEIF_API
660
+ int heif_image_handle_is_premultiplied_alpha(const struct heif_image_handle*);
661
+
662
+ // Returns -1 on error, e.g. if this information is not present in the image.
663
+ LIBHEIF_API
664
+ int heif_image_handle_get_luma_bits_per_pixel(const struct heif_image_handle*);
665
+
666
+ // Returns -1 on error, e.g. if this information is not present in the image.
667
+ LIBHEIF_API
668
+ int heif_image_handle_get_chroma_bits_per_pixel(const struct heif_image_handle*);
669
+
670
+ // Get the image width from the 'ispe' box. This is the original image size without
671
+ // any transformations applied to it. Do not use this unless you know exactly what
672
+ // you are doing.
673
+ LIBHEIF_API
674
+ int heif_image_handle_get_ispe_width(const struct heif_image_handle* handle);
675
+
676
+ LIBHEIF_API
677
+ int heif_image_handle_get_ispe_height(const struct heif_image_handle* handle);
678
+
679
+
680
+ // ------------------------- depth images -------------------------
681
+
682
+ LIBHEIF_API
683
+ int heif_image_handle_has_depth_image(const struct heif_image_handle*);
684
+
685
+ LIBHEIF_API
686
+ int heif_image_handle_get_number_of_depth_images(const struct heif_image_handle* handle);
687
+
688
+ LIBHEIF_API
689
+ int heif_image_handle_get_list_of_depth_image_IDs(const struct heif_image_handle* handle,
690
+ heif_item_id* ids, int count);
691
+
692
+ LIBHEIF_API
693
+ struct heif_error heif_image_handle_get_depth_image_handle(const struct heif_image_handle* handle,
694
+ heif_item_id depth_image_id,
695
+ struct heif_image_handle** out_depth_handle);
696
+
697
+
698
+ enum heif_depth_representation_type
699
+ {
700
+ heif_depth_representation_type_uniform_inverse_Z = 0,
701
+ heif_depth_representation_type_uniform_disparity = 1,
702
+ heif_depth_representation_type_uniform_Z = 2,
703
+ heif_depth_representation_type_nonuniform_disparity = 3
704
+ };
705
+
706
+ struct heif_depth_representation_info
707
+ {
708
+ uint8_t version;
709
+
710
+ // version 1 fields
711
+
712
+ uint8_t has_z_near;
713
+ uint8_t has_z_far;
714
+ uint8_t has_d_min;
715
+ uint8_t has_d_max;
716
+
717
+ double z_near;
718
+ double z_far;
719
+ double d_min;
720
+ double d_max;
721
+
722
+ enum heif_depth_representation_type depth_representation_type;
723
+ uint32_t disparity_reference_view;
724
+
725
+ uint32_t depth_nonlinear_representation_model_size;
726
+ uint8_t* depth_nonlinear_representation_model;
727
+
728
+ // version 2 fields below
729
+ };
730
+
731
+
732
+ LIBHEIF_API
733
+ void heif_depth_representation_info_free(const struct heif_depth_representation_info* info);
734
+
735
+ // Returns true when there is depth_representation_info available
736
+ // Note 1: depth_image_id is currently unused because we support only one depth channel per image, but
737
+ // you should still provide the correct ID for future compatibility.
738
+ // Note 2: Because of an API bug before v1.11.0, the function also works when 'handle' is the handle of the depth image.
739
+ // However, you should pass the handle of the main image. Please adapt your code if needed.
740
+ LIBHEIF_API
741
+ int heif_image_handle_get_depth_image_representation_info(const struct heif_image_handle* handle,
742
+ heif_item_id depth_image_id,
743
+ const struct heif_depth_representation_info** out);
744
+
745
+
746
+
747
+ // ------------------------- thumbnails -------------------------
748
+
749
+ // List the number of thumbnails assigned to this image handle. Usually 0 or 1.
750
+ LIBHEIF_API
751
+ int heif_image_handle_get_number_of_thumbnails(const struct heif_image_handle* handle);
752
+
753
+ LIBHEIF_API
754
+ int heif_image_handle_get_list_of_thumbnail_IDs(const struct heif_image_handle* handle,
755
+ heif_item_id* ids, int count);
756
+
757
+ // Get the image handle of a thumbnail image.
758
+ LIBHEIF_API
759
+ struct heif_error heif_image_handle_get_thumbnail(const struct heif_image_handle* main_image_handle,
760
+ heif_item_id thumbnail_id,
761
+ struct heif_image_handle** out_thumbnail_handle);
762
+
763
+
764
+ // ------------------------- auxiliary images -------------------------
765
+
766
+ #define LIBHEIF_AUX_IMAGE_FILTER_OMIT_ALPHA (1UL<<1)
767
+ #define LIBHEIF_AUX_IMAGE_FILTER_OMIT_DEPTH (2UL<<1)
768
+
769
+ // List the number of auxiliary images assigned to this image handle.
770
+ LIBHEIF_API
771
+ int heif_image_handle_get_number_of_auxiliary_images(const struct heif_image_handle* handle,
772
+ int aux_filter);
773
+
774
+ LIBHEIF_API
775
+ int heif_image_handle_get_list_of_auxiliary_image_IDs(const struct heif_image_handle* handle,
776
+ int aux_filter,
777
+ heif_item_id* ids, int count);
778
+
779
+ // You are responsible to deallocate the returned buffer with heif_image_handle_release_auxiliary_type().
780
+ LIBHEIF_API
781
+ struct heif_error heif_image_handle_get_auxiliary_type(const struct heif_image_handle* handle,
782
+ const char** out_type);
783
+
784
+ LIBHEIF_API
785
+ void heif_image_handle_release_auxiliary_type(const struct heif_image_handle* handle,
786
+ const char** out_type);
787
+
788
+ // DEPRECATED (because typo in function name). Use heif_image_handle_release_auxiliary_type() instead.
789
+ LIBHEIF_API
790
+ void heif_image_handle_free_auxiliary_types(const struct heif_image_handle* handle,
791
+ const char** out_type);
792
+
793
+ // Get the image handle of an auxiliary image.
794
+ LIBHEIF_API
795
+ struct heif_error heif_image_handle_get_auxiliary_image_handle(const struct heif_image_handle* main_image_handle,
796
+ heif_item_id auxiliary_id,
797
+ struct heif_image_handle** out_auxiliary_handle);
798
+
799
+
800
+ // ------------------------- metadata (Exif / XMP) -------------------------
801
+
802
+ // How many metadata blocks are attached to an image. If you only want to get EXIF data,
803
+ // set the type_filter to "Exif". Otherwise, set the type_filter to NULL.
804
+ LIBHEIF_API
805
+ int heif_image_handle_get_number_of_metadata_blocks(const struct heif_image_handle* handle,
806
+ const char* type_filter);
807
+
808
+ // 'type_filter' can be used to get only metadata of specific types, like "Exif".
809
+ // If 'type_filter' is NULL, it will return all types of metadata IDs.
810
+ LIBHEIF_API
811
+ int heif_image_handle_get_list_of_metadata_block_IDs(const struct heif_image_handle* handle,
812
+ const char* type_filter,
813
+ heif_item_id* ids, int count);
814
+
815
+ // Return a string indicating the type of the metadata, as specified in the HEIF file.
816
+ // Exif data will have the type string "Exif".
817
+ // This string will be valid until the next call to a libheif function.
818
+ // You do not have to free this string.
819
+ LIBHEIF_API
820
+ const char* heif_image_handle_get_metadata_type(const struct heif_image_handle* handle,
821
+ heif_item_id metadata_id);
822
+
823
+ // For EXIF, the content type is empty.
824
+ // For XMP, the content type is "application/rdf+xml".
825
+ LIBHEIF_API
826
+ const char* heif_image_handle_get_metadata_content_type(const struct heif_image_handle* handle,
827
+ heif_item_id metadata_id);
828
+
829
+ // Get the size of the raw metadata, as stored in the HEIF file.
830
+ LIBHEIF_API
831
+ size_t heif_image_handle_get_metadata_size(const struct heif_image_handle* handle,
832
+ heif_item_id metadata_id);
833
+
834
+ // 'out_data' must point to a memory area of the size reported by heif_image_handle_get_metadata_size().
835
+ // The data is returned exactly as stored in the HEIF file.
836
+ // For Exif data, you probably have to skip the first four bytes of the data, since they
837
+ // indicate the offset to the start of the TIFF header of the Exif data.
838
+ LIBHEIF_API
839
+ struct heif_error heif_image_handle_get_metadata(const struct heif_image_handle* handle,
840
+ heif_item_id metadata_id,
841
+ void* out_data);
842
+
843
+
844
+ // ------------------------- color profiles -------------------------
845
+
846
+ enum heif_color_profile_type
847
+ {
848
+ heif_color_profile_type_not_present = 0,
849
+ heif_color_profile_type_nclx = heif_fourcc('n', 'c', 'l', 'x'),
850
+ heif_color_profile_type_rICC = heif_fourcc('r', 'I', 'C', 'C'),
851
+ heif_color_profile_type_prof = heif_fourcc('p', 'r', 'o', 'f')
852
+ };
853
+
854
+
855
+ // Returns 'heif_color_profile_type_not_present' if there is no color profile.
856
+ // If there is an ICC profile and an NCLX profile, the ICC profile is returned.
857
+ // TODO: we need a new API for this function as images can contain both NCLX and ICC at the same time.
858
+ // However, you can still use heif_image_handle_get_raw_color_profile() and
859
+ // heif_image_handle_get_nclx_color_profile() to access both profiles.
860
+ LIBHEIF_API
861
+ enum heif_color_profile_type heif_image_handle_get_color_profile_type(const struct heif_image_handle* handle);
862
+
863
+ LIBHEIF_API
864
+ size_t heif_image_handle_get_raw_color_profile_size(const struct heif_image_handle* handle);
865
+
866
+ // Returns 'heif_error_Color_profile_does_not_exist' when there is no ICC profile.
867
+ LIBHEIF_API
868
+ struct heif_error heif_image_handle_get_raw_color_profile(const struct heif_image_handle* handle,
869
+ void* out_data);
870
+
871
+
872
+ enum heif_color_primaries
873
+ {
874
+ heif_color_primaries_ITU_R_BT_709_5 = 1, // g=0.3;0.6, b=0.15;0.06, r=0.64;0.33, w=0.3127,0.3290
875
+ heif_color_primaries_unspecified = 2,
876
+ heif_color_primaries_ITU_R_BT_470_6_System_M = 4,
877
+ heif_color_primaries_ITU_R_BT_470_6_System_B_G = 5,
878
+ heif_color_primaries_ITU_R_BT_601_6 = 6,
879
+ heif_color_primaries_SMPTE_240M = 7,
880
+ heif_color_primaries_generic_film = 8,
881
+ heif_color_primaries_ITU_R_BT_2020_2_and_2100_0 = 9,
882
+ heif_color_primaries_SMPTE_ST_428_1 = 10,
883
+ heif_color_primaries_SMPTE_RP_431_2 = 11,
884
+ heif_color_primaries_SMPTE_EG_432_1 = 12,
885
+ heif_color_primaries_EBU_Tech_3213_E = 22
886
+ };
887
+
888
+ enum heif_transfer_characteristics
889
+ {
890
+ heif_transfer_characteristic_ITU_R_BT_709_5 = 1,
891
+ heif_transfer_characteristic_unspecified = 2,
892
+ heif_transfer_characteristic_ITU_R_BT_470_6_System_M = 4,
893
+ heif_transfer_characteristic_ITU_R_BT_470_6_System_B_G = 5,
894
+ heif_transfer_characteristic_ITU_R_BT_601_6 = 6,
895
+ heif_transfer_characteristic_SMPTE_240M = 7,
896
+ heif_transfer_characteristic_linear = 8,
897
+ heif_transfer_characteristic_logarithmic_100 = 9,
898
+ heif_transfer_characteristic_logarithmic_100_sqrt10 = 10,
899
+ heif_transfer_characteristic_IEC_61966_2_4 = 11,
900
+ heif_transfer_characteristic_ITU_R_BT_1361 = 12,
901
+ heif_transfer_characteristic_IEC_61966_2_1 = 13,
902
+ heif_transfer_characteristic_ITU_R_BT_2020_2_10bit = 14,
903
+ heif_transfer_characteristic_ITU_R_BT_2020_2_12bit = 15,
904
+ heif_transfer_characteristic_ITU_R_BT_2100_0_PQ = 16,
905
+ heif_transfer_characteristic_SMPTE_ST_428_1 = 17,
906
+ heif_transfer_characteristic_ITU_R_BT_2100_0_HLG = 18
907
+ };
908
+
909
+ enum heif_matrix_coefficients
910
+ {
911
+ heif_matrix_coefficients_RGB_GBR = 0,
912
+ heif_matrix_coefficients_ITU_R_BT_709_5 = 1, // TODO: or 709-6 according to h.273
913
+ heif_matrix_coefficients_unspecified = 2,
914
+ heif_matrix_coefficients_US_FCC_T47 = 4,
915
+ heif_matrix_coefficients_ITU_R_BT_470_6_System_B_G = 5,
916
+ heif_matrix_coefficients_ITU_R_BT_601_6 = 6, // TODO: or 601-7 according to h.273
917
+ heif_matrix_coefficients_SMPTE_240M = 7,
918
+ heif_matrix_coefficients_YCgCo = 8,
919
+ heif_matrix_coefficients_ITU_R_BT_2020_2_non_constant_luminance = 9,
920
+ heif_matrix_coefficients_ITU_R_BT_2020_2_constant_luminance = 10,
921
+ heif_matrix_coefficients_SMPTE_ST_2085 = 11,
922
+ heif_matrix_coefficients_chromaticity_derived_non_constant_luminance = 12,
923
+ heif_matrix_coefficients_chromaticity_derived_constant_luminance = 13,
924
+ heif_matrix_coefficients_ICtCp = 14
925
+ };
926
+
927
+ struct heif_color_profile_nclx
928
+ {
929
+ // === version 1 fields
930
+
931
+ uint8_t version;
932
+
933
+ enum heif_color_primaries color_primaries;
934
+ enum heif_transfer_characteristics transfer_characteristics;
935
+ enum heif_matrix_coefficients matrix_coefficients;
936
+ uint8_t full_range_flag;
937
+
938
+ // --- decoded values (not used when saving nclx)
939
+
940
+ float color_primary_red_x, color_primary_red_y;
941
+ float color_primary_green_x, color_primary_green_y;
942
+ float color_primary_blue_x, color_primary_blue_y;
943
+ float color_primary_white_x, color_primary_white_y;
944
+ };
945
+
946
+ LIBHEIF_API
947
+ struct heif_error heif_nclx_color_profile_set_color_primaries(struct heif_color_profile_nclx* nclx, uint16_t cp);
948
+
949
+ LIBHEIF_API
950
+ struct heif_error heif_nclx_color_profile_set_transfer_characteristics(struct heif_color_profile_nclx* nclx, uint16_t transfer_characteristics);
951
+
952
+ LIBHEIF_API
953
+ struct heif_error heif_nclx_color_profile_set_matrix_coefficients(struct heif_color_profile_nclx* nclx, uint16_t matrix_coefficients);
954
+
955
+ // Returns 'heif_error_Color_profile_does_not_exist' when there is no NCLX profile.
956
+ // TODO: This function does currently not return an NCLX profile if it is stored in the image bitstream.
957
+ // Only NCLX profiles stored as colr boxes are returned. This may change in the future.
958
+ LIBHEIF_API
959
+ struct heif_error heif_image_handle_get_nclx_color_profile(const struct heif_image_handle* handle,
960
+ struct heif_color_profile_nclx** out_data);
961
+
962
+ // Returned color profile has 'version' field set to the maximum allowed.
963
+ // Do not fill values for higher versions as these might be outside the allocated structure size.
964
+ // May return NULL.
965
+ LIBHEIF_API
966
+ struct heif_color_profile_nclx* heif_nclx_color_profile_alloc();
967
+
968
+ LIBHEIF_API
969
+ void heif_nclx_color_profile_free(struct heif_color_profile_nclx* nclx_profile);
970
+
971
+
972
+ LIBHEIF_API
973
+ enum heif_color_profile_type heif_image_get_color_profile_type(const struct heif_image* image);
974
+
975
+ LIBHEIF_API
976
+ size_t heif_image_get_raw_color_profile_size(const struct heif_image* image);
977
+
978
+ LIBHEIF_API
979
+ struct heif_error heif_image_get_raw_color_profile(const struct heif_image* image,
980
+ void* out_data);
981
+
982
+ LIBHEIF_API
983
+ struct heif_error heif_image_get_nclx_color_profile(const struct heif_image* image,
984
+ struct heif_color_profile_nclx** out_data);
985
+
986
+
987
+ // ------------------------- item properties -------------------------
988
+
989
+ enum heif_item_property_type
990
+ {
991
+ // heif_item_property_unknown = -1,
992
+ heif_item_property_type_invalid = 0,
993
+ heif_item_property_type_user_description = heif_fourcc('u', 'd', 'e', 's'),
994
+ heif_item_property_type_transform_mirror = heif_fourcc('i', 'm', 'i', 'r'),
995
+ heif_item_property_type_transform_rotation = heif_fourcc('i', 'r', 'o', 't'),
996
+ heif_item_property_type_transform_crop = heif_fourcc('c', 'l', 'a', 'p'),
997
+ heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e')
998
+ };
999
+
1000
+ // Get the heif_property_id for a heif_item_id.
1001
+ // You may specify which property 'type' you want to receive.
1002
+ // If you specify 'heif_item_property_type_invalid', all properties associated to that item are returned.
1003
+ // The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
1004
+ // By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
1005
+ LIBHEIF_API
1006
+ int heif_item_get_properties_of_type(const struct heif_context* context,
1007
+ heif_item_id id,
1008
+ enum heif_item_property_type type,
1009
+ heif_property_id* out_list,
1010
+ int count);
1011
+
1012
+ // Returns all transformative properties in the correct order.
1013
+ // This includes "irot", "imir", "clap".
1014
+ // The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
1015
+ // By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
1016
+ LIBHEIF_API
1017
+ int heif_item_get_transformation_properties(const struct heif_context* context,
1018
+ heif_item_id id,
1019
+ heif_property_id* out_list,
1020
+ int count);
1021
+
1022
+ LIBHEIF_API
1023
+ enum heif_item_property_type heif_item_get_property_type(const struct heif_context* context,
1024
+ heif_item_id id,
1025
+ heif_property_id property_id);
1026
+
1027
+ // The strings are managed by libheif. They will be deleted in heif_property_user_description_release().
1028
+ struct heif_property_user_description
1029
+ {
1030
+ int version;
1031
+
1032
+ // version 1
1033
+
1034
+ const char* lang;
1035
+ const char* name;
1036
+ const char* description;
1037
+ const char* tags;
1038
+ };
1039
+
1040
+ // Get the "udes" user description property content.
1041
+ // Undefined strings are returned as empty strings.
1042
+ LIBHEIF_API
1043
+ struct heif_error heif_item_get_property_user_description(const struct heif_context* context,
1044
+ heif_item_id itemId,
1045
+ heif_property_id propertyId,
1046
+ struct heif_property_user_description** out);
1047
+
1048
+ // Add a "udes" user description property to the item.
1049
+ // If any string pointers are NULL, an empty string will be used instead.
1050
+ LIBHEIF_API
1051
+ struct heif_error heif_item_add_property_user_description(const struct heif_context* context,
1052
+ heif_item_id itemId,
1053
+ const struct heif_property_user_description* description,
1054
+ heif_property_id* out_propertyId);
1055
+
1056
+ // Release all strings and the object itself.
1057
+ // Only call for objects that you received from heif_item_get_property_user_description().
1058
+ LIBHEIF_API
1059
+ void heif_property_user_description_release(struct heif_property_user_description*);
1060
+
1061
+ enum heif_transform_mirror_direction
1062
+ {
1063
+ heif_transform_mirror_direction_vertical = 0, // flip image vertically
1064
+ heif_transform_mirror_direction_horizontal = 1 // flip image horizontally
1065
+ };
1066
+
1067
+ LIBHEIF_API
1068
+ enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const struct heif_context* context,
1069
+ heif_item_id itemId,
1070
+ heif_property_id propertyId);
1071
+
1072
+ // Returns only 0, 90, 180, or 270 angle values.
1073
+ // Returns -1 in case of error (but it will only return an error in case of wrong usage).
1074
+ LIBHEIF_API
1075
+ int heif_item_get_property_transform_rotation_ccw(const struct heif_context* context,
1076
+ heif_item_id itemId,
1077
+ heif_property_id propertyId);
1078
+
1079
+ // Returns the number of pixels that should be removed from the four edges.
1080
+ // Because of the way this data is stored, you have to pass the image size at the moment of the crop operation
1081
+ // to compute the cropped border sizes.
1082
+ LIBHEIF_API
1083
+ void heif_item_get_property_transform_crop_borders(const struct heif_context* context,
1084
+ heif_item_id itemId,
1085
+ heif_property_id propertyId,
1086
+ int image_width, int image_height,
1087
+ int* left, int* top, int* right, int* bottom);
1088
+
1089
+
1090
+ // ========================= heif_image =========================
1091
+
1092
+ // An heif_image contains a decoded pixel image in various colorspaces, chroma formats,
1093
+ // and bit depths.
1094
+
1095
+ // Note: when converting images to an interleaved chroma format, the resulting
1096
+ // image contains only a single channel of type channel_interleaved with, e.g., 3 bytes per pixel,
1097
+ // containing the interleaved R,G,B values.
1098
+
1099
+ // Planar RGB images are specified as heif_colorspace_RGB / heif_chroma_444.
1100
+
1101
+ enum heif_compression_format
1102
+ {
1103
+ heif_compression_undefined = 0,
1104
+ heif_compression_HEVC = 1,
1105
+ heif_compression_AVC = 2,
1106
+ heif_compression_JPEG = 3,
1107
+ heif_compression_AV1 = 4,
1108
+ heif_compression_VVC = 5,
1109
+ heif_compression_EVC = 6,
1110
+ heif_compression_JPEG2000 = 7, // ISO/IEC 15444-16:2021
1111
+ heif_compression_uncompressed = 8 // ISO/IEC 23001-17:2023
1112
+ };
1113
+
1114
+ enum heif_chroma
1115
+ {
1116
+ heif_chroma_undefined = 99,
1117
+ heif_chroma_monochrome = 0,
1118
+ heif_chroma_420 = 1,
1119
+ heif_chroma_422 = 2,
1120
+ heif_chroma_444 = 3,
1121
+ heif_chroma_interleaved_RGB = 10,
1122
+ heif_chroma_interleaved_RGBA = 11,
1123
+ heif_chroma_interleaved_RRGGBB_BE = 12, // HDR, big endian.
1124
+ heif_chroma_interleaved_RRGGBBAA_BE = 13, // HDR, big endian.
1125
+ heif_chroma_interleaved_RRGGBB_LE = 14, // HDR, little endian.
1126
+ heif_chroma_interleaved_RRGGBBAA_LE = 15 // HDR, little endian.
1127
+ };
1128
+
1129
+ // DEPRECATED ENUM NAMES
1130
+ #define heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB
1131
+ #define heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA
1132
+
1133
+
1134
+ enum heif_colorspace
1135
+ {
1136
+ heif_colorspace_undefined = 99,
1137
+
1138
+ // heif_colorspace_YCbCr should be used with one of these heif_chroma values:
1139
+ // * heif_chroma_444
1140
+ // * heif_chroma_422
1141
+ // * heif_chroma_420
1142
+ heif_colorspace_YCbCr = 0,
1143
+
1144
+ // heif_colorspace_RGB should be used with one of these heif_chroma values:
1145
+ // * heif_chroma_444 (for planar RGB)
1146
+ // * heif_chroma_interleaved_RGB
1147
+ // * heif_chroma_interleaved_RGBA
1148
+ // * heif_chroma_interleaved_RRGGBB_BE
1149
+ // * heif_chroma_interleaved_RRGGBBAA_BE
1150
+ // * heif_chroma_interleaved_RRGGBB_LE
1151
+ // * heif_chroma_interleaved_RRGGBBAA_LE
1152
+ heif_colorspace_RGB = 1,
1153
+
1154
+ // heif_colorspace_monochrome should only be used with heif_chroma = heif_chroma_monochrome
1155
+ heif_colorspace_monochrome = 2
1156
+ };
1157
+
1158
+ enum heif_channel
1159
+ {
1160
+ heif_channel_Y = 0,
1161
+ heif_channel_Cb = 1,
1162
+ heif_channel_Cr = 2,
1163
+ heif_channel_R = 3,
1164
+ heif_channel_G = 4,
1165
+ heif_channel_B = 5,
1166
+ heif_channel_Alpha = 6,
1167
+ heif_channel_interleaved = 10
1168
+ };
1169
+
1170
+
1171
+ enum heif_progress_step
1172
+ {
1173
+ heif_progress_step_total = 0,
1174
+ heif_progress_step_load_tile = 1
1175
+ };
1176
+
1177
+
1178
+ enum heif_chroma_downsampling_algorithm
1179
+ {
1180
+ heif_chroma_downsampling_nearest_neighbor = 1,
1181
+ heif_chroma_downsampling_average = 2,
1182
+
1183
+ // Combine with 'heif_chroma_upsampling_bilinear' for best quality.
1184
+ // Makes edges look sharper when using YUV 420 with bilinear chroma upsampling.
1185
+ heif_chroma_downsampling_sharp_yuv = 3
1186
+ };
1187
+
1188
+ enum heif_chroma_upsampling_algorithm
1189
+ {
1190
+ heif_chroma_upsampling_nearest_neighbor = 1,
1191
+ heif_chroma_upsampling_bilinear = 2
1192
+ };
1193
+
1194
+ struct heif_color_conversion_options
1195
+ {
1196
+ uint8_t version;
1197
+
1198
+ // --- version 1 options
1199
+
1200
+ enum heif_chroma_downsampling_algorithm preferred_chroma_downsampling_algorithm;
1201
+ enum heif_chroma_upsampling_algorithm preferred_chroma_upsampling_algorithm;
1202
+
1203
+ // When set to 'false', libheif may also use a different algorithm if the preferred one is not available.
1204
+ uint8_t only_use_preferred_chroma_algorithm;
1205
+ };
1206
+
1207
+
1208
+ struct heif_decoding_options
1209
+ {
1210
+ uint8_t version;
1211
+
1212
+ // version 1 options
1213
+
1214
+ // Ignore geometric transformations like cropping, rotation, mirroring.
1215
+ // Default: false (do not ignore).
1216
+ uint8_t ignore_transformations;
1217
+
1218
+ void (* start_progress)(enum heif_progress_step step, int max_progress, void* progress_user_data);
1219
+
1220
+ void (* on_progress)(enum heif_progress_step step, int progress, void* progress_user_data);
1221
+
1222
+ void (* end_progress)(enum heif_progress_step step, void* progress_user_data);
1223
+
1224
+ void* progress_user_data;
1225
+
1226
+ // version 2 options
1227
+
1228
+ uint8_t convert_hdr_to_8bit;
1229
+
1230
+ // version 3 options
1231
+
1232
+ // When enabled, an error is returned for invalid input. Otherwise, it will try its best and
1233
+ // add decoding warnings to the decoded heif_image. Default is non-strict.
1234
+ uint8_t strict_decoding;
1235
+
1236
+ // version 4 options
1237
+
1238
+ // name_id of the decoder to use for the decoding.
1239
+ // If set to NULL (default), the highest priority decoder is chosen.
1240
+ // The priority is defined in the plugin.
1241
+ const char* decoder_id;
1242
+
1243
+
1244
+ // version 5 options
1245
+
1246
+ struct heif_color_conversion_options color_conversion_options;
1247
+ };
1248
+
1249
+
1250
+ // Allocate decoding options and fill with default values.
1251
+ // Note: you should always get the decoding options through this function since the
1252
+ // option structure may grow in size in future versions.
1253
+ LIBHEIF_API
1254
+ struct heif_decoding_options* heif_decoding_options_alloc();
1255
+
1256
+ LIBHEIF_API
1257
+ void heif_decoding_options_free(struct heif_decoding_options*);
1258
+
1259
+ // Decode an heif_image_handle into the actual pixel image and also carry out
1260
+ // all geometric transformations specified in the HEIF file (rotation, cropping, mirroring).
1261
+ //
1262
+ // If colorspace or chroma is set to heif_colorspace_undefined or heif_chroma_undefined,
1263
+ // respectively, the original colorspace is taken.
1264
+ // Decoding options may be NULL. If you want to supply options, always use
1265
+ // heif_decoding_options_alloc() to get the structure.
1266
+ LIBHEIF_API
1267
+ struct heif_error heif_decode_image(const struct heif_image_handle* in_handle,
1268
+ struct heif_image** out_img,
1269
+ enum heif_colorspace colorspace,
1270
+ enum heif_chroma chroma,
1271
+ const struct heif_decoding_options* options);
1272
+
1273
+ // Get the colorspace format of the image.
1274
+ LIBHEIF_API
1275
+ enum heif_colorspace heif_image_get_colorspace(const struct heif_image*);
1276
+
1277
+ // Get the chroma format of the image.
1278
+ LIBHEIF_API
1279
+ enum heif_chroma heif_image_get_chroma_format(const struct heif_image*);
1280
+
1281
+ // Get width of the given image channel in pixels. Returns -1 if a non-existing
1282
+ // channel was given.
1283
+ LIBHEIF_API
1284
+ int heif_image_get_width(const struct heif_image*, enum heif_channel channel);
1285
+
1286
+ // Get height of the given image channel in pixels. Returns -1 if a non-existing
1287
+ // channel was given.
1288
+ LIBHEIF_API
1289
+ int heif_image_get_height(const struct heif_image*, enum heif_channel channel);
1290
+
1291
+ // Get the width of the main channel (Y in YCbCr, or any in RGB).
1292
+ LIBHEIF_API
1293
+ int heif_image_get_primary_width(const struct heif_image*);
1294
+
1295
+ LIBHEIF_API
1296
+ int heif_image_get_primary_height(const struct heif_image*);
1297
+
1298
+ LIBHEIF_API
1299
+ struct heif_error heif_image_crop(struct heif_image* img,
1300
+ int left, int right, int top, int bottom);
1301
+
1302
+ // Get the number of bits per pixel in the given image channel. Returns -1 if
1303
+ // a non-existing channel was given.
1304
+ // Note that the number of bits per pixel may be different for each color channel.
1305
+ // This function returns the number of bits used for storage of each pixel.
1306
+ // Especially for HDR images, this is probably not what you want. Have a look at
1307
+ // heif_image_get_bits_per_pixel_range() instead.
1308
+ LIBHEIF_API
1309
+ int heif_image_get_bits_per_pixel(const struct heif_image*, enum heif_channel channel);
1310
+
1311
+
1312
+ // Get the number of bits per pixel in the given image channel. This function returns
1313
+ // the number of bits used for representing the pixel value, which might be smaller
1314
+ // than the number of bits used in memory.
1315
+ // For example, in 12bit HDR images, this function returns '12', while still 16 bits
1316
+ // are reserved for storage. For interleaved RGBA with 12 bit, this function also returns
1317
+ // '12', not '48' or '64' (heif_image_get_bits_per_pixel returns 64 in this case).
1318
+ LIBHEIF_API
1319
+ int heif_image_get_bits_per_pixel_range(const struct heif_image*, enum heif_channel channel);
1320
+
1321
+ LIBHEIF_API
1322
+ int heif_image_has_channel(const struct heif_image*, enum heif_channel channel);
1323
+
1324
+ // Get a pointer to the actual pixel data.
1325
+ // The 'out_stride' is returned as "bytes per line".
1326
+ // When out_stride is NULL, no value will be written.
1327
+ // Returns NULL if a non-existing channel was given.
1328
+ LIBHEIF_API
1329
+ const uint8_t* heif_image_get_plane_readonly(const struct heif_image*,
1330
+ enum heif_channel channel,
1331
+ int* out_stride);
1332
+
1333
+ LIBHEIF_API
1334
+ uint8_t* heif_image_get_plane(struct heif_image*,
1335
+ enum heif_channel channel,
1336
+ int* out_stride);
1337
+
1338
+
1339
+ struct heif_scaling_options;
1340
+
1341
+ // Currently, heif_scaling_options is not defined yet. Pass a NULL pointer.
1342
+ LIBHEIF_API
1343
+ struct heif_error heif_image_scale_image(const struct heif_image* input,
1344
+ struct heif_image** output,
1345
+ int width, int height,
1346
+ const struct heif_scaling_options* options);
1347
+
1348
+ // The color profile is not attached to the image handle because we might need it
1349
+ // for color space transform and encoding.
1350
+ LIBHEIF_API
1351
+ struct heif_error heif_image_set_raw_color_profile(struct heif_image* image,
1352
+ const char* profile_type_fourcc_string,
1353
+ const void* profile_data,
1354
+ const size_t profile_size);
1355
+
1356
+ LIBHEIF_API
1357
+ struct heif_error heif_image_set_nclx_color_profile(struct heif_image* image,
1358
+ const struct heif_color_profile_nclx* color_profile);
1359
+
1360
+
1361
+ // TODO: this function does not make any sense yet, since we currently cannot modify existing HEIF files.
1362
+ //LIBHEIF_API
1363
+ //void heif_image_remove_color_profile(struct heif_image* image);
1364
+
1365
+ // Fills the image decoding warnings into the provided 'out_warnings' array.
1366
+ // The size of the array has to be provided in max_output_buffer_entries.
1367
+ // If max_output_buffer_entries==0, the number of decoder warnings is returned.
1368
+ // The function fills the warnings into the provided buffer, starting with 'first_warning_idx'.
1369
+ // It returns the number of warnings filled into the buffer.
1370
+ // Note: you can iterate through all warnings by using 'max_output_buffer_entries=1' and iterate 'first_warning_idx'.
1371
+ LIBHEIF_API
1372
+ int heif_image_get_decoding_warnings(struct heif_image* image,
1373
+ int first_warning_idx,
1374
+ struct heif_error* out_warnings,
1375
+ int max_output_buffer_entries);
1376
+
1377
+ // This function is only for decoder plugin implementors.
1378
+ LIBHEIF_API
1379
+ void heif_image_add_decoding_warning(struct heif_image* image,
1380
+ struct heif_error err);
1381
+
1382
+ // Release heif_image.
1383
+ LIBHEIF_API
1384
+ void heif_image_release(const struct heif_image*);
1385
+
1386
+
1387
+ // Note: a value of 0 for any of these values indicates that the value is undefined.
1388
+ // The unit of these values is Candelas per square meter.
1389
+ struct heif_content_light_level
1390
+ {
1391
+ uint16_t max_content_light_level;
1392
+ uint16_t max_pic_average_light_level;
1393
+ };
1394
+
1395
+ LIBHEIF_API
1396
+ int heif_image_has_content_light_level(const struct heif_image*);
1397
+
1398
+ LIBHEIF_API
1399
+ void heif_image_get_content_light_level(const struct heif_image*, struct heif_content_light_level* out);
1400
+
1401
+ LIBHEIF_API
1402
+ void heif_image_set_content_light_level(const struct heif_image*, const struct heif_content_light_level* in);
1403
+
1404
+
1405
+ // Note: color coordinates are defined according to the CIE 1931 definition of x as specified in ISO 11664-1 (see also ISO 11664-3 and CIE 15).
1406
+ struct heif_mastering_display_colour_volume
1407
+ {
1408
+ uint16_t display_primaries_x[3];
1409
+ uint16_t display_primaries_y[3];
1410
+ uint16_t white_point_x;
1411
+ uint16_t white_point_y;
1412
+ uint32_t max_display_mastering_luminance;
1413
+ uint32_t min_display_mastering_luminance;
1414
+ };
1415
+
1416
+ // The units for max_display_mastering_luminance and min_display_mastering_luminance is Candelas per square meter.
1417
+ struct heif_decoded_mastering_display_colour_volume
1418
+ {
1419
+ float display_primaries_x[3];
1420
+ float display_primaries_y[3];
1421
+ float white_point_x;
1422
+ float white_point_y;
1423
+ double max_display_mastering_luminance;
1424
+ double min_display_mastering_luminance;
1425
+ };
1426
+
1427
+ LIBHEIF_API
1428
+ int heif_image_has_mastering_display_colour_volume(const struct heif_image*);
1429
+
1430
+ LIBHEIF_API
1431
+ void heif_image_get_mastering_display_colour_volume(const struct heif_image*, struct heif_mastering_display_colour_volume* out);
1432
+
1433
+ LIBHEIF_API
1434
+ void heif_image_set_mastering_display_colour_volume(const struct heif_image*, const struct heif_mastering_display_colour_volume* in);
1435
+
1436
+ // Converts the internal numeric representation of heif_mastering_display_colour_volume to the
1437
+ // normalized values, collected in heif_decoded_mastering_display_colour_volume.
1438
+ // Values that are out-of-range are decoded to 0, indicating an undefined value (as specified in ISO/IEC 23008-2).
1439
+ LIBHEIF_API
1440
+ struct heif_error heif_mastering_display_colour_volume_decode(const struct heif_mastering_display_colour_volume* in,
1441
+ struct heif_decoded_mastering_display_colour_volume* out);
1442
+
1443
+ LIBHEIF_API
1444
+ void heif_image_get_pixel_aspect_ratio(const struct heif_image*, uint32_t* aspect_h, uint32_t* aspect_v);
1445
+
1446
+ LIBHEIF_API
1447
+ void heif_image_set_pixel_aspect_ratio(struct heif_image*, uint32_t aspect_h, uint32_t aspect_v);
1448
+
1449
+ // ====================================================================================================
1450
+ // Encoding API
1451
+
1452
+ LIBHEIF_API
1453
+ struct heif_error heif_context_write_to_file(struct heif_context*,
1454
+ const char* filename);
1455
+
1456
+ struct heif_writer
1457
+ {
1458
+ // API version supported by this writer
1459
+ int writer_api_version;
1460
+
1461
+ // --- version 1 functions ---
1462
+ struct heif_error (* write)(struct heif_context* ctx, // TODO: why do we need this parameter?
1463
+ const void* data,
1464
+ size_t size,
1465
+ void* userdata);
1466
+ };
1467
+
1468
+ LIBHEIF_API
1469
+ struct heif_error heif_context_write(struct heif_context*,
1470
+ struct heif_writer* writer,
1471
+ void* userdata);
1472
+
1473
+
1474
+ // ----- encoder -----
1475
+
1476
+ // The encoder used for actually encoding an image.
1477
+ struct heif_encoder;
1478
+
1479
+ // A description of the encoder's capabilities and name.
1480
+ struct heif_encoder_descriptor;
1481
+
1482
+ // A configuration parameter of the encoder. Each encoder implementation may have a different
1483
+ // set of parameters. For the most common settings (e.q. quality), special functions to set
1484
+ // the parameters are provided.
1485
+ struct heif_encoder_parameter;
1486
+
1487
+ struct heif_decoder_descriptor;
1488
+
1489
+ // Get a list of available decoders. You can filter the encoders by compression format.
1490
+ // Use format_filter==heif_compression_undefined to get all available decoders.
1491
+ // The returned list of decoders is sorted by their priority (which is a plugin property).
1492
+ // The number of decoders is returned, which are not more than 'count' if (out_decoders != nullptr).
1493
+ // By setting out_decoders==nullptr, you can query the number of decoders, 'count' is ignored.
1494
+ LIBHEIF_API
1495
+ int heif_get_decoder_descriptors(enum heif_compression_format format_filter,
1496
+ const struct heif_decoder_descriptor** out_decoders,
1497
+ int count);
1498
+
1499
+ // Return a long, descriptive name of the decoder (including version information).
1500
+ LIBHEIF_API
1501
+ const char* heif_decoder_descriptor_get_name(const struct heif_decoder_descriptor*);
1502
+
1503
+ // Return a short, symbolic name for identifying the decoder.
1504
+ // This name should stay constant over different decoder versions.
1505
+ // Note: the returned ID may be NULL for old plugins that don't support this yet.
1506
+ LIBHEIF_API
1507
+ const char* heif_decoder_descriptor_get_id_name(const struct heif_decoder_descriptor*);
1508
+
1509
+ // DEPRECATED: use heif_get_encoder_descriptors() instead.
1510
+ // Get a list of available encoders. You can filter the encoders by compression format and name.
1511
+ // Use format_filter==heif_compression_undefined and name_filter==NULL as wildcards.
1512
+ // The returned list of encoders is sorted by their priority (which is a plugin property).
1513
+ // The number of encoders is returned, which are not more than 'count' if (out_encoders != nullptr).
1514
+ // By setting out_encoders==nullptr, you can query the number of encoders, 'count' is ignored.
1515
+ // Note: to get the actual encoder from the descriptors returned here, use heif_context_get_encoder().
1516
+ LIBHEIF_API
1517
+ int heif_context_get_encoder_descriptors(struct heif_context*, // TODO: why do we need this parameter?
1518
+ enum heif_compression_format format_filter,
1519
+ const char* name_filter,
1520
+ const struct heif_encoder_descriptor** out_encoders,
1521
+ int count);
1522
+
1523
+ // Get a list of available encoders. You can filter the encoders by compression format and name.
1524
+ // Use format_filter==heif_compression_undefined and name_filter==NULL as wildcards.
1525
+ // The returned list of encoders is sorted by their priority (which is a plugin property).
1526
+ // The number of encoders is returned, which are not more than 'count' if (out_encoders != nullptr).
1527
+ // By setting out_encoders==nullptr, you can query the number of encoders, 'count' is ignored.
1528
+ // Note: to get the actual encoder from the descriptors returned here, use heif_context_get_encoder().
1529
+ LIBHEIF_API
1530
+ int heif_get_encoder_descriptors(enum heif_compression_format format_filter,
1531
+ const char* name_filter,
1532
+ const struct heif_encoder_descriptor** out_encoders,
1533
+ int count);
1534
+
1535
+ // Return a long, descriptive name of the encoder (including version information).
1536
+ LIBHEIF_API
1537
+ const char* heif_encoder_descriptor_get_name(const struct heif_encoder_descriptor*);
1538
+
1539
+ // Return a short, symbolic name for identifying the encoder.
1540
+ // This name should stay constant over different encoder versions.
1541
+ LIBHEIF_API
1542
+ const char* heif_encoder_descriptor_get_id_name(const struct heif_encoder_descriptor*);
1543
+
1544
+ LIBHEIF_API
1545
+ enum heif_compression_format
1546
+ heif_encoder_descriptor_get_compression_format(const struct heif_encoder_descriptor*);
1547
+
1548
+ LIBHEIF_API
1549
+ int heif_encoder_descriptor_supports_lossy_compression(const struct heif_encoder_descriptor*);
1550
+
1551
+ LIBHEIF_API
1552
+ int heif_encoder_descriptor_supports_lossless_compression(const struct heif_encoder_descriptor*);
1553
+
1554
+
1555
+ // Get an encoder instance that can be used to actually encode images from a descriptor.
1556
+ LIBHEIF_API
1557
+ struct heif_error heif_context_get_encoder(struct heif_context* context,
1558
+ const struct heif_encoder_descriptor*,
1559
+ struct heif_encoder** out_encoder);
1560
+
1561
+ // Quick check whether there is a decoder available for the given format.
1562
+ // Note that the decoder still may not be able to decode all variants of that format.
1563
+ // You will have to query that further (todo) or just try to decode and check the returned error.
1564
+ LIBHEIF_API
1565
+ int heif_have_decoder_for_format(enum heif_compression_format format);
1566
+
1567
+ // Quick check whether there is an enoder available for the given format.
1568
+ // Note that the encoder may be limited to a certain subset of features (e.g. only 8 bit, only lossy).
1569
+ // You will have to query the specific capabilities further.
1570
+ LIBHEIF_API
1571
+ int heif_have_encoder_for_format(enum heif_compression_format format);
1572
+
1573
+ // Get an encoder for the given compression format. If there are several encoder plugins
1574
+ // for this format, the encoder with the highest plugin priority will be returned.
1575
+ LIBHEIF_API
1576
+ struct heif_error heif_context_get_encoder_for_format(struct heif_context* context,
1577
+ enum heif_compression_format format,
1578
+ struct heif_encoder**);
1579
+
1580
+ // You have to release the encoder after use.
1581
+ LIBHEIF_API
1582
+ void heif_encoder_release(struct heif_encoder*);
1583
+
1584
+ // Get the encoder name from the encoder itself.
1585
+ LIBHEIF_API
1586
+ const char* heif_encoder_get_name(const struct heif_encoder*);
1587
+
1588
+
1589
+ // --- Encoder Parameters ---
1590
+
1591
+ // Libheif supports settings parameters through specialized functions and through
1592
+ // generic functions by parameter name. Sometimes, the same parameter can be set
1593
+ // in both ways.
1594
+ // We consider it best practice to use the generic parameter functions only in
1595
+ // dynamically generated user interfaces, as no guarantees are made that some specific
1596
+ // parameter names are supported by all plugins.
1597
+
1598
+
1599
+ // Set a 'quality' factor (0-100). How this is mapped to actual encoding parameters is
1600
+ // encoder dependent.
1601
+ LIBHEIF_API
1602
+ struct heif_error heif_encoder_set_lossy_quality(struct heif_encoder*, int quality);
1603
+
1604
+ LIBHEIF_API
1605
+ struct heif_error heif_encoder_set_lossless(struct heif_encoder*, int enable);
1606
+
1607
+ // level should be between 0 (= none) to 4 (= full)
1608
+ LIBHEIF_API
1609
+ struct heif_error heif_encoder_set_logging_level(struct heif_encoder*, int level);
1610
+
1611
+ // Get a generic list of encoder parameters.
1612
+ // Each encoder may define its own, additional set of parameters.
1613
+ // You do not have to free the returned list.
1614
+ LIBHEIF_API
1615
+ const struct heif_encoder_parameter* const* heif_encoder_list_parameters(struct heif_encoder*);
1616
+
1617
+ // Return the parameter name.
1618
+ LIBHEIF_API
1619
+ const char* heif_encoder_parameter_get_name(const struct heif_encoder_parameter*);
1620
+
1621
+
1622
+ enum heif_encoder_parameter_type
1623
+ {
1624
+ heif_encoder_parameter_type_integer = 1,
1625
+ heif_encoder_parameter_type_boolean = 2,
1626
+ heif_encoder_parameter_type_string = 3
1627
+ };
1628
+
1629
+ // Return the parameter type.
1630
+ LIBHEIF_API
1631
+ enum heif_encoder_parameter_type heif_encoder_parameter_get_type(const struct heif_encoder_parameter*);
1632
+
1633
+ // DEPRECATED. Use heif_encoder_parameter_get_valid_integer_values() instead.
1634
+ LIBHEIF_API
1635
+ struct heif_error heif_encoder_parameter_get_valid_integer_range(const struct heif_encoder_parameter*,
1636
+ int* have_minimum_maximum,
1637
+ int* minimum, int* maximum);
1638
+
1639
+ // If integer is limited by a range, have_minimum and/or have_maximum will be != 0 and *minimum, *maximum is set.
1640
+ // If integer is limited by a fixed set of values, *num_valid_values will be >0 and *out_integer_array is set.
1641
+ LIBHEIF_API
1642
+ struct heif_error heif_encoder_parameter_get_valid_integer_values(const struct heif_encoder_parameter*,
1643
+ int* have_minimum, int* have_maximum,
1644
+ int* minimum, int* maximum,
1645
+ int* num_valid_values,
1646
+ const int** out_integer_array);
1647
+
1648
+ LIBHEIF_API
1649
+ struct heif_error heif_encoder_parameter_get_valid_string_values(const struct heif_encoder_parameter*,
1650
+ const char* const** out_stringarray);
1651
+
1652
+
1653
+ LIBHEIF_API
1654
+ struct heif_error heif_encoder_set_parameter_integer(struct heif_encoder*,
1655
+ const char* parameter_name,
1656
+ int value);
1657
+
1658
+ LIBHEIF_API
1659
+ struct heif_error heif_encoder_get_parameter_integer(struct heif_encoder*,
1660
+ const char* parameter_name,
1661
+ int* value);
1662
+
1663
+ // TODO: name should be changed to heif_encoder_get_valid_integer_parameter_range
1664
+ LIBHEIF_API // DEPRECATED.
1665
+ struct heif_error heif_encoder_parameter_integer_valid_range(struct heif_encoder*,
1666
+ const char* parameter_name,
1667
+ int* have_minimum_maximum,
1668
+ int* minimum, int* maximum);
1669
+
1670
+ LIBHEIF_API
1671
+ struct heif_error heif_encoder_set_parameter_boolean(struct heif_encoder*,
1672
+ const char* parameter_name,
1673
+ int value);
1674
+
1675
+ LIBHEIF_API
1676
+ struct heif_error heif_encoder_get_parameter_boolean(struct heif_encoder*,
1677
+ const char* parameter_name,
1678
+ int* value);
1679
+
1680
+ LIBHEIF_API
1681
+ struct heif_error heif_encoder_set_parameter_string(struct heif_encoder*,
1682
+ const char* parameter_name,
1683
+ const char* value);
1684
+
1685
+ LIBHEIF_API
1686
+ struct heif_error heif_encoder_get_parameter_string(struct heif_encoder*,
1687
+ const char* parameter_name,
1688
+ char* value, int value_size);
1689
+
1690
+ // returns a NULL-terminated list of valid strings or NULL if all values are allowed
1691
+ LIBHEIF_API
1692
+ struct heif_error heif_encoder_parameter_string_valid_values(struct heif_encoder*,
1693
+ const char* parameter_name,
1694
+ const char* const** out_stringarray);
1695
+
1696
+ LIBHEIF_API
1697
+ struct heif_error heif_encoder_parameter_integer_valid_values(struct heif_encoder*,
1698
+ const char* parameter_name,
1699
+ int* have_minimum, int* have_maximum,
1700
+ int* minimum, int* maximum,
1701
+ int* num_valid_values,
1702
+ const int** out_integer_array);
1703
+
1704
+ // Set a parameter of any type to the string value.
1705
+ // Integer values are parsed from the string.
1706
+ // Boolean values can be "true"/"false"/"1"/"0"
1707
+ //
1708
+ // x265 encoder specific note:
1709
+ // When using the x265 encoder, you may pass any of its parameters by
1710
+ // prefixing the parameter name with 'x265:'. Hence, to set the 'ctu' parameter,
1711
+ // you will have to set 'x265:ctu' in libheif.
1712
+ // Note that there is no checking for valid parameters when using the prefix.
1713
+ LIBHEIF_API
1714
+ struct heif_error heif_encoder_set_parameter(struct heif_encoder*,
1715
+ const char* parameter_name,
1716
+ const char* value);
1717
+
1718
+ // Get the current value of a parameter of any type as a human readable string.
1719
+ // The returned string is compatible with heif_encoder_set_parameter().
1720
+ LIBHEIF_API
1721
+ struct heif_error heif_encoder_get_parameter(struct heif_encoder*,
1722
+ const char* parameter_name,
1723
+ char* value_ptr, int value_size);
1724
+
1725
+ // Query whether a specific parameter has a default value.
1726
+ LIBHEIF_API
1727
+ int heif_encoder_has_default(struct heif_encoder*,
1728
+ const char* parameter_name);
1729
+
1730
+
1731
+ // The orientation values are defined equal to the EXIF Orientation tag.
1732
+ enum heif_orientation
1733
+ {
1734
+ heif_orientation_normal = 1,
1735
+ heif_orientation_flip_horizontally = 2,
1736
+ heif_orientation_rotate_180 = 3,
1737
+ heif_orientation_flip_vertically = 4,
1738
+ heif_orientation_rotate_90_cw_then_flip_horizontally = 5,
1739
+ heif_orientation_rotate_90_cw = 6,
1740
+ heif_orientation_rotate_90_cw_then_flip_vertically = 7,
1741
+ heif_orientation_rotate_270_cw = 8
1742
+ };
1743
+
1744
+
1745
+ struct heif_encoding_options
1746
+ {
1747
+ uint8_t version;
1748
+
1749
+ // version 1 options
1750
+
1751
+ uint8_t save_alpha_channel; // default: true
1752
+
1753
+ // version 2 options
1754
+
1755
+ // DEPRECATED. This option is not required anymore. Its value will be ignored.
1756
+ uint8_t macOS_compatibility_workaround;
1757
+
1758
+ // version 3 options
1759
+
1760
+ uint8_t save_two_colr_boxes_when_ICC_and_nclx_available; // default: false
1761
+
1762
+ // version 4 options
1763
+
1764
+ // Set this to the NCLX parameters to be used in the output image or set to NULL
1765
+ // when the same parameters as in the input image should be used.
1766
+ struct heif_color_profile_nclx* output_nclx_profile;
1767
+
1768
+ uint8_t macOS_compatibility_workaround_no_nclx_profile;
1769
+
1770
+ // version 5 options
1771
+
1772
+ // libheif will generate irot/imir boxes to match these orientations
1773
+ enum heif_orientation image_orientation;
1774
+
1775
+ // version 6 options
1776
+
1777
+ struct heif_color_conversion_options color_conversion_options;
1778
+ };
1779
+
1780
+ LIBHEIF_API
1781
+ struct heif_encoding_options* heif_encoding_options_alloc();
1782
+
1783
+ LIBHEIF_API
1784
+ void heif_encoding_options_free(struct heif_encoding_options*);
1785
+
1786
+
1787
+ // Compress the input image.
1788
+ // Returns a handle to the coded image in 'out_image_handle' unless out_image_handle = NULL.
1789
+ // 'options' should be NULL for now.
1790
+ // The first image added to the context is also automatically set the primary image, but
1791
+ // you can change the primary image later with heif_context_set_primary_image().
1792
+ LIBHEIF_API
1793
+ struct heif_error heif_context_encode_image(struct heif_context*,
1794
+ const struct heif_image* image,
1795
+ struct heif_encoder* encoder,
1796
+ const struct heif_encoding_options* options,
1797
+ struct heif_image_handle** out_image_handle);
1798
+
1799
+ LIBHEIF_API
1800
+ struct heif_error heif_context_set_primary_image(struct heif_context*,
1801
+ struct heif_image_handle* image_handle);
1802
+
1803
+ // Encode the 'image' as a scaled down thumbnail image.
1804
+ // The image is scaled down to fit into a square area of width 'bbox_size'.
1805
+ // If the input image is already so small that it fits into this bounding box, no thumbnail
1806
+ // image is encoded and NULL is returned in 'out_thumb_image_handle'.
1807
+ // No error is returned in this case.
1808
+ // The encoded thumbnail is automatically assigned to the 'master_image_handle'. Hence, you
1809
+ // do not have to call heif_context_assign_thumbnail().
1810
+ LIBHEIF_API
1811
+ struct heif_error heif_context_encode_thumbnail(struct heif_context*,
1812
+ const struct heif_image* image,
1813
+ const struct heif_image_handle* master_image_handle,
1814
+ struct heif_encoder* encoder,
1815
+ const struct heif_encoding_options* options,
1816
+ int bbox_size,
1817
+ struct heif_image_handle** out_thumb_image_handle);
1818
+
1819
+ enum heif_metadata_compression
1820
+ {
1821
+ heif_metadata_compression_off,
1822
+ heif_metadata_compression_auto,
1823
+ heif_metadata_compression_deflate
1824
+ };
1825
+
1826
+ // Assign 'thumbnail_image' as the thumbnail image of 'master_image'.
1827
+ LIBHEIF_API
1828
+ struct heif_error heif_context_assign_thumbnail(struct heif_context*,
1829
+ const struct heif_image_handle* master_image,
1830
+ const struct heif_image_handle* thumbnail_image);
1831
+
1832
+ // Add EXIF metadata to an image.
1833
+ LIBHEIF_API
1834
+ struct heif_error heif_context_add_exif_metadata(struct heif_context*,
1835
+ const struct heif_image_handle* image_handle,
1836
+ const void* data, int size);
1837
+
1838
+ // Add XMP metadata to an image.
1839
+ LIBHEIF_API
1840
+ struct heif_error heif_context_add_XMP_metadata(struct heif_context*,
1841
+ const struct heif_image_handle* image_handle,
1842
+ const void* data, int size);
1843
+
1844
+ // New version of heif_context_add_XMP_metadata() with data compression (experimental).
1845
+ LIBHEIF_API
1846
+ struct heif_error heif_context_add_XMP_metadata2(struct heif_context*,
1847
+ const struct heif_image_handle* image_handle,
1848
+ const void* data, int size,
1849
+ enum heif_metadata_compression compression);
1850
+
1851
+ // Add generic, proprietary metadata to an image. You have to specify an 'item_type' that will
1852
+ // identify your metadata. 'content_type' can be an additional type, or it can be NULL.
1853
+ // For example, this function can be used to add IPTC metadata (IIM stream, not XMP) to an image.
1854
+ // Although not standard, we propose to store IPTC data with item type="iptc", content_type=NULL.
1855
+ LIBHEIF_API
1856
+ struct heif_error heif_context_add_generic_metadata(struct heif_context* ctx,
1857
+ const struct heif_image_handle* image_handle,
1858
+ const void* data, int size,
1859
+ const char* item_type, const char* content_type);
1860
+
1861
+ // --- heif_image allocation
1862
+
1863
+ // Create a new image of the specified resolution and colorspace.
1864
+ // Note: no memory for the actual image data is reserved yet. You have to use
1865
+ // heif_image_add_plane() to add the image planes required by your colorspace/chroma.
1866
+ LIBHEIF_API
1867
+ struct heif_error heif_image_create(int width, int height,
1868
+ enum heif_colorspace colorspace,
1869
+ enum heif_chroma chroma,
1870
+ struct heif_image** out_image);
1871
+
1872
+ // The indicated bit_depth corresponds to the bit depth per channel.
1873
+ // I.e. for interleaved formats like RRGGBB, the bit_depth would be, e.g., 10 bit instead
1874
+ // of 30 bits or 3*16=48 bits.
1875
+ // For backward compatibility, one can also specify 24bits for RGB and 32bits for RGBA,
1876
+ // instead of the preferred 8 bits.
1877
+ LIBHEIF_API
1878
+ struct heif_error heif_image_add_plane(struct heif_image* image,
1879
+ enum heif_channel channel,
1880
+ int width, int height, int bit_depth);
1881
+
1882
+ // Signal that the image is premultiplied by the alpha pixel values.
1883
+ LIBHEIF_API
1884
+ void heif_image_set_premultiplied_alpha(struct heif_image* image,
1885
+ int is_premultiplied_alpha);
1886
+
1887
+ LIBHEIF_API
1888
+ int heif_image_is_premultiplied_alpha(struct heif_image* image);
1889
+
1890
+ // This function extends the padding of the image so that it has at least the given physical size.
1891
+ // The padding border is filled with the pixels along the right/bottom border.
1892
+ // This function may be useful if you want to process the image, but have some external padding requirements.
1893
+ // The image size will not be modified if it is already larger/equal than the given physical size.
1894
+ // I.e. you cannot assume that after calling this function, the stride will be equal to min_physical_width.
1895
+ LIBHEIF_API
1896
+ struct heif_error heif_image_extend_padding_to_size(struct heif_image* image, int min_physical_width, int min_physical_height);
1897
+
1898
+
1899
+
1900
+ // --- register plugins
1901
+
1902
+ struct heif_decoder_plugin;
1903
+ struct heif_encoder_plugin;
1904
+
1905
+ // DEPRECATED. Use heif_register_decoder_plugin(const struct heif_decoder_plugin*) instead.
1906
+ LIBHEIF_API
1907
+ struct heif_error heif_register_decoder(struct heif_context* heif, const struct heif_decoder_plugin*);
1908
+
1909
+ LIBHEIF_API
1910
+ struct heif_error heif_register_decoder_plugin(const struct heif_decoder_plugin*);
1911
+
1912
+ LIBHEIF_API
1913
+ struct heif_error heif_register_encoder_plugin(const struct heif_encoder_plugin*);
1914
+
1915
+ // DEPRECATED, typo in function name
1916
+ LIBHEIF_API
1917
+ int heif_encoder_descriptor_supportes_lossy_compression(const struct heif_encoder_descriptor*);
1918
+
1919
+ // DEPRECATED, typo in function name
1920
+ LIBHEIF_API
1921
+ int heif_encoder_descriptor_supportes_lossless_compression(const struct heif_encoder_descriptor*);
1922
+
1923
+
1924
+ // --- region items and annotations
1925
+
1926
+ // See ISO/IEC 23008-12:2022 Section 6.10 "Region items and region annotations"
1927
+
1928
+ struct heif_region_item;
1929
+
1930
+ enum heif_region_type
1931
+ {
1932
+ heif_region_type_point = 0,
1933
+ heif_region_type_rectangle = 1,
1934
+ heif_region_type_ellipse = 2,
1935
+ heif_region_type_polygon = 3,
1936
+ heif_region_type_referenced_mask = 4, // TODO
1937
+ heif_region_type_inline_mask = 5, // TODO
1938
+ heif_region_type_polyline = 6
1939
+ };
1940
+
1941
+ struct heif_region;
1942
+
1943
+ // How many region items are attached to an image.
1944
+ LIBHEIF_API
1945
+ int heif_image_handle_get_number_of_region_items(const struct heif_image_handle* image_handle);
1946
+
1947
+ // Get the region_item IDs assigned to an image.
1948
+ // Returns the number of region items outputted.
1949
+ LIBHEIF_API
1950
+ int heif_image_handle_get_list_of_region_item_ids(const struct heif_image_handle* image_handle,
1951
+ heif_item_id* region_item_ids_array,
1952
+ int max_count);
1953
+
1954
+ // You have to release the output heif_region_item with heif_region_item_release().
1955
+ LIBHEIF_API
1956
+ struct heif_error heif_context_get_region_item(const struct heif_context* context,
1957
+ heif_item_id region_item_id,
1958
+ struct heif_region_item** out);
1959
+
1960
+ LIBHEIF_API
1961
+ heif_item_id heif_region_item_get_id(struct heif_region_item*);
1962
+
1963
+ LIBHEIF_API
1964
+ void heif_region_item_release(struct heif_region_item*);
1965
+
1966
+ // The reference size specifies the coordinate space using for the region items.
1967
+ // It is the size of the area of the encoded image prior to any transformations.
1968
+ LIBHEIF_API
1969
+ void heif_region_item_get_reference_size(struct heif_region_item*, uint32_t* width, uint32_t* height);
1970
+
1971
+ LIBHEIF_API
1972
+ int heif_region_item_get_number_of_regions(const struct heif_region_item* region_item);
1973
+
1974
+ // You will have to release all returned heif_region objects with heif_region_release() or heif_region_release_many().
1975
+ // 'out_regions' should point to an array of size 'max_count'.
1976
+ // The function returns the number of regions filled into the 'out_regions' array.
1977
+ LIBHEIF_API
1978
+ int heif_region_item_get_list_of_regions(const struct heif_region_item* region_item,
1979
+ struct heif_region** out_regions_array,
1980
+ int max_count);
1981
+
1982
+ LIBHEIF_API
1983
+ void heif_region_release(const struct heif_region* region);
1984
+
1985
+ LIBHEIF_API
1986
+ void heif_region_release_many(const struct heif_region* const* regions_array, int num);
1987
+
1988
+ LIBHEIF_API
1989
+ enum heif_region_type heif_region_get_type(const struct heif_region* region);
1990
+
1991
+ // When querying the region geometry, there is a version without and a version with "_transformed" suffix.
1992
+ // The version without returns the coordinates in the reference coordinate space.
1993
+ // The version with "_transformed" suffix give the coordinates in pixels after all transformative properties have been applied.
1994
+
1995
+ LIBHEIF_API
1996
+ struct heif_error heif_region_get_point(const struct heif_region* region, int32_t* x, int32_t* y);
1997
+
1998
+ LIBHEIF_API
1999
+ struct heif_error heif_region_get_point_transformed(const struct heif_region* region, double* x, double* y,
2000
+ heif_item_id image_id);
2001
+
2002
+ LIBHEIF_API
2003
+ struct heif_error heif_region_get_rectangle(const struct heif_region* region,
2004
+ int32_t* x, int32_t* y,
2005
+ uint32_t* width, uint32_t* height);
2006
+
2007
+ LIBHEIF_API
2008
+ struct heif_error heif_region_get_rectangle_transformed(const struct heif_region* region,
2009
+ double* x, double* y,
2010
+ double* width, double* height,
2011
+ heif_item_id image_id);
2012
+
2013
+ LIBHEIF_API
2014
+ struct heif_error heif_region_get_ellipse(const struct heif_region* region,
2015
+ int32_t* x, int32_t* y,
2016
+ uint32_t* radius_x, uint32_t* radius_y);
2017
+
2018
+ LIBHEIF_API
2019
+ struct heif_error heif_region_get_ellipse_transformed(const struct heif_region* region,
2020
+ double* x, double* y,
2021
+ double* radius_x, double* radius_y,
2022
+ heif_item_id image_id);
2023
+
2024
+ LIBHEIF_API
2025
+ int heif_region_get_polygon_num_points(const struct heif_region* region);
2026
+
2027
+ // Point coordinates are stored in the output array 'pts'. This must have twice as many entries as there are points.
2028
+ // Each point is stored as consecutive x and y positions.
2029
+ LIBHEIF_API
2030
+ struct heif_error heif_region_get_polygon_points(const struct heif_region* region,
2031
+ int32_t* out_pts_array);
2032
+
2033
+ LIBHEIF_API
2034
+ struct heif_error heif_region_get_polygon_points_transformed(const struct heif_region* region,
2035
+ double* out_pts_array,
2036
+ heif_item_id image_id);
2037
+
2038
+ LIBHEIF_API
2039
+ int heif_region_get_polyline_num_points(const struct heif_region* region);
2040
+
2041
+ LIBHEIF_API
2042
+ struct heif_error heif_region_get_polyline_points(const struct heif_region* region,
2043
+ int32_t* out_pts_array);
2044
+
2045
+ LIBHEIF_API
2046
+ struct heif_error heif_region_get_polyline_points_transformed(const struct heif_region* region,
2047
+ double* out_pts_array,
2048
+ heif_item_id image_id);
2049
+
2050
+ // --- adding region items
2051
+
2052
+ LIBHEIF_API
2053
+ struct heif_error heif_image_handle_add_region_item(struct heif_image_handle* image_handle,
2054
+ uint32_t reference_width, uint32_t reference_height,
2055
+ struct heif_region_item** out_region_item);
2056
+
2057
+ // When adding regions, there is an optional 'out_region' parameter.
2058
+ // This is usually not needed. You may set it to NULL.
2059
+
2060
+ LIBHEIF_API
2061
+ struct heif_error heif_region_item_add_region_point(struct heif_region_item*,
2062
+ int32_t x, int32_t y,
2063
+ struct heif_region** out_region);
2064
+
2065
+ LIBHEIF_API
2066
+ struct heif_error heif_region_item_add_region_rectangle(struct heif_region_item*,
2067
+ int32_t x, int32_t y,
2068
+ uint32_t width, uint32_t height,
2069
+ struct heif_region** out_region);
2070
+
2071
+ LIBHEIF_API
2072
+ struct heif_error heif_region_item_add_region_ellipse(struct heif_region_item*,
2073
+ int32_t x, int32_t y,
2074
+ uint32_t radius_x, uint32_t radius_y,
2075
+ struct heif_region** out_region);
2076
+
2077
+ // pts[] is an array of 2*nPoints, each pair representing x and y.
2078
+ LIBHEIF_API
2079
+ struct heif_error heif_region_item_add_region_polygon(struct heif_region_item*,
2080
+ const int32_t* pts_array, int nPoints,
2081
+ struct heif_region** out_region);
2082
+
2083
+ LIBHEIF_API
2084
+ struct heif_error heif_region_item_add_region_polyline(struct heif_region_item*,
2085
+ const int32_t* pts_array, int nPoints,
2086
+ struct heif_region** out_region);
2087
+
2088
+ #ifdef __cplusplus
2089
+ }
2090
+ #endif
2091
+
2092
+ #endif