@basemaps/lambda-tiler 6.28.1 → 6.29.0

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 (448) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/__tests__/xyz.util.d.ts.map +1 -1
  3. package/build/__tests__/xyz.util.js +0 -1
  4. package/build/index.d.ts.map +1 -1
  5. package/build/index.js +5 -0
  6. package/build/routes/__tests__/attribution.test.js +0 -1
  7. package/build/routes/__tests__/fonts.test.d.ts +2 -0
  8. package/build/routes/__tests__/fonts.test.d.ts.map +1 -0
  9. package/build/routes/__tests__/fonts.test.js +60 -0
  10. package/build/routes/__tests__/memory.fs.d.ts +18 -0
  11. package/build/routes/__tests__/memory.fs.d.ts.map +1 -0
  12. package/build/routes/__tests__/memory.fs.js +73 -0
  13. package/build/routes/__tests__/sprites.test.d.ts +2 -0
  14. package/build/routes/__tests__/sprites.test.d.ts.map +1 -0
  15. package/build/routes/__tests__/sprites.test.js +55 -0
  16. package/build/routes/fonts.d.ts +13 -0
  17. package/build/routes/fonts.d.ts.map +1 -0
  18. package/build/routes/fonts.js +50 -0
  19. package/build/routes/sprites.d.ts +9 -0
  20. package/build/routes/sprites.d.ts.map +1 -0
  21. package/build/routes/sprites.js +42 -0
  22. package/dist/index.js +183 -0
  23. package/dist/node_modules/.package-lock.json +488 -0
  24. package/dist/node_modules/base64-js/LICENSE +21 -0
  25. package/dist/node_modules/base64-js/README.md +34 -0
  26. package/dist/node_modules/base64-js/base64js.min.js +1 -0
  27. package/dist/node_modules/base64-js/index.d.ts +3 -0
  28. package/dist/node_modules/base64-js/index.js +150 -0
  29. package/dist/node_modules/base64-js/package.json +47 -0
  30. package/dist/node_modules/bl/.travis.yml +17 -0
  31. package/dist/node_modules/bl/BufferList.js +396 -0
  32. package/dist/node_modules/bl/LICENSE.md +13 -0
  33. package/dist/node_modules/bl/README.md +247 -0
  34. package/dist/node_modules/bl/bl.js +84 -0
  35. package/dist/node_modules/bl/package.json +37 -0
  36. package/dist/node_modules/bl/test/convert.js +21 -0
  37. package/dist/node_modules/bl/test/indexOf.js +492 -0
  38. package/dist/node_modules/bl/test/isBufferList.js +32 -0
  39. package/dist/node_modules/bl/test/test.js +869 -0
  40. package/dist/node_modules/buffer/AUTHORS.md +70 -0
  41. package/dist/node_modules/buffer/LICENSE +21 -0
  42. package/dist/node_modules/buffer/README.md +410 -0
  43. package/dist/node_modules/buffer/index.d.ts +186 -0
  44. package/dist/node_modules/buffer/index.js +1817 -0
  45. package/dist/node_modules/buffer/package.json +96 -0
  46. package/dist/node_modules/chownr/LICENSE +15 -0
  47. package/dist/node_modules/chownr/README.md +3 -0
  48. package/dist/node_modules/chownr/chownr.js +167 -0
  49. package/dist/node_modules/chownr/package.json +29 -0
  50. package/dist/node_modules/color/LICENSE +21 -0
  51. package/dist/node_modules/color/README.md +123 -0
  52. package/dist/node_modules/color/index.js +496 -0
  53. package/dist/node_modules/color/package.json +47 -0
  54. package/dist/node_modules/color-convert/CHANGELOG.md +54 -0
  55. package/dist/node_modules/color-convert/LICENSE +21 -0
  56. package/dist/node_modules/color-convert/README.md +68 -0
  57. package/dist/node_modules/color-convert/conversions.js +839 -0
  58. package/dist/node_modules/color-convert/index.js +81 -0
  59. package/dist/node_modules/color-convert/package.json +48 -0
  60. package/dist/node_modules/color-convert/route.js +97 -0
  61. package/dist/node_modules/color-name/LICENSE +8 -0
  62. package/dist/node_modules/color-name/README.md +11 -0
  63. package/dist/node_modules/color-name/index.js +152 -0
  64. package/dist/node_modules/color-name/package.json +28 -0
  65. package/dist/node_modules/color-string/LICENSE +21 -0
  66. package/dist/node_modules/color-string/README.md +62 -0
  67. package/dist/node_modules/color-string/index.js +242 -0
  68. package/dist/node_modules/color-string/package.json +39 -0
  69. package/dist/node_modules/decompress-response/index.d.ts +22 -0
  70. package/dist/node_modules/decompress-response/index.js +58 -0
  71. package/dist/node_modules/decompress-response/license +9 -0
  72. package/dist/node_modules/decompress-response/package.json +56 -0
  73. package/dist/node_modules/decompress-response/readme.md +48 -0
  74. package/dist/node_modules/deep-extend/CHANGELOG.md +46 -0
  75. package/dist/node_modules/deep-extend/LICENSE +20 -0
  76. package/dist/node_modules/deep-extend/README.md +91 -0
  77. package/dist/node_modules/deep-extend/index.js +1 -0
  78. package/dist/node_modules/deep-extend/lib/deep-extend.js +150 -0
  79. package/dist/node_modules/deep-extend/package.json +62 -0
  80. package/dist/node_modules/detect-libc/LICENSE +201 -0
  81. package/dist/node_modules/detect-libc/README.md +160 -0
  82. package/dist/node_modules/detect-libc/index.d.ts +11 -0
  83. package/dist/node_modules/detect-libc/lib/detect-libc.js +178 -0
  84. package/dist/node_modules/detect-libc/lib/process.js +16 -0
  85. package/dist/node_modules/detect-libc/package.json +36 -0
  86. package/dist/node_modules/end-of-stream/LICENSE +21 -0
  87. package/dist/node_modules/end-of-stream/README.md +54 -0
  88. package/dist/node_modules/end-of-stream/index.js +94 -0
  89. package/dist/node_modules/end-of-stream/package.json +37 -0
  90. package/dist/node_modules/expand-template/.travis.yml +6 -0
  91. package/dist/node_modules/expand-template/LICENSE +21 -0
  92. package/dist/node_modules/expand-template/README.md +43 -0
  93. package/dist/node_modules/expand-template/index.js +26 -0
  94. package/dist/node_modules/expand-template/package.json +29 -0
  95. package/dist/node_modules/expand-template/test.js +67 -0
  96. package/dist/node_modules/fs-constants/LICENSE +21 -0
  97. package/dist/node_modules/fs-constants/README.md +26 -0
  98. package/dist/node_modules/fs-constants/browser.js +1 -0
  99. package/dist/node_modules/fs-constants/index.js +1 -0
  100. package/dist/node_modules/fs-constants/package.json +19 -0
  101. package/dist/node_modules/github-from-package/.travis.yml +4 -0
  102. package/dist/node_modules/github-from-package/LICENSE +18 -0
  103. package/dist/node_modules/github-from-package/example/package.json +8 -0
  104. package/dist/node_modules/github-from-package/example/url.js +3 -0
  105. package/dist/node_modules/github-from-package/index.js +17 -0
  106. package/dist/node_modules/github-from-package/package.json +30 -0
  107. package/dist/node_modules/github-from-package/readme.markdown +53 -0
  108. package/dist/node_modules/github-from-package/test/a.json +8 -0
  109. package/dist/node_modules/github-from-package/test/b.json +5 -0
  110. package/dist/node_modules/github-from-package/test/c.json +5 -0
  111. package/dist/node_modules/github-from-package/test/d.json +7 -0
  112. package/dist/node_modules/github-from-package/test/e.json +5 -0
  113. package/dist/node_modules/github-from-package/test/url.js +19 -0
  114. package/dist/node_modules/ieee754/LICENSE +11 -0
  115. package/dist/node_modules/ieee754/README.md +51 -0
  116. package/dist/node_modules/ieee754/index.d.ts +10 -0
  117. package/dist/node_modules/ieee754/index.js +85 -0
  118. package/dist/node_modules/ieee754/package.json +52 -0
  119. package/dist/node_modules/inherits/LICENSE +16 -0
  120. package/dist/node_modules/inherits/README.md +42 -0
  121. package/dist/node_modules/inherits/inherits.js +9 -0
  122. package/dist/node_modules/inherits/inherits_browser.js +27 -0
  123. package/dist/node_modules/inherits/package.json +29 -0
  124. package/dist/node_modules/ini/LICENSE +15 -0
  125. package/dist/node_modules/ini/README.md +102 -0
  126. package/dist/node_modules/ini/ini.js +206 -0
  127. package/dist/node_modules/ini/package.json +33 -0
  128. package/dist/node_modules/is-arrayish/LICENSE +21 -0
  129. package/dist/node_modules/is-arrayish/README.md +16 -0
  130. package/dist/node_modules/is-arrayish/index.js +9 -0
  131. package/dist/node_modules/is-arrayish/package.json +45 -0
  132. package/dist/node_modules/is-arrayish/yarn-error.log +1443 -0
  133. package/dist/node_modules/lru-cache/LICENSE +15 -0
  134. package/dist/node_modules/lru-cache/README.md +166 -0
  135. package/dist/node_modules/lru-cache/index.js +334 -0
  136. package/dist/node_modules/lru-cache/package.json +34 -0
  137. package/dist/node_modules/mimic-response/index.d.ts +17 -0
  138. package/dist/node_modules/mimic-response/index.js +77 -0
  139. package/dist/node_modules/mimic-response/license +9 -0
  140. package/dist/node_modules/mimic-response/package.json +42 -0
  141. package/dist/node_modules/mimic-response/readme.md +78 -0
  142. package/dist/node_modules/minimist/.travis.yml +8 -0
  143. package/dist/node_modules/minimist/LICENSE +18 -0
  144. package/dist/node_modules/minimist/example/parse.js +2 -0
  145. package/dist/node_modules/minimist/index.js +249 -0
  146. package/dist/node_modules/minimist/package.json +45 -0
  147. package/dist/node_modules/minimist/readme.markdown +98 -0
  148. package/dist/node_modules/minimist/test/all_bool.js +32 -0
  149. package/dist/node_modules/minimist/test/bool.js +178 -0
  150. package/dist/node_modules/minimist/test/dash.js +31 -0
  151. package/dist/node_modules/minimist/test/default_bool.js +35 -0
  152. package/dist/node_modules/minimist/test/dotted.js +22 -0
  153. package/dist/node_modules/minimist/test/kv_short.js +16 -0
  154. package/dist/node_modules/minimist/test/long.js +31 -0
  155. package/dist/node_modules/minimist/test/num.js +36 -0
  156. package/dist/node_modules/minimist/test/parse.js +197 -0
  157. package/dist/node_modules/minimist/test/parse_modified.js +9 -0
  158. package/dist/node_modules/minimist/test/proto.js +60 -0
  159. package/dist/node_modules/minimist/test/short.js +67 -0
  160. package/dist/node_modules/minimist/test/stop_early.js +15 -0
  161. package/dist/node_modules/minimist/test/unknown.js +102 -0
  162. package/dist/node_modules/minimist/test/whitespace.js +8 -0
  163. package/dist/node_modules/mkdirp-classic/LICENSE +21 -0
  164. package/dist/node_modules/mkdirp-classic/README.md +18 -0
  165. package/dist/node_modules/mkdirp-classic/index.js +98 -0
  166. package/dist/node_modules/mkdirp-classic/package.json +18 -0
  167. package/dist/node_modules/napi-build-utils/LICENSE +21 -0
  168. package/dist/node_modules/napi-build-utils/README.md +48 -0
  169. package/dist/node_modules/napi-build-utils/index.js +213 -0
  170. package/dist/node_modules/napi-build-utils/index.md +81 -0
  171. package/dist/node_modules/napi-build-utils/package.json +41 -0
  172. package/dist/node_modules/node-abi/.circleci/config.yml +63 -0
  173. package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +41 -0
  174. package/dist/node_modules/node-abi/.releaserc.json +9 -0
  175. package/dist/node_modules/node-abi/CODE_OF_CONDUCT.md +73 -0
  176. package/dist/node_modules/node-abi/CONTRIBUTING.md +62 -0
  177. package/dist/node_modules/node-abi/LICENSE +21 -0
  178. package/dist/node_modules/node-abi/README.md +50 -0
  179. package/dist/node_modules/node-abi/abi_registry.json +210 -0
  180. package/dist/node_modules/node-abi/index.js +179 -0
  181. package/dist/node_modules/node-abi/package.json +39 -0
  182. package/dist/node_modules/node-abi/scripts/update-abi-registry.js +119 -0
  183. package/dist/node_modules/node-abi/test/index.js +166 -0
  184. package/dist/node_modules/node-addon-api/LICENSE.md +13 -0
  185. package/dist/node_modules/node-addon-api/README.md +293 -0
  186. package/dist/node_modules/node-addon-api/common.gypi +21 -0
  187. package/dist/node_modules/node-addon-api/except.gypi +25 -0
  188. package/dist/node_modules/node-addon-api/index.js +11 -0
  189. package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
  190. package/dist/node_modules/node-addon-api/napi-inl.h +6259 -0
  191. package/dist/node_modules/node-addon-api/napi.h +3003 -0
  192. package/dist/node_modules/node-addon-api/node_api.gyp +9 -0
  193. package/dist/node_modules/node-addon-api/noexcept.gypi +26 -0
  194. package/dist/node_modules/node-addon-api/nothing.c +0 -0
  195. package/dist/node_modules/node-addon-api/package-support.json +21 -0
  196. package/dist/node_modules/node-addon-api/package.json +415 -0
  197. package/dist/node_modules/node-addon-api/tools/README.md +73 -0
  198. package/dist/node_modules/node-addon-api/tools/check-napi.js +100 -0
  199. package/dist/node_modules/node-addon-api/tools/clang-format.js +71 -0
  200. package/dist/node_modules/node-addon-api/tools/conversion.js +309 -0
  201. package/dist/node_modules/node-addon-api/tools/eslint-format.js +71 -0
  202. package/dist/node_modules/once/LICENSE +15 -0
  203. package/dist/node_modules/once/README.md +79 -0
  204. package/dist/node_modules/once/once.js +42 -0
  205. package/dist/node_modules/once/package.json +33 -0
  206. package/dist/node_modules/prebuild-install/CHANGELOG.md +116 -0
  207. package/dist/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
  208. package/dist/node_modules/prebuild-install/LICENSE +21 -0
  209. package/dist/node_modules/prebuild-install/README.md +163 -0
  210. package/dist/node_modules/prebuild-install/asset.js +44 -0
  211. package/dist/node_modules/prebuild-install/bin.js +78 -0
  212. package/dist/node_modules/prebuild-install/download.js +142 -0
  213. package/dist/node_modules/prebuild-install/error.js +14 -0
  214. package/dist/node_modules/prebuild-install/help.txt +16 -0
  215. package/dist/node_modules/prebuild-install/index.js +1 -0
  216. package/dist/node_modules/prebuild-install/log.js +33 -0
  217. package/dist/node_modules/prebuild-install/package.json +67 -0
  218. package/dist/node_modules/prebuild-install/proxy.js +35 -0
  219. package/dist/node_modules/prebuild-install/rc.js +64 -0
  220. package/dist/node_modules/prebuild-install/util.js +143 -0
  221. package/dist/node_modules/pump/.travis.yml +5 -0
  222. package/dist/node_modules/pump/LICENSE +21 -0
  223. package/dist/node_modules/pump/README.md +65 -0
  224. package/dist/node_modules/pump/index.js +82 -0
  225. package/dist/node_modules/pump/package.json +24 -0
  226. package/dist/node_modules/pump/test-browser.js +66 -0
  227. package/dist/node_modules/pump/test-node.js +53 -0
  228. package/dist/node_modules/rc/LICENSE.APACHE2 +15 -0
  229. package/dist/node_modules/rc/LICENSE.BSD +26 -0
  230. package/dist/node_modules/rc/LICENSE.MIT +24 -0
  231. package/dist/node_modules/rc/README.md +227 -0
  232. package/dist/node_modules/rc/browser.js +7 -0
  233. package/dist/node_modules/rc/cli.js +4 -0
  234. package/dist/node_modules/rc/index.js +53 -0
  235. package/dist/node_modules/rc/lib/utils.js +104 -0
  236. package/dist/node_modules/rc/package.json +29 -0
  237. package/dist/node_modules/rc/test/ini.js +16 -0
  238. package/dist/node_modules/rc/test/nested-env-vars.js +50 -0
  239. package/dist/node_modules/rc/test/test.js +59 -0
  240. package/dist/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  241. package/dist/node_modules/readable-stream/GOVERNANCE.md +136 -0
  242. package/dist/node_modules/readable-stream/LICENSE +47 -0
  243. package/dist/node_modules/readable-stream/README.md +106 -0
  244. package/dist/node_modules/readable-stream/errors-browser.js +127 -0
  245. package/dist/node_modules/readable-stream/errors.js +116 -0
  246. package/dist/node_modules/readable-stream/experimentalWarning.js +17 -0
  247. package/dist/node_modules/readable-stream/lib/_stream_duplex.js +139 -0
  248. package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +39 -0
  249. package/dist/node_modules/readable-stream/lib/_stream_readable.js +1124 -0
  250. package/dist/node_modules/readable-stream/lib/_stream_transform.js +201 -0
  251. package/dist/node_modules/readable-stream/lib/_stream_writable.js +697 -0
  252. package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
  253. package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
  254. package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +105 -0
  255. package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
  256. package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  257. package/dist/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
  258. package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
  259. package/dist/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
  260. package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  261. package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  262. package/dist/node_modules/readable-stream/package.json +68 -0
  263. package/dist/node_modules/readable-stream/readable-browser.js +9 -0
  264. package/dist/node_modules/readable-stream/readable.js +16 -0
  265. package/dist/node_modules/safe-buffer/LICENSE +21 -0
  266. package/dist/node_modules/safe-buffer/README.md +584 -0
  267. package/dist/node_modules/safe-buffer/index.d.ts +187 -0
  268. package/dist/node_modules/safe-buffer/index.js +65 -0
  269. package/dist/node_modules/safe-buffer/package.json +51 -0
  270. package/dist/node_modules/semver/LICENSE +15 -0
  271. package/dist/node_modules/semver/README.md +568 -0
  272. package/dist/node_modules/semver/bin/semver.js +183 -0
  273. package/dist/node_modules/semver/classes/comparator.js +136 -0
  274. package/dist/node_modules/semver/classes/index.js +5 -0
  275. package/dist/node_modules/semver/classes/range.js +519 -0
  276. package/dist/node_modules/semver/classes/semver.js +287 -0
  277. package/dist/node_modules/semver/functions/clean.js +6 -0
  278. package/dist/node_modules/semver/functions/cmp.js +52 -0
  279. package/dist/node_modules/semver/functions/coerce.js +52 -0
  280. package/dist/node_modules/semver/functions/compare-build.js +7 -0
  281. package/dist/node_modules/semver/functions/compare-loose.js +3 -0
  282. package/dist/node_modules/semver/functions/compare.js +5 -0
  283. package/dist/node_modules/semver/functions/diff.js +23 -0
  284. package/dist/node_modules/semver/functions/eq.js +3 -0
  285. package/dist/node_modules/semver/functions/gt.js +3 -0
  286. package/dist/node_modules/semver/functions/gte.js +3 -0
  287. package/dist/node_modules/semver/functions/inc.js +18 -0
  288. package/dist/node_modules/semver/functions/lt.js +3 -0
  289. package/dist/node_modules/semver/functions/lte.js +3 -0
  290. package/dist/node_modules/semver/functions/major.js +3 -0
  291. package/dist/node_modules/semver/functions/minor.js +3 -0
  292. package/dist/node_modules/semver/functions/neq.js +3 -0
  293. package/dist/node_modules/semver/functions/parse.js +33 -0
  294. package/dist/node_modules/semver/functions/patch.js +3 -0
  295. package/dist/node_modules/semver/functions/prerelease.js +6 -0
  296. package/dist/node_modules/semver/functions/rcompare.js +3 -0
  297. package/dist/node_modules/semver/functions/rsort.js +3 -0
  298. package/dist/node_modules/semver/functions/satisfies.js +10 -0
  299. package/dist/node_modules/semver/functions/sort.js +3 -0
  300. package/dist/node_modules/semver/functions/valid.js +6 -0
  301. package/dist/node_modules/semver/index.js +48 -0
  302. package/dist/node_modules/semver/internal/constants.js +17 -0
  303. package/dist/node_modules/semver/internal/debug.js +9 -0
  304. package/dist/node_modules/semver/internal/identifiers.js +23 -0
  305. package/dist/node_modules/semver/internal/parse-options.js +11 -0
  306. package/dist/node_modules/semver/internal/re.js +182 -0
  307. package/dist/node_modules/semver/package.json +75 -0
  308. package/dist/node_modules/semver/preload.js +2 -0
  309. package/dist/node_modules/semver/range.bnf +16 -0
  310. package/dist/node_modules/semver/ranges/gtr.js +4 -0
  311. package/dist/node_modules/semver/ranges/intersects.js +7 -0
  312. package/dist/node_modules/semver/ranges/ltr.js +4 -0
  313. package/dist/node_modules/semver/ranges/max-satisfying.js +25 -0
  314. package/dist/node_modules/semver/ranges/min-satisfying.js +24 -0
  315. package/dist/node_modules/semver/ranges/min-version.js +61 -0
  316. package/dist/node_modules/semver/ranges/outside.js +80 -0
  317. package/dist/node_modules/semver/ranges/simplify.js +47 -0
  318. package/dist/node_modules/semver/ranges/subset.js +244 -0
  319. package/dist/node_modules/semver/ranges/to-comparators.js +8 -0
  320. package/dist/node_modules/semver/ranges/valid.js +11 -0
  321. package/dist/node_modules/sharp/LICENSE +191 -0
  322. package/dist/node_modules/sharp/README.md +117 -0
  323. package/dist/node_modules/sharp/binding.gyp +233 -0
  324. package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
  325. package/dist/node_modules/sharp/install/can-compile.js +11 -0
  326. package/dist/node_modules/sharp/install/dll-copy.js +37 -0
  327. package/dist/node_modules/sharp/install/libvips.js +215 -0
  328. package/dist/node_modules/sharp/lib/agent.js +40 -0
  329. package/dist/node_modules/sharp/lib/channel.js +171 -0
  330. package/dist/node_modules/sharp/lib/colour.js +180 -0
  331. package/dist/node_modules/sharp/lib/composite.js +193 -0
  332. package/dist/node_modules/sharp/lib/constructor.js +386 -0
  333. package/dist/node_modules/sharp/lib/index.js +13 -0
  334. package/dist/node_modules/sharp/lib/input.js +507 -0
  335. package/dist/node_modules/sharp/lib/is.js +143 -0
  336. package/dist/node_modules/sharp/lib/libvips.js +136 -0
  337. package/dist/node_modules/sharp/lib/operation.js +803 -0
  338. package/dist/node_modules/sharp/lib/output.js +1231 -0
  339. package/dist/node_modules/sharp/lib/platform.js +27 -0
  340. package/dist/node_modules/sharp/lib/resize.js +473 -0
  341. package/dist/node_modules/sharp/lib/sharp.js +35 -0
  342. package/dist/node_modules/sharp/lib/utility.js +211 -0
  343. package/dist/node_modules/sharp/package.json +196 -0
  344. package/dist/node_modules/sharp/src/common.cc +966 -0
  345. package/dist/node_modules/sharp/src/common.h +352 -0
  346. package/dist/node_modules/sharp/src/libvips/cplusplus/VConnection.cpp +152 -0
  347. package/dist/node_modules/sharp/src/libvips/cplusplus/VError.cpp +50 -0
  348. package/dist/node_modules/sharp/src/libvips/cplusplus/VImage.cpp +1523 -0
  349. package/dist/node_modules/sharp/src/libvips/cplusplus/VInterpolate.cpp +63 -0
  350. package/dist/node_modules/sharp/src/libvips/cplusplus/vips-operators.cpp +3738 -0
  351. package/dist/node_modules/sharp/src/metadata.cc +291 -0
  352. package/dist/node_modules/sharp/src/metadata.h +92 -0
  353. package/dist/node_modules/sharp/src/operations.cc +412 -0
  354. package/dist/node_modules/sharp/src/operations.h +126 -0
  355. package/dist/node_modules/sharp/src/pipeline.cc +1624 -0
  356. package/dist/node_modules/sharp/src/pipeline.h +349 -0
  357. package/dist/node_modules/sharp/src/sharp.cc +52 -0
  358. package/dist/node_modules/sharp/src/stats.cc +193 -0
  359. package/dist/node_modules/sharp/src/stats.h +70 -0
  360. package/dist/node_modules/sharp/src/utilities.cc +243 -0
  361. package/dist/node_modules/sharp/src/utilities.h +29 -0
  362. package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/THIRD-PARTY-NOTICES.md +43 -0
  363. package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/lib/libvips-cpp.so.42 +0 -0
  364. package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/platform.json +1 -0
  365. package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/versions.json +31 -0
  366. package/dist/node_modules/simple-concat/.travis.yml +3 -0
  367. package/dist/node_modules/simple-concat/LICENSE +20 -0
  368. package/dist/node_modules/simple-concat/README.md +44 -0
  369. package/dist/node_modules/simple-concat/index.js +15 -0
  370. package/dist/node_modules/simple-concat/package.json +47 -0
  371. package/dist/node_modules/simple-concat/test/basic.js +41 -0
  372. package/dist/node_modules/simple-get/.github/dependabot.yml +15 -0
  373. package/dist/node_modules/simple-get/.github/workflows/ci.yml +23 -0
  374. package/dist/node_modules/simple-get/LICENSE +20 -0
  375. package/dist/node_modules/simple-get/README.md +333 -0
  376. package/dist/node_modules/simple-get/index.js +108 -0
  377. package/dist/node_modules/simple-get/package.json +67 -0
  378. package/dist/node_modules/simple-swizzle/LICENSE +21 -0
  379. package/dist/node_modules/simple-swizzle/README.md +39 -0
  380. package/dist/node_modules/simple-swizzle/index.js +29 -0
  381. package/dist/node_modules/simple-swizzle/package.json +36 -0
  382. package/dist/node_modules/string_decoder/LICENSE +48 -0
  383. package/dist/node_modules/string_decoder/README.md +47 -0
  384. package/dist/node_modules/string_decoder/lib/string_decoder.js +296 -0
  385. package/dist/node_modules/string_decoder/package.json +34 -0
  386. package/dist/node_modules/strip-json-comments/index.js +70 -0
  387. package/dist/node_modules/strip-json-comments/license +21 -0
  388. package/dist/node_modules/strip-json-comments/package.json +42 -0
  389. package/dist/node_modules/strip-json-comments/readme.md +64 -0
  390. package/dist/node_modules/tar-fs/.travis.yml +6 -0
  391. package/dist/node_modules/tar-fs/LICENSE +21 -0
  392. package/dist/node_modules/tar-fs/README.md +165 -0
  393. package/dist/node_modules/tar-fs/index.js +351 -0
  394. package/dist/node_modules/tar-fs/package.json +41 -0
  395. package/dist/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
  396. package/dist/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
  397. package/dist/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  398. package/dist/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  399. package/dist/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  400. package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  401. package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  402. package/dist/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  403. package/dist/node_modules/tar-fs/test/fixtures/e/file +0 -0
  404. package/dist/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  405. package/dist/node_modules/tar-fs/test/index.js +346 -0
  406. package/dist/node_modules/tar-stream/LICENSE +21 -0
  407. package/dist/node_modules/tar-stream/README.md +168 -0
  408. package/dist/node_modules/tar-stream/extract.js +257 -0
  409. package/dist/node_modules/tar-stream/headers.js +295 -0
  410. package/dist/node_modules/tar-stream/index.js +2 -0
  411. package/dist/node_modules/tar-stream/pack.js +255 -0
  412. package/dist/node_modules/tar-stream/package.json +58 -0
  413. package/dist/node_modules/tar-stream/sandbox.js +11 -0
  414. package/dist/node_modules/tunnel-agent/LICENSE +55 -0
  415. package/dist/node_modules/tunnel-agent/README.md +4 -0
  416. package/dist/node_modules/tunnel-agent/index.js +244 -0
  417. package/dist/node_modules/tunnel-agent/package.json +22 -0
  418. package/dist/node_modules/util-deprecate/History.md +16 -0
  419. package/dist/node_modules/util-deprecate/LICENSE +24 -0
  420. package/dist/node_modules/util-deprecate/README.md +53 -0
  421. package/dist/node_modules/util-deprecate/browser.js +67 -0
  422. package/dist/node_modules/util-deprecate/node.js +6 -0
  423. package/dist/node_modules/util-deprecate/package.json +27 -0
  424. package/dist/node_modules/wrappy/LICENSE +15 -0
  425. package/dist/node_modules/wrappy/README.md +36 -0
  426. package/dist/node_modules/wrappy/package.json +29 -0
  427. package/dist/node_modules/wrappy/wrappy.js +33 -0
  428. package/dist/node_modules/yallist/LICENSE +15 -0
  429. package/dist/node_modules/yallist/README.md +204 -0
  430. package/dist/node_modules/yallist/iterator.js +8 -0
  431. package/dist/node_modules/yallist/package.json +29 -0
  432. package/dist/node_modules/yallist/yallist.js +426 -0
  433. package/dist/package-lock.json +830 -0
  434. package/dist/package.json +39 -0
  435. package/dist/static/expected_tile_2193_153_255_z7.png +0 -0
  436. package/dist/static/expected_tile_NZTM2000Quad_30_33_z6.png +0 -0
  437. package/dist/static/expected_tile_WebMercatorQuad_252_156_z8.png +0 -0
  438. package/package.json +9 -9
  439. package/scripts/create.deployment.package.mjs +1 -1
  440. package/src/__tests__/xyz.util.ts +0 -1
  441. package/src/index.ts +7 -0
  442. package/src/routes/__tests__/attribution.test.ts +0 -1
  443. package/src/routes/__tests__/fonts.test.ts +71 -0
  444. package/src/routes/__tests__/memory.fs.ts +77 -0
  445. package/src/routes/__tests__/sprites.test.ts +64 -0
  446. package/src/routes/fonts.ts +54 -0
  447. package/src/routes/sprites.ts +49 -0
  448. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,1523 @@
