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