You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

imagick.php 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386
  1. <?php
  2. /** @generate-function-entries */
  3. class Imagick
  4. {
  5. #if MagickLibVersion > 0x628
  6. public function optimizeImageLayers(): bool {}
  7. // METRIC_*
  8. public function compareImageLayers(int $metric): Imagick {}
  9. public function pingImageBlob(string $image): bool {}
  10. public function pingImageFile(resource $filehandle, ?string $filename = null): bool {}
  11. public function transposeImage(): bool {}
  12. public function transverseImage(): bool {}
  13. public function trimImage(float $fuzz): bool {}
  14. public function waveImage(float $amplitude, float $length): bool {}
  15. public function vignetteImage(float $black_point, float $white_point, int $x, int $y): bool {}
  16. public function uniqueImageColors(): bool {}
  17. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  18. #if MagickLibVersion < 0x700
  19. // PHP_ME(imagick, getimagematte, imagick_zero_args, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
  20. /** @deprecated */
  21. public function getImageMatte(): bool {}
  22. #endif
  23. #endif
  24. // TODO - enabled?
  25. public function setImageMatte(bool $matte): bool {}
  26. public function adaptiveResizeImage(
  27. int $columns,
  28. int $rows,
  29. bool $bestfit = false,
  30. bool $legacy = false): bool {}
  31. public function sketchImage(float $radius, float $sigma, float $angle): bool {}
  32. public function shadeImage(bool $gray, float $azimuth, float $elevation): bool {}
  33. public function getSizeOffset(): int {}
  34. public function setSizeOffset(int $columns, int $rows, int $offset): bool {}
  35. public function adaptiveBlurImage(
  36. float $radius,
  37. float $sigma,
  38. int $channel = Imagick::CHANNEL_DEFAULT
  39. ): bool {}
  40. public function contrastStretchImage(
  41. float $black_point,
  42. float $white_point,
  43. int $channel = Imagick::CHANNEL_DEFAULT
  44. ): bool {}
  45. public function adaptiveSharpenImage(
  46. float $radius,
  47. float $sigma,
  48. int $channel = Imagick::CHANNEL_DEFAULT
  49. ): bool {}
  50. public function randomThresholdImage(
  51. float $low,
  52. float $high,
  53. int $channel = Imagick::CHANNEL_DEFAULT
  54. ): bool {}
  55. #if MagickLibVersion < 0x700
  56. /** @deprecated */
  57. public function roundCornersImage(
  58. float $x_rounding,
  59. float $y_rounding,
  60. float $stroke_width = 10,
  61. float $displace = 5,
  62. float $size_correction = -6): bool {}
  63. /* This alias is due to BWC */
  64. /**
  65. * @deprecated
  66. * @alias Imagick::roundCornersImage
  67. */
  68. public function roundCorners(
  69. float $x_rounding,
  70. float $y_rounding,
  71. float $stroke_width = 10,
  72. float $displace = 5,
  73. float $size_correction = -6): bool {}
  74. #endif
  75. public function setIteratorIndex(int $index): bool {}
  76. public function getIteratorIndex(): int {}
  77. #if MagickLibVersion < 0x700
  78. /** @deprecated */
  79. public function transformImage(string $crop, string $geometry): Imagick {}
  80. #endif
  81. #endif
  82. #if MagickLibVersion > 0x630
  83. #if MagickLibVersion < 0x700
  84. /** @deprecated */
  85. public function setImageOpacity(float $opacity): bool {}
  86. #endif
  87. #if MagickLibVersion >= 0x700
  88. public function setImageAlpha(float $alpha): bool {}
  89. #endif
  90. #if MagickLibVersion < 0x700
  91. /** @deprecated */
  92. public function orderedPosterizeImage(
  93. string $threshold_map,
  94. int $channel = Imagick::CHANNEL_DEFAULT
  95. ): bool {}
  96. #endif
  97. #endif
  98. #if MagickLibVersion > 0x631
  99. // TODO - ImagickDraw ....
  100. public function polaroidImage(ImagickDraw $settings, float $angle): bool {}
  101. public function getImageProperty(string $name): string {}
  102. public function setImageProperty(string $name, string $value): bool {}
  103. public function deleteImageProperty(string $name): bool {}
  104. // Replaces any embedded formatting characters with the appropriate
  105. // image property and returns the interpreted text.
  106. // See http://www.imagemagick.org/script/escape.php for escape sequences.
  107. // -format "%m:%f %wx%h"
  108. public function identifyFormat(string $format): string {}
  109. #if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD
  110. // INTERPOLATE_*
  111. public function setImageInterpolateMethod(int $method): bool {}
  112. #endif
  113. // why does this not need to be inside the 'if' for IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD ..?
  114. public function getImageInterpolateMethod(): int {}
  115. public function linearStretchImage(float $black_point, float $white_point): bool {}
  116. public function getImageLength(): int {}
  117. public function extentImage(int $width, int $height, int $x, int $y): bool {}
  118. #endif
  119. #if MagickLibVersion > 0x633
  120. public function getImageOrientation(): int {}
  121. public function setImageOrientation(int $orientation): bool {}
  122. #endif
  123. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  124. #if MagickLibVersion > 0x634
  125. #if MagickLibVersion < 0x700
  126. /** @deprecated */
  127. public function paintFloodfillImage(
  128. ImagickPixel|string $fill_color,
  129. float $fuzz,
  130. ImagickPixel|string $border_color,
  131. int $x,
  132. int $y,
  133. int $channel = Imagick::CHANNEL_DEFAULT
  134. ): bool {}
  135. #endif
  136. #endif
  137. #endif
  138. #if MagickLibVersion > 0x635
  139. // TODO - Imagick
  140. public function clutImage(Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  141. public function getImageProperties(string $pattern = "*", bool $include_values = true): array {}
  142. public function getImageProfiles(string $pattern = "*", bool $include_values = true): array {}
  143. // DISTORTION_*
  144. public function distortImage(int $distortion, array $arguments, bool $bestfit): bool {}
  145. public function writeImageFile(resource $filehandle, ?string $format = null): bool {}
  146. public function writeImagesFile(resource $filehandle, ?string $format = null): bool {}
  147. public function resetImagePage(string $page): bool {}
  148. #if MagickLibVersion < 0x700
  149. /** @deprecated */
  150. public function setImageClipMask(imagick $clip_mask): bool {}
  151. /** @deprecated */
  152. public function getImageClipMask(): Imagick {}
  153. #endif
  154. // TODO - x server?
  155. public function animateImages(string $x_server): bool {}
  156. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  157. #if MagickLibVersion < 0x700
  158. /** @deprecated */
  159. public function recolorImage(array $matrix): bool {}
  160. #endif
  161. #endif
  162. #endif
  163. #if MagickLibVersion > 0x636
  164. public function setFont(string $font): bool {}
  165. public function getFont(): string {}
  166. public function setPointSize(float $point_size): bool {}
  167. public function getPointSize(): float {}
  168. // LAYERMETHOD_*
  169. public function mergeImageLayers(int $layermethod): Imagick {}
  170. #endif
  171. #if MagickLibVersion > 0x637
  172. // ALPHACHANNEL_*
  173. public function setImageAlphaChannel(int $alphachannel): bool {}
  174. // TODO - ImagickPixel ugh
  175. // TODO - ugh MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
  176. // const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
  177. // const ssize_t x,const ssize_t y,const MagickBooleanType invert)
  178. public function floodfillPaintImage(
  179. ImagickPixel|string $fill_color,
  180. float $fuzz,
  181. ImagickPixel|string $border_color,
  182. int $x,
  183. int $y,
  184. bool $invert,
  185. ?int $channel = Imagick::CHANNEL_DEFAULT
  186. ): bool{}
  187. public function opaquePaintImage(
  188. ImagickPixel|string $target_color,
  189. ImagickPixel|string $fill_color,
  190. float $fuzz,
  191. bool $invert,
  192. int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  193. public function transparentPaintImage(
  194. ImagickPixel|string $target_color,
  195. float $alpha,
  196. float $fuzz,
  197. bool $invert
  198. ): bool {}
  199. #endif
  200. #if MagickLibVersion > 0x638
  201. public function liquidRescaleImage(int $width, int $height, float $delta_x, float $rigidity): bool {}
  202. public function encipherImage(string $passphrase): bool {}
  203. // PHP_ME(imagick, decipherimage, imagick_decipherimage_args, ZEND_ACC_PUBLIC)
  204. public function decipherImage(string $passphrase): bool {}
  205. #endif
  206. #if MagickLibVersion > 0x639
  207. // GRAVITY_*
  208. public function setGravity(int $gravity): bool {}
  209. public function getGravity(): int {}
  210. // CHANNEL_
  211. public function getImageChannelRange(int $channel): array {}
  212. public function getImageAlphaChannel(): int {}
  213. #endif
  214. #if MagickLibVersion > 0x642
  215. public function getImageChannelDistortions(
  216. Imagick $reference_image,
  217. int $metric,
  218. int $channel = Imagick::CHANNEL_DEFAULT
  219. ): float {}
  220. #endif
  221. #if MagickLibVersion > 0x643
  222. // GRAVITY_
  223. public function setImageGravity(int $gravity): bool {}
  224. public function getImageGravity(): int {}
  225. #endif
  226. #if MagickLibVersion > 0x645
  227. /**
  228. * @param int $x
  229. * @param int $y
  230. * @param int $width
  231. * @param int $height
  232. * @param string $map
  233. * @param int $pixelstorage // PIXELSTORAGE
  234. * @param array $pixels
  235. * @return bool
  236. */
  237. public function importImagePixels(
  238. int $x,
  239. int $y,
  240. int $width,
  241. int $height,
  242. string $map,
  243. int $pixelstorage,
  244. array $pixels): bool {}
  245. public function deskewImage(float $threshold): bool {}
  246. /**
  247. * @param int $colorspace // COLORSPACE
  248. * @param float $cluster_threshold
  249. * @param float $smooth_threshold
  250. * @param bool $verbose
  251. * @return bool
  252. */
  253. public function segmentImage(
  254. int $colorspace,
  255. float $cluster_threshold,
  256. float $smooth_threshold,
  257. bool $verbose = false
  258. ): bool {}
  259. // SPARSECOLORMETHOD_*
  260. public function sparseColorImage(
  261. int $sparsecolormethod,
  262. array $arguments,
  263. int $channel = Imagick::CHANNEL_DEFAULT
  264. ): bool {}
  265. public function remapImage(Imagick $replacement, int $dither_method): bool {}
  266. #endif
  267. #if PHP_IMAGICK_HAVE_HOUGHLINE
  268. public function houghLineImage(int $width, int $height, float $threshold): bool {}
  269. #endif
  270. #if MagickLibVersion > 0x646
  271. /**
  272. * @param int $x
  273. * @param int $y
  274. * @param int $width
  275. * @param int $height
  276. * @param string $map e.g. "RGB"
  277. * @param int $pixelstorage // PIXELSTORAGE
  278. * @return array
  279. */
  280. public function exportImagePixels(
  281. int $x,
  282. int $y,
  283. int $width,
  284. int $height,
  285. string $map,
  286. int $pixelstorage
  287. ): array {}
  288. #endif
  289. #if MagickLibVersion > 0x648
  290. public function getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT): array {}
  291. public function functionImage(
  292. int $function,
  293. array $parameters,
  294. int $channel = Imagick::CHANNEL_DEFAULT
  295. ): bool {}
  296. #endif
  297. #if MagickLibVersion > 0x651
  298. // COLORSPACE_*
  299. public function transformImageColorspace(int $colorspace): bool {}
  300. #endif
  301. #if MagickLibVersion > 0x652
  302. public function haldClutImage(Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  303. #endif
  304. #if MagickLibVersion > 0x655
  305. public function autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  306. public function blueShiftImage(float $factor = 1.5): bool {}
  307. #endif
  308. #if MagickLibVersion > 0x656
  309. /**
  310. * @param string $artifact example 'compose:args'
  311. * @return string
  312. */
  313. public function getImageArtifact(string $artifact): string {}
  314. /**
  315. * @param string $artifact example 'compose:args'
  316. * @param string $value example "1,0,-0.5,0.5"
  317. * @return bool
  318. */
  319. public function setImageArtifact(string $artifact, string $value): bool {}
  320. public function deleteImageArtifact(string $artifact): bool {}
  321. // Will return CHANNEL_*
  322. public function getColorspace(): int {}
  323. // PHP_ME(imagick, setcolorspace, imagick_setcolorspace_args, ZEND_ACC_PUBLIC)
  324. public function setColorspace(int $colorspace): bool {}
  325. // CHANNEL_*
  326. public function clampImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  327. #endif
  328. #if MagickLibVersion > 0x667
  329. // stack By default, images are stacked left-to-right. Set stack to MagickTrue to stack them top-to-bottom.
  330. //offset minimum distance in pixels between images.
  331. public function smushImages(bool $stack, int $offset): Imagick {}
  332. #endif
  333. // PHP_ME(imagick, __construct, imagick_construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
  334. // TODO int|float? :spocks_eyebrow.gif:
  335. public function __construct(string|array|int|float|null $files = null) {}
  336. public function __toString(): string {}
  337. #if PHP_VERSION_ID >= 50600
  338. // This calls MagickGetNumberImages underneath
  339. // mode is unused. Remove at next major release
  340. // https://github.com/Imagick/imagick/commit/13302500c0ab0ce58e6502e68871187180f7987c
  341. public function count(int $mode = 0): int {}
  342. #else
  343. public function count(): int {}
  344. #endif
  345. public function getPixelIterator(): ImagickPixelIterator {}
  346. public function getPixelRegionIterator(int $x, int $y, int $columns, int $rows): ImagickPixelIterator {}
  347. public function readImage(string $filename): bool {}
  348. public function readImages(array $filenames): bool {}
  349. public function readImageBlob(string $image, ?string $filename = null): bool {}
  350. public function setImageFormat(string $format): bool {}
  351. public function scaleImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false): bool {}
  352. public function writeImage(?string $filename = null): bool {}
  353. public function writeImages(string $filename, bool $adjoin): bool {}
  354. // CHANNEL_
  355. public function blurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  356. public function thumbnailImage(
  357. ?int $columns,
  358. ?int $rows,
  359. bool $bestfit = false,
  360. bool $fill = false,
  361. bool $legacy = false): bool {}
  362. public function cropThumbnailImage(int $width, int $height, bool $legacy = false): bool {}
  363. public function getImageFilename(): string {}
  364. public function setImageFilename(string $filename): bool {}
  365. public function getImageFormat(): string {}
  366. public function getImageMimeType(): string {}
  367. public function removeImage(): bool {}
  368. /** @alias Imagick::clear */
  369. public function destroy(): bool {}
  370. public function clear(): bool {}
  371. public function clone(): Imagick {}
  372. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  373. #if MagickLibVersion < 0x700
  374. /** @deprecated */
  375. public function getImageSize(): int {}
  376. #endif
  377. #endif
  378. public function getImageBlob(): string {}
  379. public function getImagesBlob(): string {}
  380. public function setFirstIterator(): bool {}
  381. public function setLastIterator(): bool {}
  382. public function resetIterator(): void {}
  383. public function previousImage(): bool {}
  384. public function nextImage(): bool {}
  385. public function hasPreviousImage(): bool {}
  386. public function hasNextImage(): bool {}
  387. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  388. #if MagickLibVersion < 0x700
  389. /** @deprecated */
  390. public function setImageIndex(int $index): bool {}
  391. /** @deprecated */
  392. public function getImageIndex(): int {}
  393. #endif
  394. #endif
  395. public function commentImage(string $comment): bool {}
  396. public function cropImage(int $width, int $height, int $x, int $y): bool {}
  397. public function labelImage(string $label): bool {}
  398. public function getImageGeometry(): array {}
  399. public function drawImage(ImagickDraw $drawing): bool {}
  400. public function setImageCompressionQuality(int $quality): bool {}
  401. public function getImageCompressionQuality(): int {}
  402. public function setImageCompression(int $compression): bool {}
  403. public function getImageCompression(): int {}
  404. public function annotateImage(
  405. ImagickDraw $settings,
  406. float $x,
  407. float $y,
  408. float $angle,
  409. string $text
  410. ): bool {}
  411. public function compositeImage(
  412. Imagick $composite_image,
  413. int $composite,
  414. int $x,
  415. int $y,
  416. int $channel = Imagick::CHANNEL_DEFAULT): bool{}
  417. public function modulateImage(float $brightness, float $saturation, float $hue): bool {}
  418. public function getImageColors(): int {}
  419. /**
  420. * @param ImagickDraw $settings
  421. * @param string $tile_geometry e.g. "3x2+0+0"
  422. * @param string $thumbnail_geometry e.g. "200x160+3+3>"
  423. * @param int $monatgemode // MONTAGEMODE_
  424. * @param string $frame // "10x10+2+2"
  425. * @return Imagick
  426. */
  427. public function montageImage(
  428. ImagickDraw $settings,
  429. string $tile_geometry,
  430. string $thumbnail_geometry,
  431. int $monatgemode,
  432. string $frame
  433. ): Imagick {}
  434. public function identifyImage(bool $append_raw_output = false): array {}
  435. public function thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  436. public function adaptiveThresholdImage(int $width, int $height, int $offset): bool {}
  437. public function blackThresholdImage(ImagickPixel|string $threshold_color): bool {}
  438. public function whiteThresholdImage(ImagickPixel|string $threshold_color): bool {}
  439. public function appendImages(bool $stack): Imagick {}
  440. public function charcoalImage(float $radius, float $sigma): bool {}
  441. public function normalizeImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  442. public function oilPaintImage(float $radius): bool {}
  443. public function posterizeImage(int $levels, bool $dither): bool {}
  444. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  445. #if MagickLibVersion < 0x700
  446. /** @deprecated */
  447. public function radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  448. #endif
  449. #endif
  450. public function raiseImage(int $width, int $height, int $x, int $y, bool $raise): bool {}
  451. public function resampleImage(float $x_resolution, float $y_resolution, int $filter, float $blur): bool {}
  452. public function resizeImage(
  453. int $columns,
  454. int $rows,
  455. int $filter,
  456. float $blur,
  457. bool $bestfit = false,
  458. bool $legacy = false): bool {}
  459. public function rollImage(int $x, int $y): bool {}
  460. public function rotateImage(ImagickPixel|string $background_color, float $degrees): bool {}
  461. public function sampleImage(int $columns, int $rows): bool {}
  462. public function solarizeImage(int $threshold): bool {}
  463. public function shadowImage(float $opacity, float $sigma, int $x, int $y): bool {}
  464. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  465. #if MagickLibVersion < 0x700
  466. /** @deprecated */
  467. public function setImageAttribute(string $key, string $value): bool {}
  468. #endif
  469. #endif
  470. public function setImageBackgroundColor(ImagickPixel|string $background_color): bool {}
  471. #if MagickLibVersion >= 0x700
  472. public function setImageChannelMask(int $channel): int {}
  473. #endif
  474. public function setImageCompose(int $compose): bool {}
  475. public function setImageDelay(int $delay): bool {}
  476. public function setImageDepth(int $depth): bool {}
  477. public function setImageGamma(float $gamma): bool {}
  478. public function setImageIterations(int $iterations): bool {}
  479. #if MagickLibVersion < 0x700
  480. /** @deprecated */
  481. public function setImageMatteColor(ImagickPixel|string $matte_color): bool {}
  482. #endif
  483. public function setImagePage(int $width, int $height, int $x, int $y): bool {}
  484. // TODO test this.
  485. public function setImageProgressMonitor(string $filename): bool {}
  486. #if MagickLibVersion > 0x653
  487. public function setProgressMonitor(callable $callback): bool {}
  488. #endif
  489. public function setImageResolution(float $x_resolution, float $y_resolution): bool {}
  490. // I have no idea what scene does.
  491. public function setImageScene(int $scene): bool {}
  492. public function setImageTicksPerSecond(int $ticks_per_second): bool {}
  493. // IMGTYPE_*
  494. public function setImageType(int $image_type): bool {}
  495. public function setImageUnits(int $units): bool {}
  496. public function sharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  497. public function shaveImage(int $columns, int $rows): bool {}
  498. public function shearImage(ImagickPixel|string $background_color, float $x_shear, float $y_shear): bool {}
  499. public function spliceImage(int $width, int $height, int $x, int $y): bool {}
  500. public function pingImage(string $filename): bool {}
  501. public function readImageFile(resource $filehandle, ?string $filename = null): bool {}
  502. public function displayImage(string $servername): bool {}
  503. public function displayImages(string $servername): bool {}
  504. public function spreadImage(float $radius): bool {}
  505. public function swirlImage(float $degrees): bool {}
  506. public function stripImage(): bool {}
  507. public static function queryFormats(string $pattern = "*"): array {}
  508. public static function queryFonts(string $pattern = "*"): array {}
  509. /* TODO $multiline == null, means we should autodetect */
  510. public function queryFontMetrics(ImagickDraw $settings, string $text, ?bool $multiline = null): array {}
  511. public function steganoImage(Imagick $watermark, int $offset): Imagick {}
  512. // NOISE_*
  513. public function addNoiseImage(int $noise, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  514. public function motionBlurImage(
  515. float $radius,
  516. float $sigma,
  517. float $angle,
  518. int $channel = Imagick::CHANNEL_DEFAULT
  519. ):bool {}
  520. #if MagickLibVersion < 0x700
  521. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  522. /** @deprecated */
  523. public function mosaicImages(): Imagick {}
  524. #endif
  525. #endif
  526. public function morphImages(int $number_frames): Imagick {}
  527. public function minifyImage(): bool {}
  528. public function affineTransformImage(ImagickDraw $settings): bool {}
  529. #if MagickLibVersion < 0x700
  530. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  531. /** @deprecated */
  532. public function averageImages(): Imagick {}
  533. #endif
  534. #endif
  535. public function borderImage(ImagickPixel|string $border_color, int $width, int $height): bool {}
  536. public static function calculateCrop(
  537. int $original_width,
  538. int $original_height,
  539. int $desired_width,
  540. int $desired_height,
  541. bool $legacy = false): array {}
  542. public function chopImage(int $width, int $height, int $x, int $y): bool {}
  543. public function clipImage(): bool {}
  544. public function clipPathImage(string $pathname, bool $inside): bool {}
  545. /* clippathimage has been deprecated. Create alias here and use the newer API function if present */
  546. /** @alias Imagick::clipPathImage */
  547. public function clipImagePath(string $pathname, bool $inside): void {}
  548. public function coalesceImages(): Imagick {}
  549. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  550. #if MagickLibVersion < 0x700
  551. /** @deprecated */
  552. public function colorFloodfillImage(
  553. ImagickPixel|string $fill_color,
  554. float $fuzz,
  555. ImagickPixel|string $border_color,
  556. int $x,
  557. int $y
  558. ): bool {}
  559. #endif
  560. #endif
  561. // TODO - opacity is actually float if legacy is true...
  562. public function colorizeImage(
  563. ImagickPixel|string $colorize_color,
  564. ImagickPixel|string|false $opacity_color,
  565. ?bool $legacy = false ): bool {}
  566. public function compareImageChannels(Imagick $reference, int $channel, int $metric): array {}
  567. public function compareImages(Imagick $reference, int $metric): array {}
  568. public function contrastImage(bool $sharpen): bool {}
  569. public function combineImages(int $colorspace): Imagick {}
  570. // kernel is a 2d array of float values
  571. public function convolveImage(array $kernel, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  572. public function cycleColormapImage(int $displace): bool {}
  573. public function deconstructImages(): Imagick {}
  574. public function despeckleImage(): bool {}
  575. public function edgeImage(float $radius): bool {}
  576. public function embossImage(float $radius, float $sigma): bool {}
  577. public function enhanceImage(): bool {}
  578. public function equalizeImage(): bool {}
  579. // EVALUATE_*
  580. public function evaluateImage(int $evaluate, float $constant, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  581. #if MagickLibVersion >= 0x687
  582. // Merge multiple images of the same size together with the selected operator.
  583. //http://www.imagemagick.org/Usage/layers/#evaluate-sequence
  584. // EVALUATE_*
  585. public function evaluateImages(int $evaluate): bool {}
  586. #endif
  587. #if MagickLibVersion < 0x700
  588. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  589. /** @deprecated */
  590. public function flattenImages(): Imagick {}
  591. #endif
  592. #endif
  593. public function flipImage(): bool {}
  594. public function flopImage(): bool {}
  595. #if MagickLibVersion >= 0x655
  596. public function forwardFourierTransformImage(bool $magnitude): bool {}
  597. #endif
  598. public function frameImage(
  599. ImagickPixel|string $matte_color,
  600. int $width,
  601. int $height,
  602. int $inner_bevel,
  603. int $outer_bevel
  604. ): bool {}
  605. public function fxImage(string $expression, int $channel = Imagick::CHANNEL_DEFAULT): Imagick {}
  606. public function gammaImage(float $gamma, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  607. public function gaussianBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  608. #if MagickLibVersion < 0x700
  609. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  610. /** @deprecated */
  611. public function getImageAttribute(string $key): string {}
  612. #endif
  613. #endif
  614. public function getImageBackgroundColor(): ImagickPixel {}
  615. public function getImageBluePrimary(): array {}
  616. public function getImageBorderColor(): ImagickPixel {}
  617. public function getImageChannelDepth(int $channel): int {}
  618. public function getImageChannelDistortion(Imagick $reference, int $channel, int $metric): float {}
  619. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  620. #if MagickLibVersion < 0x700
  621. /** @deprecated */
  622. public function getImageChannelExtrema(int $channel): array {}
  623. #endif
  624. #endif
  625. public function getImageChannelMean(int $channel): array {}
  626. public function getImageChannelStatistics(): array {}
  627. // index - the offset into the image colormap. I have no idea.
  628. public function getImageColormapColor(int $index): ImagickPixel {}
  629. public function getImageColorspace(): int {}
  630. public function getImageCompose(): int {}
  631. public function getImageDelay(): int {}
  632. public function getImageDepth(): int {}
  633. // METRIC_
  634. public function getImageDistortion(Imagick $reference, int $metric): float {}
  635. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  636. #if MagickLibVersion < 0x700
  637. /** @deprecated */
  638. public function getImageExtrema(): array {}
  639. #endif
  640. #endif
  641. public function getImageDispose(): int {}
  642. public function getImageGamma(): float {}
  643. public function getImageGreenPrimary(): array {}
  644. public function getImageHeight(): int {}
  645. public function getImageHistogram(): array {}
  646. public function getImageInterlaceScheme(): int {}
  647. public function getImageIterations(): int {}
  648. #if MagickLibVersion < 0x700
  649. /** @deprecated */
  650. public function getImageMatteColor(): ImagickPixel {}
  651. #endif
  652. public function getImagePage(): array {}
  653. public function getImagePixelColor(int $x, int $y): ImagickPixel {}
  654. #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR
  655. // TODO - needs a test.
  656. public function setImagePixelColor(int $x, int $y, ImagickPixel|string $color): ImagickPixel {}
  657. #endif
  658. public function getImageProfile(string $name): string {}
  659. public function getImageRedPrimary(): array {}
  660. public function getImageRenderingIntent(): int {}
  661. public function getImageResolution(): array {}
  662. public function getImageScene(): int {}
  663. public function getImageSignature(): string {}
  664. public function getImageTicksPerSecond(): int {}
  665. public function getImageType(): int {}
  666. public function getImageUnits(): int {}
  667. public function getImageVirtualPixelMethod(): int {}
  668. public function getImageWhitePoint(): array {}
  669. public function getImageWidth(): int {}
  670. public function getNumberImages(): int {}
  671. public function getImageTotalInkDensity(): float {}
  672. public function getImageRegion(int $width, int $height, int $x, int $y): Imagick {}
  673. public function implodeImage(float $radius): bool {}
  674. #if MagickLibVersion >= 0x658
  675. // TODO MagickWand *magnitude_wand,MagickWand *phase_wand,
  676. public function inverseFourierTransformImage(Imagick $complement, bool $magnitude): bool {}
  677. #endif
  678. public function levelImage(
  679. float $black_point,
  680. float $gamma,
  681. float $white_point,
  682. int $channel = Imagick::CHANNEL_DEFAULT
  683. ): bool {}
  684. public function magnifyImage(): bool {}
  685. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  686. #if MagickLibVersion < 0x700
  687. /** @deprecated */
  688. public function mapImage(imagick $map, bool $dither): bool {}
  689. /** @deprecated */
  690. public function matteFloodfillImage(
  691. float $alpha,
  692. float $fuzz,
  693. ImagickPixel|string $border_color,
  694. int $x,
  695. int $y
  696. ): bool {}
  697. #endif
  698. #endif
  699. #if MagickLibVersion < 0x700
  700. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  701. /** @deprecated */
  702. public function medianFilterImage(float $radius): bool {}
  703. #endif
  704. #endif
  705. public function negateImage(bool $gray, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  706. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  707. #if MagickLibVersion < 0x700
  708. /** @deprecated */
  709. public function paintOpaqueImage(
  710. ImagickPixel|string $target_color,
  711. ImagickPixel|string $fill_color,
  712. float $fuzz,
  713. int $channel = Imagick::CHANNEL_DEFAULT
  714. ): bool {}
  715. /** @deprecated */
  716. public function paintTransparentImage(ImagickPixel|string $target_color, float $alpha, float $fuzz): bool {}
  717. #endif
  718. #endif
  719. // PREVIEW_*
  720. public function previewImages(int $preview): bool {}
  721. public function profileImage(string $name, string $profile): bool {}
  722. public function quantizeImage(
  723. int $number_colors,
  724. int $colorspace,
  725. int $tree_depth,
  726. bool $dither,
  727. bool $measure_error
  728. ): bool {}
  729. public function quantizeImages(
  730. int $number_colors,
  731. int $colorspace,
  732. int $tree_depth,
  733. bool $dither,
  734. bool $measure_error): bool {}
  735. #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  736. #if MagickLibVersion < 0x700
  737. /** @deprecated */
  738. public function reduceNoiseImage(float $radius): bool {}
  739. #endif
  740. #endif
  741. public function removeImageProfile(string $name): string {}
  742. public function separateImageChannel(int $channel): bool {}
  743. public function sepiaToneImage(float $threshold): bool {}
  744. #if MagickLibVersion < 0x700
  745. /** @deprecated */
  746. public function setImageBias(float $bias): bool {}
  747. /** @deprecated */
  748. public function setImageBiasQuantum(string $bias): void {}
  749. #endif
  750. public function setImageBluePrimary(float $x, float $y): bool {}
  751. /* {{{ proto bool Imagick::setImageBluePrimary(float x,float y)
  752. For IM7 the prototype is
  753. proto bool Imagick::setImageBluePrimary(float x, float y, float z) */
  754. public function setImageBorderColor(ImagickPixel|string $border_color): bool {}
  755. public function setImageChannelDepth(int $channel, int $depth): bool {}
  756. public function setImageColormapColor(int $index, ImagickPixel|string $color): bool {}
  757. public function setImageColorspace(int $colorspace): bool {}
  758. public function setImageDispose(int $dispose): bool {}
  759. public function setImageExtent(int $columns, int $rows): bool {}
  760. public function setImageGreenPrimary(float $x, float $y): bool {}
  761. // INTERLACE_*
  762. public function setImageInterlaceScheme(int $interlace): bool {}
  763. public function setImageProfile(string $name, string $profile): bool {}
  764. public function setImageRedPrimary(float $x, float $y): bool {}
  765. // RENDERINGINTENT
  766. public function setImageRenderingIntent(int $rendering_intent): bool {}
  767. public function setImageVirtualPixelMethod(int $method): bool {}
  768. public function setImageWhitePoint(float $x, float $y): bool {}
  769. public function sigmoidalContrastImage(
  770. bool $sharpen,
  771. float $alpha,
  772. float $beta,
  773. int $channel = Imagick::CHANNEL_DEFAULT
  774. ): bool{}
  775. // TODO - MagickStereoImage() composites two images and produces a single
  776. // image that is the composite of a left and right image of a stereo pair
  777. public function stereoImage(Imagick $offset_image): bool {}
  778. public function textureImage(Imagick $texture): Imagick {}
  779. public function tintImage(
  780. ImagickPixel|string $tint_color,
  781. ImagickPixel|string $opacity_color,
  782. bool $legacy = false
  783. ): bool {}
  784. public function unsharpMaskImage(
  785. float $radius,
  786. float $sigma,
  787. float $amount,
  788. float $threshold,
  789. int $channel = Imagick::CHANNEL_DEFAULT
  790. ): bool {}
  791. public function getImage(): Imagick {}
  792. public function addImage(Imagick $image): bool {}
  793. public function setImage(Imagick $image): bool {}
  794. public function newImage(
  795. int $columns,
  796. int $rows,
  797. ImagickPixel|string $background_color,
  798. string $format = null
  799. ): bool {}
  800. // TODO - canvas? description
  801. public function newPseudoImage(int $columns, int $rows, string $pseudo_format): bool {}
  802. public function getCompression(): int {}
  803. public function getCompressionQuality(): int {}
  804. public static function getCopyright(): string {}
  805. public static function getConfigureOptions(string $pattern = "*"): string {}
  806. #if MagickLibVersion > 0x660
  807. public static function getFeatures(): string {}
  808. #endif
  809. public function getFilename(): string {}
  810. public function getFormat(): string {}
  811. public static function getHomeURL(): string {}
  812. public function getInterlaceScheme(): int {}
  813. public function getOption(string $key): string {}
  814. public static function getPackageName(): string {}
  815. public function getPage(): array {}
  816. public static function getQuantum(): int {}
  817. public static function getHdriEnabled(): bool {}
  818. public static function getQuantumDepth(): array {}
  819. public static function getQuantumRange(): array {}
  820. public static function getReleaseDate(): string {}
  821. public static function getResource(int $type): int {}
  822. public static function getResourceLimit(int $type): int {}
  823. public function getSamplingFactors(): array {}
  824. public function getSize(): array {}
  825. public static function getVersion(): array {}
  826. public function setBackgroundColor(ImagickPixel|string $background_color): bool {}
  827. public function setCompression(int $compression): bool {}
  828. public function setCompressionQuality(int $quality): bool {}
  829. public function setFilename(string $filename): bool {}
  830. public function setFormat(string $format): bool {}
  831. // INTERLACE_*
  832. public function setInterlaceScheme(int $interlace): bool {}
  833. public function setOption(string $key, string $value): bool {}
  834. public function setPage(int $width, int $height, int $x, int $y): bool {}
  835. public static function setResourceLimit(int $type, int $limit): bool {}
  836. public function setResolution(float $x_resolution, float $y_resolution): bool {}
  837. public function setSamplingFactors(array $factors): bool {}
  838. public function setSize(int $columns, int $rows): bool {}
  839. // IMGTYPE_*
  840. public function setType(int $imgtype): bool {}
  841. #if MagickLibVersion > 0x628
  842. /** @alias Imagick::getIteratorIndex */
  843. public function key(): int {}
  844. //#else
  845. //# if defined(MAGICKCORE_EXCLUDE_DEPRECATED)
  846. //# error "MAGICKCORE_EXCLUDE_DEPRECATED should not be defined with ImageMagick version below 6.2.8"
  847. //# else
  848. //// PHP_MALIAS(imagick, key, getimageindex, imagick_zero_args, ZEND_ACC_PUBLIC)
  849. // /** @alias Imagick::getImageIndex */
  850. // public function key(): int {}
  851. //
  852. //# endif
  853. //#endif
  854. /** @alias Imagick::nextImage
  855. * @tentative-return-type
  856. */
  857. public function next(): void {}
  858. /** @alias Imagick::setFirstIterator
  859. * @tentative-return-type
  860. */
  861. public function rewind(): void {}
  862. public function valid(): bool {}
  863. public function current(): Imagick {}
  864. #if MagickLibVersion >= 0x659
  865. public function brightnessContrastImage(
  866. float $brightness,
  867. float $contrast,
  868. int $channel = Imagick::CHANNEL_DEFAULT
  869. ): bool {}
  870. #endif
  871. #if MagickLibVersion > 0x661
  872. public function colorMatrixImage(array $color_matrix): bool {}
  873. #endif
  874. public function selectiveBlurImage(
  875. float $radius,
  876. float $sigma,
  877. float $threshold,
  878. int $channel = Imagick::CHANNEL_DEFAULT
  879. ): bool {}
  880. #if MagickLibVersion >= 0x689
  881. public function rotationalBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {}
  882. #endif
  883. #if MagickLibVersion >= 0x683
  884. public function statisticImage(
  885. int $type,
  886. int $width,
  887. int $height,
  888. int $channel = Imagick::CHANNEL_DEFAULT
  889. ): bool {}
  890. #endif
  891. #if MagickLibVersion >= 0x652
  892. public function subimageMatch(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {}
  893. /** @alias Imagick::subimageMatch */
  894. public function similarityimage(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {}
  895. #endif
  896. public static function setRegistry(string $key, string $value): bool {}
  897. public static function getRegistry(string $key): string {}
  898. public static function listRegistry(): array {}
  899. #if MagickLibVersion >= 0x680
  900. /**
  901. * @param int $morphology MORPHOLOGY_*
  902. * @param int $iterations
  903. * @param ImagickKernel $kernel
  904. * @param int $channel
  905. * @return bool
  906. */
  907. public function morphology(
  908. int $morphology,
  909. int $iterations,
  910. ImagickKernel $kernel,
  911. int $channel = Imagick::CHANNEL_DEFAULT
  912. ): bool {}
  913. #endif
  914. #ifdef IMAGICK_WITH_KERNEL
  915. #if MagickLibVersion < 0x700
  916. /** @deprecated */
  917. public function filter(ImagickKernel $kernel, int $channel = Imagick::CHANNEL_UNDEFINED): bool {}
  918. #endif
  919. #endif
  920. public function setAntialias(bool $antialias): void {}
  921. public function getAntialias(): bool {}
  922. #if MagickLibVersion > 0x676
  923. /**
  924. * @param string $color_correction_collection
  925. * <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
  926. * <ColorCorrection id="cc03345">
  927. * <SOPNode>
  928. * <Slope> 0.9 1.2 0.5 </Slope>
  929. * <Offset> 0.4 -0.5 0.6 </Offset>
  930. * <Power> 1.0 0.8 1.5 </Power>
  931. * </SOPNode>
  932. * <SATNode>
  933. * <Saturation> 0.85 </Saturation>
  934. * </SATNode>
  935. * </ColorCorrection>
  936. * </ColorCorrectionCollection>
  937. *
  938. * @return bool
  939. */
  940. public function colorDecisionListImage(string $color_correction_collection): bool {}
  941. #endif
  942. #if MagickLibVersion >= 0x687
  943. public function optimizeImageTransparency(): void {}
  944. #endif
  945. #if MagickLibVersion >= 0x660
  946. public function autoGammaImage(?int $channel = Imagick::CHANNEL_ALL): void {}
  947. #endif
  948. #if MagickLibVersion >= 0x692
  949. public function autoOrient(): void {}
  950. /** @alias Imagick::autoOrient */
  951. public function autoOrientate(): void {}
  952. // COMPOSITE_*
  953. public function compositeImageGravity(Imagick $image, int $composite_constant, int $gravity): bool {}
  954. #endif
  955. #if MagickLibVersion >= 0x693
  956. public function localContrastImage(float $radius, float $strength): void {}
  957. #endif
  958. #if MagickLibVersion >= 0x700
  959. // Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants
  960. public function identifyImageType(): int {}
  961. #endif
  962. #if IM_HAVE_IMAGICK_GETSETIMAGEMASK
  963. // PIXELMASK_*
  964. public function getImageMask(int $pixelmask): ?Imagick {}
  965. // PIXELMASK_*
  966. public function setImageMask(Imagick $clip_mask, int $pixelmask): void {}
  967. #endif
  968. // TODO - needs deleting from docs.
  969. // public function getImageMagickLicense(): string {}
  970. // TODO - needs deleting from docs.
  971. // public function render(): bool {}
  972. // public function floodfillPaintImage(
  973. // ImagickPixel|string $fill,
  974. // float $fuzz,
  975. // ImagickPixel|string $bordercolor,
  976. // int $x,
  977. // int $y,
  978. // bool $invert,
  979. // int $channel = Imagick::CHANNEL_DEFAULT): null {}
  980. }