1
+ /* Object part of VImage class
2
+ *
3
+ * 30/12/14
4
+ * - allow set enum value from string
5
+ * 10/6/16
6
+ * - missing implementation of VImage::write()
7
+ * 11/6/16
8
+ * - added arithmetic assignment overloads, += etc.
9
+ */
10
+
11
+ /*
12
+
13
+ Copyright (C) 1991-2001 The National Gallery
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU Lesser General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU Lesser General Public License for more details.
24
+
25
+ You should have received a copy of the GNU Lesser General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28
+ 02110-1301 USA
29
+
30
+ */
31
+
32
+ /*
33
+
34
+ These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
35
+
36
+ */
37
+
38
+ #ifdef HAVE_CONFIG_H
39
+ #include <config.h>
40
+ #endif /*HAVE_CONFIG_H*/
41
+ #include <vips/intl.h>
42
+
43
+ #include <vips/vips8>
44
+
45
+ #include <vips/debug.h>
46
+
47
+ /*
48
+ #define VIPS_DEBUG
49
+ #define VIPS_DEBUG_VERBOSE
50
+ */
51
+
52
+ VIPS_NAMESPACE_START
53
+
54
+ /**
55
+ * \namespace vips
56
+ *
57
+ * General docs for the vips namespace.
58
+ */
59
+
60
+ std::vector<double>
61
+ to_vectorv( int n, ... )
62
+ {
63
+ std::vector<double> vector( n );
64
+ va_list ap;
65
+
66
+ va_start( ap, n );
67
+ for( int i = 0; i < n; i++ )
68
+ vector[i] = va_arg( ap, double );
69
+ va_end( ap );
70
+
71
+ return( vector );
72
+ }
73
+
74
+ std::vector<double>
75
+ to_vector( double value )
76
+ {
77
+ return( to_vectorv( 1, value ) );
78
+ }
79
+
80
+ std::vector<double>
81
+ to_vector( int n, double array[] )
82
+ {
83
+ std::vector<double> vector( n );
84
+
85
+ for( int i = 0; i < n; i++ )
86
+ vector[i] = array[i];
87
+
88
+ return( vector );
89
+ }
90
+
91
+ std::vector<double>
92
+ negate( std::vector<double> vector )
93
+ {
94
+ std::vector<double> new_vector( vector.size() );
95
+
96
+ for( std::vector<double>::size_type i = 0; i < vector.size(); i++ )
97
+ new_vector[i] = vector[i] * -1;
98
+
99
+ return( new_vector );
100
+ }
101
+
102
+ std::vector<double>
103
+ invert( std::vector<double> vector )
104
+ {
105
+ std::vector<double> new_vector( vector.size() );
106
+
107
+ for( std::vector<double>::size_type i = 0; i < vector.size(); i++ )
108
+ new_vector[i] = 1.0 / vector[i];
109
+
110
+ return( new_vector );
111
+ }
112
+
113
+ VOption::~VOption()
114
+ {
115
+ std::list<Pair *>::iterator i;
116
+
117
+ for( i = options.begin(); i != options.end(); ++i )
118
+ delete *i;
119
+ }
120
+
121
+ // input bool
122
+ VOption *
123
+ VOption::set( const char *name, bool value )
124
+ {
125
+ Pair *pair = new Pair( name );
126
+
127
+ pair->input = true;
128
+ g_value_init( &pair->value, G_TYPE_BOOLEAN );
129
+ g_value_set_boolean( &pair->value, value );
130
+ options.push_back( pair );
131
+
132
+ return( this );
133
+ }
134
+
135
+ // input int ... this path is used for enums as well
136
+ VOption *
137
+ VOption::set( const char *name, int value )
138
+ {
139
+ Pair *pair = new Pair( name );
140
+
141
+ pair->input = true;
142
+ g_value_init( &pair->value, G_TYPE_INT );
143
+ g_value_set_int( &pair->value, value );
144
+ options.push_back( pair );
145
+
146
+ return( this );
147
+ }
148
+
149
+ // input guint64
150
+ VOption *
151
+ VOption::set( const char *name, guint64 value )
152
+ {
153
+ Pair *pair = new Pair( name );
154
+
155
+ pair->input = true;
156
+ g_value_init( &pair->value, G_TYPE_UINT64 );
157
+ g_value_set_uint64( &pair->value, value );
158
+ options.push_back( pair );
159
+
160
+ return( this );
161
+ }
162
+
163
+ // input double
164
+ VOption *
165
+ VOption::set( const char *name, double value )
166
+ {
167
+ Pair *pair = new Pair( name );
168
+
169
+ pair->input = true;
170
+ g_value_init( &pair->value, G_TYPE_DOUBLE );
171
+ g_value_set_double( &pair->value, value );
172
+ options.push_back( pair );
173
+
174
+ return( this );
175
+ }
176
+
177
+ VOption *
178
+ VOption::set( const char *name, const char *value )
179
+ {
180
+ Pair *pair = new Pair( name );
181
+
182
+ pair->input = true;
183
+ g_value_init( &pair->value, G_TYPE_STRING );
184
+ g_value_set_string( &pair->value, value );
185
+ options.push_back( pair );
186
+
187
+ return( this );
188
+ }
189
+
190
+ // input vips object (image, source, target, etc. etc.)
191
+ VOption *
192
+ VOption::set( const char *name, const VObject value )
193
+ {
194
+ Pair *pair = new Pair( name );
195
+ VipsObject *object = value.get_object();
196
+ GType type = G_OBJECT_TYPE( object );
197
+
198
+ pair->input = true;
199
+ g_value_init( &pair->value, type );
200
+ g_value_set_object( &pair->value, object );
201
+ options.push_back( pair );
202
+
203
+ return( this );
204
+ }
205
+
206
+ // input int array
207
+ VOption *
208
+ VOption::set( const char *name, std::vector<int> value )
209
+ {
210
+ Pair *pair = new Pair( name );
211
+
212
+ int *array;
213
+
214
+ pair->input = true;
215
+
216
+ g_value_init( &pair->value, VIPS_TYPE_ARRAY_INT );
217
+ vips_value_set_array_int( &pair->value, NULL,
218
+ static_cast< int >( value.size() ) );
219
+ array = vips_value_get_array_int( &pair->value, NULL );
220
+
221
+ for( std::vector<double>::size_type i = 0; i < value.size(); i++ )
222
+ array[i] = value[i];
223
+
224
+ options.push_back( pair );
225
+
226
+ return( this );
227
+ }
228
+
229
+ // input double array
230
+ VOption *
231
+ VOption::set( const char *name, std::vector<double> value )
232
+ {
233
+ Pair *pair = new Pair( name );
234
+
235
+ double *array;
236
+
237
+ pair->input = true;
238
+
239
+ g_value_init( &pair->value, VIPS_TYPE_ARRAY_DOUBLE );
240
+ vips_value_set_array_double( &pair->value, NULL,
241
+ static_cast< int >( value.size() ) );
242
+ array = vips_value_get_array_double( &pair->value, NULL );
243
+
244
+ for( std::vector<double>::size_type i = 0; i < value.size(); i++ )
245
+ array[i] = value[i];
246
+
247
+ options.push_back( pair );
248
+
249
+ return( this );
250
+ }
251
+
252
+ // input image array
253
+ VOption *
254
+ VOption::set( const char *name, std::vector<VImage> value )
255
+ {
256
+ Pair *pair = new Pair( name );
257
+
258
+ VipsImage **array;
259
+
260
+ pair->input = true;
261
+
262
+ g_value_init( &pair->value, VIPS_TYPE_ARRAY_IMAGE );
263
+ vips_value_set_array_image( &pair->value,
264
+ static_cast< int >( value.size() ) );
265
+ array = vips_value_get_array_image( &pair->value, NULL );
266
+
267
+ for( std::vector<double>::size_type i = 0; i < value.size(); i++ ) {
268
+ VipsImage *vips_image = value[i].get_image();
269
+
270
+ array[i] = vips_image;
271
+ g_object_ref( vips_image );
272
+ }
273
+
274
+ options.push_back( pair );
275
+
276
+ return( this );
277
+ }
278
+
279
+ // input blob
280
+ VOption *
281
+ VOption::set( const char *name, VipsBlob *value )
282
+ {
283
+ Pair *pair = new Pair( name );
284
+
285
+ pair->input = true;
286
+ g_value_init( &pair->value, VIPS_TYPE_BLOB );
287
+ g_value_set_boxed( &pair->value, value );
288
+ options.push_back( pair );
289
+
290
+ return( this );
291
+ }
292
+
293
+ // output bool
294
+ VOption *
295
+ VOption::set( const char *name, bool *value )
296
+ {
297
+ Pair *pair = new Pair( name );
298
+
299
+ pair->input = false;
300
+ pair->vbool = value;
301
+ g_value_init( &pair->value, G_TYPE_BOOLEAN );
302
+
303
+ options.push_back( pair );
304
+
305
+ return( this );
306
+ }
307
+
308
+ // output int
309
+ VOption *
310
+ VOption::set( const char *name, int *value )
311
+ {
312
+ Pair *pair = new Pair( name );
313
+
314
+ pair->input = false;
315
+ pair->vint = value;
316
+ g_value_init( &pair->value, G_TYPE_INT );
317
+
318
+ options.push_back( pair );
319
+
320
+ return( this );
321
+ }
322
+
323
+ // output double
324
+ VOption *
325
+ VOption::set( const char *name, double *value )
326
+ {
327
+ Pair *pair = new Pair( name );
328
+
329
+ pair->input = false;
330
+ pair->vdouble = value;
331
+ g_value_init( &pair->value, G_TYPE_DOUBLE );
332
+
333
+ options.push_back( pair );
334
+
335
+ return( this );
336
+ }
337
+
338
+ // output image
339
+ VOption *
340
+ VOption::set( const char *name, VImage *value )
341
+ {
342
+ Pair *pair = new Pair( name );
343
+
344
+ pair->input = false;
345
+ pair->vimage = value;
346
+ g_value_init( &pair->value, VIPS_TYPE_IMAGE );
347
+
348
+ options.push_back( pair );
349
+
350
+ return( this );
351
+ }
352
+
353
+ // output doublearray
354
+ VOption *
355
+ VOption::set( const char *name, std::vector<double> *value )
356
+ {
357
+ Pair *pair = new Pair( name );
358
+
359
+ pair->input = false;
360
+ pair->vvector = value;
361
+ g_value_init( &pair->value, VIPS_TYPE_ARRAY_DOUBLE );
362
+
363
+ options.push_back( pair );
364
+
365
+ return( this );
366
+ }
367
+
368
+ // output blob
369
+ VOption *
370
+ VOption::set( const char *name, VipsBlob **value )
371
+ {
372
+ Pair *pair = new Pair( name );
373
+
374
+ pair->input = false;
375
+ pair->vblob = value;
376
+ g_value_init( &pair->value, VIPS_TYPE_BLOB );
377
+
378
+ options.push_back( pair );
379
+
380
+ return( this );
381
+ }
382
+
383
+ // just g_object_set_property(), except we allow set enum from string
384
+ static void
385
+ set_property( VipsObject *object, const char *name, const GValue *value )
386
+ {
387
+ VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object );
388
+ GType type = G_VALUE_TYPE( value );
389
+
390
+ GParamSpec *pspec;
391
+ VipsArgumentClass *argument_class;
392
+ VipsArgumentInstance *argument_instance;
393
+
394
+ if( vips_object_get_argument( object, name,
395
+ &pspec, &argument_class, &argument_instance ) ) {
396
+ g_warning( "%s", vips_error_buffer() );
397
+ vips_error_clear();
398
+ return;
399
+ }
400
+
401
+ if( G_IS_PARAM_SPEC_ENUM( pspec ) &&
402
+ type == G_TYPE_STRING ) {
403
+ GType pspec_type = G_PARAM_SPEC_VALUE_TYPE( pspec );
404
+
405
+ int enum_value;
406
+ GValue value2 = { 0 };
407
+
408
+ if( (enum_value = vips_enum_from_nick( object_class->nickname,
409
+ pspec_type, g_value_get_string( value ) )) < 0 ) {
410
+ g_warning( "%s", vips_error_buffer() );
411
+ vips_error_clear();
412
+ return;
413
+ }
414
+
415
+ g_value_init( &value2, pspec_type );
416
+ g_value_set_enum( &value2, enum_value );
417
+ g_object_set_property( G_OBJECT( object ), name, &value2 );
418
+ g_value_unset( &value2 );
419
+ }
420
+ else
421
+ g_object_set_property( G_OBJECT( object ), name, value );
422
+ }
423
+
424
+ // walk the options and set props on the operation
425
+ void
426
+ VOption::set_operation( VipsOperation *operation )
427
+ {
428
+ std::list<Pair *>::iterator i;
429
+
430
+ for( i = options.begin(); i != options.end(); ++i )
431
+ if( (*i)->input ) {
432
+ #ifdef VIPS_DEBUG_VERBOSE
433
+ printf( "set_operation: " );
434
+ vips_object_print_name( VIPS_OBJECT( operation ) );
435
+ char *str_value =
436
+ g_strdup_value_contents( &(*i)->value );
437
+ printf( ".%s = %s\n", (*i)->name, str_value );
438
+ g_free( str_value );
439
+ #endif /*VIPS_DEBUG_VERBOSE*/
440
+
441
+ set_property( VIPS_OBJECT( operation ),
442
+ (*i)->name, &(*i)->value );
443
+ }
444
+ }
445
+
446
+ // walk the options and fetch any requested outputs
447
+ void
448
+ VOption::get_operation( VipsOperation *operation )
449
+ {
450
+ std::list<Pair *>::iterator i;
451
+
452
+ for( i = options.begin(); i != options.end(); ++i )
453
+ if( ! (*i)->input ) {
454
+ const char *name = (*i)->name;
455
+
456
+ g_object_get_property( G_OBJECT( operation ),
457
+ name, &(*i)->value );
458
+
459
+ #ifdef VIPS_DEBUG_VERBOSE
460
+ printf( "get_operation: " );
461
+ vips_object_print_name( VIPS_OBJECT( operation ) );
462
+ char *str_value = g_strdup_value_contents(
463
+ &(*i)->value );
464
+ printf( ".%s = %s\n", name, str_value );
465
+ g_free( str_value );
466
+ #endif /*VIPS_DEBUG_VERBOSE*/
467
+
468
+ GValue *value = &(*i)->value;
469
+ GType type = G_VALUE_TYPE( value );
470
+
471
+ if( type == VIPS_TYPE_IMAGE ) {
472
+ // rebox object
473
+ VipsImage *image = VIPS_IMAGE(
474
+ g_value_get_object( value ) );
475
+ *((*i)->vimage) = VImage( image );
476
+ }
477
+ else if( type == G_TYPE_INT )
478
+ *((*i)->vint) = g_value_get_int( value );
479
+ else if( type == G_TYPE_BOOLEAN )
480
+ *((*i)->vbool) = g_value_get_boolean( value );
481
+ else if( type == G_TYPE_DOUBLE )
482
+ *((*i)->vdouble) = g_value_get_double( value );
483
+ else if( type == VIPS_TYPE_ARRAY_DOUBLE ) {
484
+ int length;
485
+ double *array =
486
+ vips_value_get_array_double( value,
487
+ &length );
488
+
489
+ ((*i)->vvector)->resize( length );
490
+ for( int j = 0; j < length; j++ )
491
+ (*((*i)->vvector))[j] = array[j];
492
+ }
493
+ else if( type == VIPS_TYPE_BLOB ) {
494
+ // our caller gets a reference
495
+ *((*i)->vblob) =
496
+ (VipsBlob *) g_value_dup_boxed( value );
497
+ }
498
+ }
499
+ }
500
+
501
+ void
502
+ VImage::call_option_string( const char *operation_name,
503
+ const char *option_string, VOption *options )
504
+ {
505
+ VipsOperation *operation;
506
+
507
+ VIPS_DEBUG_MSG( "call_option_string: starting for %s ...\n",
508
+ operation_name );
509
+
510
+ if( !(operation = vips_operation_new( operation_name )) ) {
511
+ delete options;
512
+ throw( VError() );
513
+ }
514
+
515
+ /* Set str options before vargs options, so the user can't
516
+ * override things we set deliberately.
517
+ */
518
+ if( option_string &&
519
+ vips_object_set_from_string( VIPS_OBJECT( operation ),
520
+ option_string ) ) {
521
+ vips_object_unref_outputs( VIPS_OBJECT( operation ) );
522
+ g_object_unref( operation );
523
+ delete options;
524
+ throw( VError() );
525
+ }
526
+
527
+ if( options )
528
+ options->set_operation( operation );
529
+
530
+ /* Build from cache.
531
+ */
532
+ if( vips_cache_operation_buildp( &operation ) ) {
533
+ vips_object_unref_outputs( VIPS_OBJECT( operation ) );
534
+ g_object_unref( operation );
535
+ delete options;
536
+ throw( VError() );
537
+ }
538
+
539
+ /* Walk args again, writing output.
540
+ */
541
+ if( options )
542
+ options->get_operation( operation );
543
+
544
+ /* We're done with options!
545
+ */
546
+ delete options;
547
+
548
+ /* The operation we have built should now have been reffed by
549
+ * one of its arguments or have finished its work. Either
550
+ * way, we can unref.
551
+ */
552
+ g_object_unref( operation );
553
+ }
554
+
555
+ void
556
+ VImage::call( const char *operation_name, VOption *options )
557
+ {
558
+ call_option_string( operation_name, NULL, options );
559
+ }
560
+
561
+ VImage
562
+ VImage::new_from_file( const char *name, VOption *options )
563
+ {
564
+ char filename[VIPS_PATH_MAX];
565
+ char option_string[VIPS_PATH_MAX];
566
+ const char *operation_name;
567
+
568
+ VImage out;
569
+
570
+ vips__filename_split8( name, filename, option_string );
571
+ if( !(operation_name = vips_foreign_find_load( filename )) ) {
572
+ delete options;
573
+ throw VError();
574
+ }
575
+
576
+ call_option_string( operation_name, option_string,
577
+ (options ? options : VImage::option())->
578
+ set( "filename", filename )->
579
+ set( "out", &out ) );
580
+
581
+ return( out );
582
+ }
583
+
584
+ VImage
585
+ VImage::new_from_buffer( const void *buf, size_t len, const char *option_string,
586
+ VOption *options )
587
+ {
588
+ const char *operation_name;
589
+ VipsBlob *blob;
590
+ VImage out;
591
+
592
+ if( !(operation_name = vips_foreign_find_load_buffer( buf, len )) ) {
593
+ delete options;
594
+ throw( VError() );
595
+ }
596
+
597
+ /* We don't take a copy of the data or free it.
598
+ */
599
+ blob = vips_blob_new( NULL, buf, len );
600
+ options = (options ? options : VImage::option())->
601
+ set( "buffer", blob )->
602
+ set( "out", &out );
603
+ vips_area_unref( VIPS_AREA( blob ) );
604
+
605
+ call_option_string( operation_name, option_string, options );
606
+
607
+ return( out );
608
+ }
609
+
610
+ VImage
611
+ VImage::new_from_buffer( const std::string &buf, const char *option_string,
612
+ VOption *options )
613
+ {
614
+ return( new_from_buffer( buf.c_str(), buf.size(),
615
+ option_string, options ) );
616
+ }
617
+
618
+ VImage
619
+ VImage::new_from_source( VSource source, const char *option_string,
620
+ VOption *options )
621
+ {
622
+ const char *operation_name;
623
+ VImage out;
624
+
625
+ if( !(operation_name = vips_foreign_find_load_source(
626
+ source.get_source() )) ) {
627
+ delete options;
628
+ throw( VError() );
629
+ }
630
+
631
+ options = (options ? options : VImage::option())->
632
+ set( "source", source )->
633
+ set( "out", &out );
634
+
635
+ call_option_string( operation_name, option_string, options );
636
+
637
+ return( out );
638
+ }
639
+
640
+ VImage
641
+ VImage::new_from_memory_steal( void *data, size_t size,
642
+ int width, int height, int bands, VipsBandFormat format )
643
+ {
644
+ VipsImage *image;
645
+
646
+ if( !(image = vips_image_new_from_memory( data, size,
647
+ width, height, bands, format )) )
648
+ throw( VError() );
649
+
650
+ g_signal_connect( image, "postclose",
651
+ G_CALLBACK( vips_image_free_buffer ), data);
652
+
653
+ return( VImage( image ) );
654
+ }
655
+
656
+ VImage
657
+ VImage::new_matrix( int width, int height )
658
+ {
659
+ return( VImage( vips_image_new_matrix( width, height ) ) );
660
+ }
661
+
662
+ VImage
663
+ VImage::new_matrixv( int width, int height, ... )
664
+ {
665
+ VImage matrix = new_matrix( width, height );
666
+ VipsImage *vips_matrix = matrix.get_image();
667
+
668
+ va_list ap;
669
+
670
+ va_start( ap, height );
671
+ for( int y = 0; y < height; y++ )
672
+ for( int x = 0; x < width; x++ )
673
+ *VIPS_MATRIX( vips_matrix, x, y ) =
674
+ va_arg( ap, double );
675
+ va_end( ap );
676
+
677
+ return( matrix );
678
+ }
679
+
680
+ VImage
681
+ VImage::write( VImage out ) const
682
+ {
683
+ if( vips_image_write( this->get_image(), out.get_image() ) )
684
+ throw VError();
685
+
686
+ return( out );
687
+ }
688
+
689
+ void
690
+ VImage::write_to_file( const char *name, VOption *options ) const
691
+ {
692
+ char filename[VIPS_PATH_MAX];
693
+ char option_string[VIPS_PATH_MAX];
694
+ const char *operation_name;
695
+
696
+ vips__filename_split8( name, filename, option_string );
697
+ if( !(operation_name = vips_foreign_find_save( filename )) ) {
698
+ delete options;
699
+ throw VError();
700
+ }
701
+
702
+ call_option_string( operation_name, option_string,
703
+ (options ? options : VImage::option())->
704
+ set( "in", *this )->
705
+ set( "filename", filename ) );
706
+ }
707
+
708
+ void
709
+ VImage::write_to_buffer( const char *suffix, void **buf, size_t *size,
710
+ VOption *options ) const
711
+ {
712
+ char filename[VIPS_PATH_MAX];
713
+ char option_string[VIPS_PATH_MAX];
714
+ const char *operation_name;
715
+ VipsBlob *blob;
716
+
717
+ /* Save with the new target API if we can. Fall back to the older
718
+ * mechanism in case the saver we need has not been converted yet.
719
+ *
720
+ * We need to hide any errors from this first phase.
721
+ */
722
+ vips__filename_split8( suffix, filename, option_string );
723
+
724
+ vips_error_freeze();
725
+ operation_name = vips_foreign_find_save_target( filename );
726
+ vips_error_thaw();
727
+
728
+ if( operation_name ) {
729
+ VTarget target = VTarget::new_to_memory();
730
+
731
+ call_option_string( operation_name, option_string,
732
+ (options ? options : VImage::option())->
733
+ set( "in", *this )->
734
+ set( "target", target ) );
735
+
736
+ g_object_get( target.get_target(), "blob", &blob, NULL );
737
+ }
738
+ else if( (operation_name = vips_foreign_find_save_buffer( filename )) ) {
739
+ call_option_string( operation_name, option_string,
740
+ (options ? options : VImage::option())->
741
+ set( "in", *this )->
742
+ set( "buffer", &blob ) );
743
+ }
744
+ else {
745
+ delete options;
746
+ throw VError();
747
+ }
748
+
749
+ if( blob ) {
750
+ if( buf ) {
751
+ *buf = VIPS_AREA( blob )->data;
752
+ VIPS_AREA( blob )->free_fn = NULL;
753
+ }
754
+ if( size )
755
+ *size = VIPS_AREA( blob )->length;
756
+
757
+ vips_area_unref( VIPS_AREA( blob ) );
758
+ }
759
+ }
760
+
761
+ void
762
+ VImage::write_to_target( const char *suffix, VTarget target,
763
+ VOption *options ) const
764
+ {
765
+ char filename[VIPS_PATH_MAX];
766
+ char option_string[VIPS_PATH_MAX];
767
+ const char *operation_name;
768
+
769
+ vips__filename_split8( suffix, filename, option_string );
770
+ if( !(operation_name = vips_foreign_find_save_target( filename )) ) {
771
+ delete options;
772
+ throw VError();
773
+ }
774
+
775
+ call_option_string( operation_name, option_string,
776
+ (options ? options : VImage::option())->
777
+ set( "in", *this )->
778
+ set( "target", target ) );
779
+ }
780
+
781
+ #include "vips-operators.cpp"
782
+
783
+ std::vector<VImage>
784
+ VImage::bandsplit( VOption *options ) const
785
+ {
786
+ std::vector<VImage> b;
787
+ b.reserve(bands());
788
+
789
+ for( int i = 0; i < bands(); i++ )
790
+ b.push_back( extract_band( i ) );
791
+
792
+ return( b );
793
+ }
794
+
795
+ VImage
796
+ VImage::bandjoin( VImage other, VOption *options ) const
797
+ {
798
+ VImage v[2] = { *this, other };
799
+ std::vector<VImage> vec( v, v + VIPS_NUMBER( v ) );
800
+
801
+ return( bandjoin( vec, options ) );
802
+ }
803
+
804
+ VImage
805
+ VImage::composite( VImage other, VipsBlendMode mode, VOption *options ) const
806
+ {
807
+ VImage v[2] = { *this, other };
808
+ std::vector<VImage> ivec( v, v + VIPS_NUMBER( v ) );
809
+ int m[1] = { static_cast<int>( mode ) };
810
+ std::vector<int> mvec( m, m + VIPS_NUMBER( m ) );
811
+
812
+ return( composite( ivec, mvec, options ) );
813
+ }
814
+
815
+ std::complex<double>
816
+ VImage::minpos( VOption *options ) const
817
+ {
818
+ double x, y;
819
+
820
+ (void) min(
821
+ (options ? options : VImage::option()) ->
822
+ set( "x", &x ) ->
823
+ set( "y", &y ) );
824
+
825
+ return( std::complex<double>( x, y ) );
826
+ }
827
+
828
+ std::complex<double>
829
+ VImage::maxpos( VOption *options ) const
830
+ {
831
+ double x, y;
832
+
833
+ (void) max(
834
+ (options ? options : VImage::option()) ->
835
+ set( "x", &x ) ->
836
+ set( "y", &y ) );
837
+
838
+ return( std::complex<double>( x, y ) );
839
+ }
840
+
841
+ // Operator overloads
842
+
843
+ VImage
844
+ VImage::operator[]( int index ) const
845
+ {
846
+ return( this->extract_band( index ) );
847
+ }
848
+
849
+ std::vector<double>
850
+ VImage::operator()( int x, int y ) const
851
+ {
852
+ return( this->getpoint( x, y ) );
853
+ }
854
+
855
+ VImage
856
+ operator+( const VImage a, const VImage b )
857
+ {
858
+ return( a.add( b ) );
859
+ }
860
+
861
+ VImage
862
+ operator+( double a, const VImage b )
863
+ {
864
+ return( b.linear( 1.0, a ) );
865
+ }
866
+
867
+ VImage
868
+ operator+( const VImage a, double b )
869
+ {
870
+ return( a.linear( 1.0, b ) );
871
+ }
872
+
873
+ VImage
874
+ operator+( const std::vector<double> a, const VImage b )
875
+ {
876
+ return( b.linear( 1.0, a ) );
877
+ }
878
+
879
+ VImage
880
+ operator+( const VImage a, const std::vector<double> b )
881
+ {
882
+ return( a.linear( 1.0, b ) );
883
+ }
884
+
885
+ VImage &
886
+ operator+=( VImage &a, const VImage b )
887
+ {
888
+ return( a = a + b );
889
+ }
890
+
891
+ VImage &
892
+ operator+=( VImage &a, const double b )
893
+ {
894
+ return( a = a + b );
895
+ }
896
+
897
+ VImage &
898
+ operator+=( VImage &a, const std::vector<double> b )
899
+ {
900
+ return( a = a + b );
901
+ }
902
+
903
+ VImage
904
+ operator-( const VImage a, const VImage b )
905
+ {
906
+ return( a.subtract( b ) );
907
+ }
908
+
909
+ VImage
910
+ operator-( double a, const VImage b )
911
+ {
912
+ return( b.linear( -1.0, a ) );
913
+ }
914
+
915
+ VImage
916
+ operator-( const VImage a, double b )
917
+ {
918
+ return( a.linear( 1.0, -b ) );
919
+ }
920
+
921
+ VImage
922
+ operator-( const std::vector<double> a, const VImage b )
923
+ {
924
+ return( b.linear( -1.0, a ) );
925
+ }
926
+
927
+ VImage
928
+ operator-( const VImage a, const std::vector<double> b )
929
+ {
930
+ return( a.linear( 1.0, vips::negate( b ) ) );
931
+ }
932
+
933
+ VImage &
934
+ operator-=( VImage &a, const VImage b )
935
+ {
936
+ return( a = a - b );
937
+ }
938
+
939
+ VImage &
940
+ operator-=( VImage &a, const double b )
941
+ {
942
+ return( a = a - b );
943
+ }
944
+
945
+ VImage &
946
+ operator-=( VImage &a, const std::vector<double> b )
947
+ {
948
+ return( a = a - b );
949
+ }
950
+
951
+ VImage
952
+ operator-( const VImage a )
953
+ {
954
+ return( a * -1 );
955
+ }
956
+
957
+ VImage
958
+ operator*( const VImage a, const VImage b )
959
+ {
960
+ return( a.multiply( b ) );
961
+ }
962
+
963
+ VImage
964
+ operator*( double a, const VImage b )
965
+ {
966
+ return( b.linear( a, 0.0 ) );
967
+ }
968
+
969
+ VImage
970
+ operator*( const VImage a, double b )
971
+ {
972
+ return( a.linear( b, 0.0 ) );
973
+ }
974
+
975
+ VImage
976
+ operator*( const std::vector<double> a, const VImage b )
977
+ {
978
+ return( b.linear( a, 0.0 ) );
979
+ }
980
+
981
+ VImage
982
+ operator*( const VImage a, const std::vector<double> b )
983
+ {
984
+ return( a.linear( b, 0.0 ) );
985
+ }
986
+
987
+ VImage &
988
+ operator*=( VImage &a, const VImage b )
989
+ {
990
+ return( a = a * b );
991
+ }
992
+
993
+ VImage &
994
+ operator*=( VImage &a, const double b )
995
+ {
996
+ return( a = a * b );
997
+ }
998
+
999
+ VImage &
1000
+ operator*=( VImage &a, const std::vector<double> b )
1001
+ {
1002
+ return( a = a * b );
1003
+ }
1004
+
1005
+ VImage
1006
+ operator/( const VImage a, const VImage b )
1007
+ {
1008
+ return( a.divide( b ) );
1009
+ }
1010
+
1011
+ VImage
1012
+ operator/( double a, const VImage b )
1013
+ {
1014
+ return( b.pow( -1.0 ).linear( a, 0.0 ) );
1015
+ }
1016
+
1017
+ VImage
1018
+ operator/( const VImage a, double b )
1019
+ {
1020
+ return( a.linear( 1.0 / b, 0.0 ) );
1021
+ }
1022
+
1023
+ VImage
1024
+ operator/( const std::vector<double> a, const VImage b )
1025
+ {
1026
+ return( b.pow( -1.0 ).linear( a, 0.0 ) );
1027
+ }
1028
+
1029
+ VImage
1030
+ operator/( const VImage a, const std::vector<double> b )
1031
+ {
1032
+ return( a.linear( vips::invert( b ), 0.0 ) );
1033
+ }
1034
+
1035
+ VImage &
1036
+ operator/=( VImage &a, const VImage b )
1037
+ {
1038
+ return( a = a / b );
1039
+ }
1040
+
1041
+ VImage &
1042
+ operator/=( VImage &a, const double b )
1043
+ {
1044
+ return( a = a / b );
1045
+ }
1046
+
1047
+ VImage &
1048
+ operator/=( VImage &a, const std::vector<double> b )
1049
+ {
1050
+ return( a = a / b );
1051
+ }
1052
+
1053
+ VImage
1054
+ operator%( const VImage a, const VImage b )
1055
+ {
1056
+ return( a.remainder( b ) );
1057
+ }
1058
+
1059
+ VImage
1060
+ operator%( const VImage a, const double b )
1061
+ {
1062
+ return( a.remainder_const( to_vector( b ) ) );
1063
+ }
1064
+
1065
+ VImage
1066
+ operator%( const VImage a, const std::vector<double> b )
1067
+ {
1068
+ return( a.remainder_const( b ) );
1069
+ }
1070
+
1071
+ VImage &
1072
+ operator%=( VImage &a, const VImage b )
1073
+ {
1074
+ return( a = a % b );
1075
+ }
1076
+
1077
+ VImage &
1078
+ operator%=( VImage &a, const double b )
1079
+ {
1080
+ return( a = a % b );
1081
+ }
1082
+
1083
+ VImage &
1084
+ operator%=( VImage &a, const std::vector<double> b )
1085
+ {
1086
+ return( a = a % b );
1087
+ }
1088
+
1089
+ VImage
1090
+ operator<( const VImage a, const VImage b )
1091
+ {
1092
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_LESS ) );
1093
+ }
1094
+
1095
+ VImage
1096
+ operator<( const double a, const VImage b )
1097
+ {
1098
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_MORE,
1099
+ to_vector( a ) ) );
1100
+ }
1101
+
1102
+ VImage
1103
+ operator<( const VImage a, const double b )
1104
+ {
1105
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_LESS,
1106
+ to_vector( b ) ) );
1107
+ }
1108
+
1109
+ VImage
1110
+ operator<( const std::vector<double> a, const VImage b )
1111
+ {
1112
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_MORE,
1113
+ a ) );
1114
+ }
1115
+
1116
+ VImage
1117
+ operator<( const VImage a, const std::vector<double> b )
1118
+ {
1119
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_LESS,
1120
+ b ) );
1121
+ }
1122
+
1123
+ VImage
1124
+ operator<=( const VImage a, const VImage b )
1125
+ {
1126
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_LESSEQ ) );
1127
+ }
1128
+
1129
+ VImage
1130
+ operator<=( const double a, const VImage b )
1131
+ {
1132
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_MOREEQ,
1133
+ to_vector( a ) ) );
1134
+ }
1135
+
1136
+ VImage
1137
+ operator<=( const VImage a, const double b )
1138
+ {
1139
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_LESSEQ,
1140
+ to_vector( b ) ) );
1141
+ }
1142
+
1143
+ VImage
1144
+ operator<=( const std::vector<double> a, const VImage b )
1145
+ {
1146
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_MOREEQ,
1147
+ a ) );
1148
+ }
1149
+
1150
+ VImage
1151
+ operator<=( const VImage a, const std::vector<double> b )
1152
+ {
1153
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_LESSEQ,
1154
+ b ) );
1155
+ }
1156
+
1157
+ VImage
1158
+ operator>( const VImage a, const VImage b )
1159
+ {
1160
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_MORE ) );
1161
+ }
1162
+
1163
+ VImage
1164
+ operator>( const double a, const VImage b )
1165
+ {
1166
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_LESS,
1167
+ to_vector( a ) ) );
1168
+ }
1169
+
1170
+ VImage
1171
+ operator>( const VImage a, const double b )
1172
+ {
1173
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_MORE,
1174
+ to_vector( b ) ) );
1175
+ }
1176
+
1177
+ VImage
1178
+ operator>( const std::vector<double> a, const VImage b )
1179
+ {
1180
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_LESS,
1181
+ a ) );
1182
+ }
1183
+
1184
+ VImage
1185
+ operator>( const VImage a, const std::vector<double> b )
1186
+ {
1187
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_MORE,
1188
+ b ) );
1189
+ }
1190
+
1191
+ VImage
1192
+ operator>=( const VImage a, const VImage b )
1193
+ {
1194
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_MOREEQ ) );
1195
+ }
1196
+
1197
+ VImage
1198
+ operator>=( const double a, const VImage b )
1199
+ {
1200
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_LESSEQ,
1201
+ to_vector( a ) ) );
1202
+ }
1203
+
1204
+ VImage
1205
+ operator>=( const VImage a, const double b )
1206
+ {
1207
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_MOREEQ,
1208
+ to_vector( b ) ) );
1209
+ }
1210
+
1211
+ VImage
1212
+ operator>=( const std::vector<double> a, const VImage b )
1213
+ {
1214
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_LESSEQ,
1215
+ a ) );
1216
+ }
1217
+
1218
+ VImage
1219
+ operator>=( const VImage a, const std::vector<double> b )
1220
+ {
1221
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_MOREEQ,
1222
+ b ) );
1223
+ }
1224
+
1225
+ VImage
1226
+ operator==( const VImage a, const VImage b )
1227
+ {
1228
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_EQUAL ) );
1229
+ }
1230
+
1231
+ VImage
1232
+ operator==( const double a, const VImage b )
1233
+ {
1234
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_EQUAL,
1235
+ to_vector( a ) ) );
1236
+ }
1237
+
1238
+ VImage
1239
+ operator==( const VImage a, const double b )
1240
+ {
1241
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_EQUAL,
1242
+ to_vector( b ) ) );
1243
+ }
1244
+
1245
+ VImage
1246
+ operator==( const std::vector<double> a, const VImage b )
1247
+ {
1248
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_EQUAL,
1249
+ a ) );
1250
+ }
1251
+
1252
+ VImage
1253
+ operator==( const VImage a, const std::vector<double> b )
1254
+ {
1255
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_EQUAL,
1256
+ b ) );
1257
+ }
1258
+
1259
+ VImage
1260
+ operator!=( const VImage a, const VImage b )
1261
+ {
1262
+ return( a.relational( b, VIPS_OPERATION_RELATIONAL_NOTEQ ) );
1263
+ }
1264
+
1265
+ VImage
1266
+ operator!=( const double a, const VImage b )
1267
+ {
1268
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_NOTEQ,
1269
+ to_vector( a ) ) );
1270
+ }
1271
+
1272
+ VImage
1273
+ operator!=( const VImage a, const double b )
1274
+ {
1275
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_NOTEQ,
1276
+ to_vector( b ) ) );
1277
+ }
1278
+
1279
+ VImage
1280
+ operator!=( const std::vector<double> a, const VImage b )
1281
+ {
1282
+ return( b.relational_const( VIPS_OPERATION_RELATIONAL_NOTEQ,
1283
+ a ) );
1284
+ }
1285
+
1286
+ VImage
1287
+ operator!=( const VImage a, const std::vector<double> b )
1288
+ {
1289
+ return( a.relational_const( VIPS_OPERATION_RELATIONAL_NOTEQ,
1290
+ b ) );
1291
+ }
1292
+
1293
+ VImage
1294
+ operator&( const VImage a, const VImage b )
1295
+ {
1296
+ return( a.boolean( b, VIPS_OPERATION_BOOLEAN_AND ) );
1297
+ }
1298
+
1299
+ VImage
1300
+ operator&( const double a, const VImage b )
1301
+ {
1302
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_AND,
1303
+ to_vector( a ) ) );
1304
+ }
1305
+
1306
+ VImage
1307
+ operator&( const VImage a, const double b )
1308
+ {
1309
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_AND,
1310
+ to_vector( b ) ) );
1311
+ }
1312
+
1313
+ VImage
1314
+ operator&( const std::vector<double> a, const VImage b )
1315
+ {
1316
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_AND, a ) );
1317
+ }
1318
+
1319
+ VImage
1320
+ operator&( const VImage a, const std::vector<double> b )
1321
+ {
1322
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_AND, b ) );
1323
+ }
1324
+
1325
+ VImage &
1326
+ operator&=( VImage &a, const VImage b )
1327
+ {
1328
+ return( a = a & b );
1329
+ }
1330
+
1331
+ VImage &
1332
+ operator&=( VImage &a, const double b )
1333
+ {
1334
+ return( a = a & b );
1335
+ }
1336
+
1337
+ VImage &
1338
+ operator&=( VImage &a, const std::vector<double> b )
1339
+ {
1340
+ return( a = a & b );
1341
+ }
1342
+
1343
+ VImage
1344
+ operator|( const VImage a, const VImage b )
1345
+ {
1346
+ return( a.boolean( b, VIPS_OPERATION_BOOLEAN_OR ) );
1347
+ }
1348
+
1349
+ VImage
1350
+ operator|( const double a, const VImage b )
1351
+ {
1352
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_OR,
1353
+ to_vector( a ) ) );
1354
+ }
1355
+
1356
+ VImage
1357
+ operator|( const VImage a, const double b )
1358
+ {
1359
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_OR,
1360
+ to_vector( b ) ) );
1361
+ }
1362
+
1363
+ VImage
1364
+ operator|( const std::vector<double> a, const VImage b )
1365
+ {
1366
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_OR,
1367
+ a ) );
1368
+ }
1369
+
1370
+ VImage
1371
+ operator|( const VImage a, const std::vector<double> b )
1372
+ {
1373
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_OR,
1374
+ b ) );
1375
+ }
1376
+
1377
+ VImage &
1378
+ operator|=( VImage &a, const VImage b )
1379
+ {
1380
+ return( a = a | b );
1381
+ }
1382
+
1383
+ VImage &
1384
+ operator|=( VImage &a, const double b )
1385
+ {
1386
+ return( a = a | b );
1387
+ }
1388
+
1389
+ VImage &
1390
+ operator|=( VImage &a, const std::vector<double> b )
1391
+ {
1392
+ return( a = a | b );
1393
+ }
1394
+
1395
+ VImage
1396
+ operator^( const VImage a, const VImage b )
1397
+ {
1398
+ return( a.boolean( b, VIPS_OPERATION_BOOLEAN_EOR ) );
1399
+ }
1400
+
1401
+ VImage
1402
+ operator^( const double a, const VImage b )
1403
+ {
1404
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_EOR,
1405
+ to_vector( a ) ) );
1406
+ }
1407
+
1408
+ VImage
1409
+ operator^( const VImage a, const double b )
1410
+ {
1411
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_EOR,
1412
+ to_vector( b ) ) );
1413
+ }
1414
+
1415
+ VImage
1416
+ operator^( const std::vector<double> a, const VImage b )
1417
+ {
1418
+ return( b.boolean_const( VIPS_OPERATION_BOOLEAN_EOR,
1419
+ a ) );
1420
+ }
1421
+
1422
+ VImage
1423
+ operator^( const VImage a, const std::vector<double> b )
1424
+ {
1425
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_EOR,
1426
+ b ) );
1427
+ }
1428
+
1429
+ VImage &
1430
+ operator^=( VImage &a, const VImage b )
1431
+ {
1432
+ return( a = a ^ b );
1433
+ }
1434
+
1435
+ VImage &
1436
+ operator^=( VImage &a, const double b )
1437
+ {
1438
+ return( a = a ^ b );
1439
+ }
1440
+
1441
+ VImage &
1442
+ operator^=( VImage &a, const std::vector<double> b )
1443
+ {
1444
+ return( a = a ^ b );
1445
+ }
1446
+
1447
+ VImage
1448
+ operator<<( const VImage a, const VImage b )
1449
+ {
1450
+ return( a.boolean( b, VIPS_OPERATION_BOOLEAN_LSHIFT ) );
1451
+ }
1452
+
1453
+ VImage
1454
+ operator<<( const VImage a, const double b )
1455
+ {
1456
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_LSHIFT,
1457
+ to_vector( b ) ) );
1458
+ }
1459
+
1460
+ VImage
1461
+ operator<<( const VImage a, const std::vector<double> b )
1462
+ {
1463
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_LSHIFT,
1464
+ b ) );
1465
+ }
1466
+
1467
+ VImage &
1468
+ operator<<=( VImage &a, const VImage b )
1469
+ {
1470
+ return( a = a << b );
1471
+ }
1472
+
1473
+ VImage &
1474
+ operator<<=( VImage &a, const double b )
1475
+ {
1476
+ return( a = a << b );
1477
+ }
1478
+
1479
+ VImage &
1480
+ operator<<=( VImage &a, const std::vector<double> b )
1481
+ {
1482
+ return( a = a << b );
1483
+ }
1484
+
1485
+ VImage
1486
+ operator>>( const VImage a, const VImage b )
1487
+ {
1488
+ return( a.boolean( b, VIPS_OPERATION_BOOLEAN_RSHIFT ) );
1489
+ }
1490
+
1491
+ VImage
1492
+ operator>>( const VImage a, const double b )
1493
+ {
1494
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_RSHIFT,
1495
+ to_vector( b ) ) );
1496
+ }
1497
+
1498
+ VImage
1499
+ operator>>( const VImage a, const std::vector<double> b )
1500
+ {
1501
+ return( a.boolean_const( VIPS_OPERATION_BOOLEAN_RSHIFT,
1502
+ b ) );
1503
+ }
1504
+
1505
+ VImage &
1506
+ operator>>=( VImage &a, const VImage b )
1507
+ {
1508
+ return( a = a << b );
1509
+ }
1510
+
1511
+ VImage &
1512
+ operator>>=( VImage &a, const double b )
1513
+ {
1514
+ return( a = a << b );
1515
+ }
1516
+
1517
+ VImage &
1518
+ operator>>=( VImage &a, const std::vector<double> b )
1519
+ {
1520
+ return( a = a << b );
1521
+ }
1522
+
1523
+ VIPS_NAMESPACE_END