3 class ImagickException
extends RuntimeException
{ }
4 class ImagickDrawException
extends RuntimeException
{ }
5 class ImagickPixelException
extends RuntimeException
{ }
6 class ImagickPixelIteratorException
extends RuntimeException
{ }
8 class Imagick
implements Countable
, Iterator
{
9 private ?
resource $wand = null;
10 private bool $nextOutOfBound = false;
11 private bool $imagePending = false;
13 function __get($name) {
16 return $this->getImageWidth();
18 return $this->getImageHeight();
21 return $this->getImageFormat();
22 } catch (ImagickException
$ex) {
23 if ($ex->getMessage() == '') {
30 trigger_error("Undefined property: Imagick::\$$name");
34 function __isset($name) {
46 function count(): int;
49 // function current(): Imagick;
55 function next(): void
;
58 function rewind(): void
;
61 // function valid(): bool;
65 * Adds adaptive blur filter to image
67 * @param float $radius - radius The radius of the Gaussian, in
68 * pixels, not counting the center pixel. Provide a value of 0 and the
69 * radius will be chosen automagically.
70 * @param float $sigma - sigma The standard deviation of the
71 * Gaussian, in pixels.
72 * @param int $channel - channel
77 function adaptiveBlurImage(float $radius,
79 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
82 * Adaptively resize image with data dependent triangulation
84 * @param int $columns - columns The number of columns in the scaled
86 * @param int $rows - rows The number of rows in the scaled image.
87 * @param bool $bestfit - bestfit Whether to fit the image inside a
93 function adaptiveResizeImage(int $columns,
95 bool $bestfit = false): bool;
98 * Adaptively sharpen the image
100 * @param float $radius - radius The radius of the Gaussian, in
101 * pixels, not counting the center pixel. Use 0 for auto-select.
102 * @param float $sigma - sigma The standard deviation of the
103 * Gaussian, in pixels.
104 * @param int $channel - channel
109 function adaptiveSharpenImage(float $radius,
111 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
114 * Selects a threshold for each pixel based on a range of intensity
116 * @param int $width - width Width of the local neighborhood.
117 * @param int $height - height Height of the local neighborhood.
118 * @param int $offset - offset The mean offset
123 function adaptiveThresholdImage(int $width,
128 * Adds new image to Imagick object image list
130 * @param Imagick $source - source The source Imagick object
135 function addImage(Imagick
$source): bool;
138 * Adds random noise to the image
140 * @param int $noise_type - noise_type The type of the noise. Refer
141 * to this list of noise constants.
142 * @param int $channel - channel
147 function addNoiseImage(int $noise_type,
148 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
151 * Transforms an image
153 * @param ImagickDraw $matrix - matrix The affine matrix
158 function affineTransformImage(ImagickDraw
$matrix): bool;
161 * Animates an image or images
163 * @param string $x_server - x_server X server address
168 function animateImages(string $x_server): bool;
171 * Annotates an image with text
173 * @param ImagickDraw $draw_settings - draw_settings The ImagickDraw
174 * object that contains settings for drawing the text
175 * @param float $x - x Horizontal offset in pixels to the left of
177 * @param float $y - y Vertical offset in pixels to the baseline of
179 * @param float $angle - angle The angle at which to write the text
180 * @param string $text - text The string to draw
185 function annotateImage(ImagickDraw
$draw_settings,
192 * Append a set of images
194 * @param bool $stack - stack Whether to stack the images vertically.
195 * By default (or if FALSE is specified) images are stacked
196 * left-to-right. If stack is TRUE, images are stacked top-to-bottom.
198 * @return Imagick - Returns Imagick instance on success.
201 function appendImages(bool $stack = false): Imagick
;
204 * Average a set of images
206 * @return Imagick - Returns a new Imagick object on success.
209 function averageImages(): Imagick
;
212 * Forces all pixels below the threshold into black
214 * @param mixed $threshold - threshold The threshold below which
215 * everything turns black
220 function blackThresholdImage(mixed $threshold): bool;
223 * Adds blur filter to image
225 * @param float $radius - radius Blur radius
226 * @param float $sigma - sigma Standard deviation
227 * @param int $channel - channel The Channeltype constant. When not
228 * supplied, all channels are blurred.
233 function blurImage(float $radius,
238 * Surrounds the image with a border
240 * @param mixed $bordercolor - bordercolor ImagickPixel object or a
241 * string containing the border color
242 * @param int $width - width Border width
243 * @param int $height - height Border height
248 function borderImage(mixed $bordercolor,
253 * Simulates a charcoal drawing
255 * @param float $radius - radius The radius of the Gaussian, in
256 * pixels, not counting the center pixel
257 * @param float $sigma - sigma The standard deviation of the
258 * Gaussian, in pixels *
262 function charcoalImage(float $radius,
266 * Removes a region of an image and trims
268 * @param int $width - width Width of the chopped area
269 * @param int $height - height Height of the chopped area
270 * @param int $x - x X origo of the chopped area
271 * @param int $y - y Y origo of the chopped area
276 function chopImage(int $width,
282 * Clears all resources associated to Imagick object
287 function clear(): bool;
290 * Clips along the first path from the 8BIM profile
295 function clipImage(): bool;
298 * Clips along the named paths from the 8BIM profile
300 * @param string $pathname - pathname The name of the path
301 * @param bool $inside - inside If TRUE later operations take effect
302 * inside clipping path. Otherwise later operations take effect outside
308 function clipPathImage(string $pathname,
312 * Makes an exact copy of the Imagick object
314 * @return Imagick - A copy of the Imagick object is returned.
317 function __clone(): void
;
320 * Replaces colors in the image
322 * @param Imagick $lookup_table - lookup_table Imagick object
323 * containing the color lookup table
324 * @param int $channel - channel The Channeltype constant. When not
325 * supplied, default channels are replaced.
330 function clutImage(Imagick
$lookup_table,
331 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
334 * Composites a set of images
336 * @return Imagick - Returns a new Imagick object on success.
339 function coalesceImages(): Imagick
;
342 * Changes the color value of any pixel that matches target
344 * @param mixed $fill - fill ImagickPixel object containing the fill
346 * @param float $fuzz - fuzz The amount of fuzz. For example, set
347 * fuzz to 10 and the color red at intensities of 100 and 102
348 * respectively are now interpreted as the same color for the purposes
350 * @param mixed $bordercolor - bordercolor ImagickPixel object
351 * containing the border color
352 * @param int $x - x X start position of the floodfill
353 * @param int $y - y Y start position of the floodfill
358 function colorFloodfillImage(mixed $fill,
365 * Blends the fill color with the image
367 * @param mixed $colorize - colorize ImagickPixel object or a string
368 * containing the colorize color
369 * @param mixed $opacity - opacity ImagickPixel object or an float
370 * containing the opacity value. 1.0 is fully opaque and 0.0 is fully
376 function colorizeImage(mixed $colorize,
377 mixed $opacity): bool;
380 * Combines one or more images into a single image
382 * @param int $channelType - channelType Provide any channel constant
383 * that is valid for your channel mode. To apply to more than one
384 * channel, combine channeltype constants using bitwise operators.
385 * Refer to this list of channel constants.
390 function combineImages(int $channelType): Imagick
;
393 * Adds a comment to your image
395 * @param string $comment - comment The comment to add
400 function commentImage(string $comment): bool;
403 * Returns the difference in one or more images
405 * @param Imagick $image - image Imagick object containing the image
407 * @param int $channelType - channelType Provide any channel constant
408 * that is valid for your channel mode. To apply to more than one
409 * channel, combine channeltype constants using bitwise operators.
410 * Refer to this list of channel constants.
411 * @param int $metricType - metricType One of the metric type
414 * @return array - Array consisting of new_wand and distortion.
417 function compareImageChannels(Imagick
$image,
419 int $metricType): array;
422 * Returns the maximum bounding region between images
424 * @param int $method - method One of the layer method constants.
429 function compareImageLayers(int $method): Imagick
;
432 * Compares an image to a reconstructed image
434 * @param Imagick $compare - compare An image to compare to.
435 * @param int $metric - metric Provide a valid metric type constant.
436 * Refer to this list of metric constants.
441 function compareImages(Imagick
$compare,
445 * Composite one image onto another
447 * @param Imagick $composite_object - composite_object Imagick object
448 * which holds the composite image
449 * @param int $composite -
450 * @param int $x - x The column offset of the composited image
451 * @param int $y - y The row offset of the composited image
452 * @param int $channel - channel Provide any channel constant that is
453 * valid for your channel mode. To apply to more than one channel,
454 * combine channeltype constants using bitwise operators. Refer to this
455 * list of channel constants.
460 function compositeImage(Imagick
$composite_object,
464 int $channel = Imagick
::CHANNEL_ALL
): bool;
467 * The Imagick constructor
469 * @param mixed $files -
471 * @return - Returns a new Imagick object on success.
474 function __construct(mixed $files = null): void
;
477 * Change the contrast of the image
479 * @param bool $sharpen - sharpen The sharpen value
484 function contrastImage(bool $sharpen): bool;
487 * Enhances the contrast of a color image
489 * @param float $black_point - black_point The black point.
490 * @param float $white_point - white_point The white point.
491 * @param int $channel - channel Provide any channel constant that is
492 * valid for your channel mode. To apply to more than one channel,
493 * combine channeltype constants using bitwise operators.
494 * Imagick::CHANNEL_ALL. Refer to this list of channel constants.
499 function contrastStretchImage(float $black_point,
501 int $channel = Imagick
::CHANNEL_ALL
): bool;
504 * Applies a custom convolution kernel to the image
506 * @param array $kernel - kernel The convolution kernel
507 * @param int $channel - channel Provide any channel constant that is
508 * valid for your channel mode. To apply to more than one channel,
509 * combine channeltype constants using bitwise operators. Refer to this
510 * list of channel constants.
515 function convolveImage(array $kernel,
516 int $channel = Imagick
::CHANNEL_ALL
): bool;
519 * Extracts a region of the image
521 * @param int $width - width The width of the crop
522 * @param int $height - height The height of the crop
523 * @param int $x - x The X coordinate of the cropped region's top
525 * @param int $y - y The Y coordinate of the cropped region's top
531 function cropImage(int $width,
537 * Creates a crop thumbnail
539 * @param int $width - width The width of the thumbnail
540 * @param int $height - height The Height of the thumbnail
545 function cropThumbnailImage(int $width,
549 * Returns a reference to the current Imagick object
551 * @return Imagick - Returns self on success.
554 function current(): Imagick
;
557 * Displaces an image's colormap
559 * @param int $displace - displace The amount to displace the
565 function cycleColormapImage(int $displace): bool;
570 * @param string $passphrase - passphrase The passphrase
575 function decipherImage(string $passphrase): bool;
578 * Returns certain pixel differences between images
580 * @return Imagick - Returns a new Imagick object on success.
583 function deconstructImages(): Imagick
;
586 * Delete image artifact
588 * @param string $artifact - artifact The name of the artifact to
594 function deleteImageArtifact(string $artifact): bool;
597 * Removes skew from the image
599 * @param float $threshold - threshold Deskew threshold
604 public function deskewImage(float $threshold): bool;
607 * Reduces the speckle noise in an image
612 function despeckleImage(): bool;
615 * Destroys the Imagick object
620 function destroy(): bool;
625 * @param string $servername - servername The X server name
630 function displayImage(string $servername): bool;
633 * Displays an image or image sequence
635 * @param string $servername - servername The X server name
640 function displayImages(string $servername): bool;
643 * Distorts an image using various distortion methods
645 * @param int $method - method The method of image distortion. See
646 * distortion constants
647 * @param array $arguments - arguments The arguments for this
649 * @param bool $bestfit - bestfit Attempt to resize destination to
650 * fit distorted source
655 function distortImage(int $method,
657 bool $bestfit): bool;
660 * Renders the ImagickDraw object on the current image
662 * @param ImagickDraw $draw - draw The drawing operations to render
668 function drawImage(ImagickDraw
$draw): bool;
671 * Enhance edges within the image
673 * @param float $radius - radius The radius of the operation.
678 function edgeImage(float $radius): bool;
681 * Returns a grayscale image with a three-dimensional effect
683 * @param float $radius - radius The radius of the effect
684 * @param float $sigma - sigma The sigma of the effect
689 function embossImage(float $radius,
695 * @param string $passphrase - passphrase The passphrase
700 function encipherImage(string $passphrase): bool;
703 * Improves the quality of a noisy image
708 function enhanceImage(): bool;
711 * Equalizes the image histogram
716 function equalizeImage(): bool;
719 * Applies an expression to an image
721 * @param int $op - op The evaluation operator
722 * @param float $constant - constant The value of the operator
723 * @param int $channel - channel Provide any channel constant that is
724 * valid for your channel mode. To apply to more than one channel,
725 * combine channeltype constants using bitwise operators. Refer to this
726 * list of channel constants.
731 function evaluateImage(int $op,
733 int $channel = Imagick
::CHANNEL_ALL
): bool;
736 * Exports raw image pixels
738 * @param int $x - x X-coordinate of the exported area
739 * @param int $y - y Y-coordinate of the exported area
740 * @param int $width - width Width of the exported aread
741 * @param int $height - height Height of the exported area
742 * @param string $map - map Ordering of the exported pixels. For
743 * example "RGB". Valid characters for the map are R, G, B, A, O, C, Y,
745 * @param int $storage - storage Refer to this list of pixel type
748 * @return array - Returns an array containing the pixels values.
751 public function exportImagePixels(int $x,
756 int $storage): array;
761 * @param int $width - width The new width
762 * @param int $height - height The new height
763 * @param int $x - x X position for the new size
764 * @param int $y - y Y position for the new size
769 function extentImage(int $width,
775 * Merges a sequence of images
780 function flattenImages(): Imagick
;
783 * Creates a vertical mirror image
788 function flipImage(): bool;
791 * Changes the color value of any pixel that matches target
793 * @param mixed $fill - fill ImagickPixel object or a string
794 * containing the fill color
795 * @param float $fuzz - fuzz
796 * @param mixed $target - target ImagickPixel object or a string
797 * containing the target color to paint
798 * @param int $x - x X start position of the floodfill
799 * @param int $y - y Y start position of the floodfill
800 * @param bool $invert - invert If TRUE paints any pixel that does
801 * not match the target color.
802 * @param int $channel - channel
807 function floodFillPaintImage(mixed $fill,
813 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
816 * Creates a horizontal mirror image
821 function flopImage(): bool;
824 * Adds a simulated three-dimensional border
826 * @param mixed $matte_color - matte_color ImagickPixel object or a
827 * string representing the matte color
828 * @param int $width - width The width of the border
829 * @param int $height - height The height of the border
830 * @param int $inner_bevel - inner_bevel The inner bevel width
831 * @param int $outer_bevel - outer_bevel The outer bevel width
836 function frameImage(mixed $matte_color,
840 int $outer_bevel): bool;
843 * Applies a function on the image
845 * @param int $function - function Refer to this list of function
847 * @param array $arguments - arguments Array of arguments to pass to
849 * @param int $channel -
854 public function functionImage(int $function,
856 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
859 * Evaluate expression for each pixel in the image
861 * @param string $expression - expression The expression.
862 * @param int $channel - channel Provide any channel constant that is
863 * valid for your channel mode. To apply to more than one channel,
864 * combine channeltype constants using bitwise operators. Refer to this
865 * list of channel constants.
870 function fxImage(string $expression,
871 int $channel = Imagick
::CHANNEL_ALL
): Imagick
;
874 * Gamma-corrects an image
876 * @param float $gamma - gamma The amount of gamma-correction.
877 * @param int $channel - channel Provide any channel constant that is
878 * valid for your channel mode. To apply to more than one channel,
879 * combine channeltype constants using bitwise operators. Refer to this
880 * list of channel constants.
885 function gammaImage(float $gamma,
886 int $channel = Imagick
::CHANNEL_ALL
): bool;
891 * @param float $radius - radius The radius of the Gaussian, in
892 * pixels, not counting the center pixel.
893 * @param float $sigma - sigma The standard deviation of the
894 * Gaussian, in pixels.
895 * @param int $channel - channel Provide any channel constant that is
896 * valid for your channel mode. To apply to more than one channel,
897 * combine channeltype constants using bitwise operators. Refer to this
898 * list of channel constants.
903 function gaussianBlurImage(float $radius,
905 int $channel = Imagick
::CHANNEL_ALL
): bool;
908 * Gets the colorspace
910 * @return int - Returns an integer which can be compared against
911 * COLORSPACE constants.
914 function getColorspace(): int;
917 * Gets the object compression type
919 * @return int - Returns the compression constant
922 function getCompression(): int;
925 * Gets the current image's compression quality
927 * @return int - Returns integer describing the images compression
931 function getCompressionQuality(): int;
934 * Returns the ImageMagick API copyright as a string
936 * @return string - Returns a string containing the copyright notice of
937 * Imagemagick and Magickwand C API.
940 static function getCopyright(): string;
943 * The filename associated with an image sequence
945 * @return string - Returns a string on success.
948 function getFilename(): string;
953 * @return string - Returns the string containing the font name or
954 * FALSE if not font is set.
957 function getFont(): string;
960 * Returns the format of the Imagick object
962 * @return string - Returns the format of the image.
965 function getFormat(): string;
970 * @return int - Returns the gravity property. Refer to the list of
974 function getGravity(): int;
977 * Returns the ImageMagick home URL
979 * @return string - Returns a link to the imagemagick homepage.
982 static function getHomeURL(): string;
985 * Returns a new Imagick object
987 * @return Imagick - Returns a new Imagick object with the current
991 function getImage(): Imagick
;
994 * Gets the image alpha channel
996 * @return int - Returns a constant defining the current alpha channel
997 * value. Refer to this list of alpha channel constants.
1000 function getImageAlphaChannel(): int;
1003 * Get image artifact
1005 * @param string $artifact - artifact The name of the artifact
1007 * @return string - Returns the artifact value on success.
1010 function getImageArtifact(string $artifact): string;
1013 * Returns the image background color
1015 * @return ImagickPixel - Returns an ImagickPixel set to the background
1016 * color of the image.
1019 function getImageBackgroundColor(): ImagickPixel
;
1022 * Returns the image sequence as a blob
1024 * @return string - Returns a string containing the image.
1027 function getImageBlob(): string;
1030 * Returns the chromaticy blue primary point
1032 * @return array - Array consisting of "x" and "y" coordinates of
1036 function getImageBluePrimary(): array;
1039 * Returns the image border color
1041 * @return ImagickPixel -
1044 function getImageBorderColor(): ImagickPixel
;
1047 * Gets the depth for a particular image channel
1049 * @param int $channel - channel
1054 function getImageChannelDepth(int $channel): int;
1057 * Compares image channels of an image to a reconstructed image
1059 * @param Imagick $reference - reference Imagick object to compare
1061 * @param int $channel - channel Provide any channel constant that is
1062 * valid for your channel mode. To apply to more than one channel,
1063 * combine channeltype constants using bitwise operators. Refer to this
1064 * list of channel constants.
1065 * @param int $metric - metric One of the metric type constants.
1070 function getImageChannelDistortion(Imagick
$reference,
1072 int $metric): float;
1075 * Gets channel distortions
1077 * @param Imagick $reference - reference Imagick object containing
1078 * the reference image
1079 * @param int $metric - metric Refer to this list of metric type
1081 * @param int $channel - channel
1083 * @return float - Returns a double describing the channel distortion.
1086 function getImageChannelDistortions(Imagick
$reference,
1088 int $channel = Imagick
::CHANNEL_DEFAULT
): float;
1091 * Gets the extrema for one or more image channels
1093 * @param int $channel - channel Provide any channel constant that is
1094 * valid for your channel mode. To apply to more than one channel,
1095 * combine channeltype constants using bitwise operators. Refer to this
1096 * list of channel constants.
1101 function getImageChannelExtrema(int $channel): array;
1104 * The getImageChannelKurtosis purpose
1106 * @param int $channel - channel
1108 * @return array - Returns an array with kurtosis and skewness members.
1111 public function getImageChannelKurtosis(int $channel = Imagick
::CHANNEL_DEFAULT
): array;
1114 * Gets the mean and standard deviation
1116 * @param int $channel - channel Provide any channel constant that is
1117 * valid for your channel mode. To apply to more than one channel,
1118 * combine channeltype constants using bitwise operators. Refer to this
1119 * list of channel constants.
1124 function getImageChannelMean(int $channel): array;
1127 * Gets channel range
1129 * @param int $channel - channel
1131 * @return array - Returns an array containing minima and maxima values
1132 * of the channel(s).
1135 function getImageChannelRange(int $channel): array;
1138 * Returns statistics for each channel in the image
1143 function getImageChannelStatistics(): array;
1146 * Gets image clip mask
1148 * @return Imagick - Returns an Imagick object containing the clip
1152 function getImageClipMask(): Imagick
;
1155 * Returns the color of the specified colormap index
1157 * @param int $index - index The offset into the image colormap.
1159 * @return ImagickPixel -
1162 function getImageColormapColor(int $index): ImagickPixel
;
1165 * Gets the number of unique colors in the image
1170 function getImageColors(): int;
1173 * Gets the image colorspace
1178 function getImageColorspace(): int;
1181 * Returns the composite operator associated with the image
1186 function getImageCompose(): int;
1189 * Gets the current image's compression type
1191 * @return int - Returns the compression constant
1194 function getImageCompression(): int;
1197 * Gets the image delay
1199 * @return int - Returns the image delay.
1202 function getImageDelay(): int;
1205 * Gets the image depth
1207 * @return int - The image depth.
1210 function getImageDepth(): int;
1213 * Gets the image disposal method
1215 * @return int - Returns the dispose method on success.
1218 function getImageDispose(): int;
1221 * Compares an image to a reconstructed image
1223 * @param magickwand $reference - reference Imagick object to compare
1225 * @param int $metric - metric One of the metric type constants.
1227 * @return float - Returns the distortion metric used on the image (or
1228 * the best guess thereof).
1231 function getImageDistortion(magickwand
$reference,
1232 int $metric): float;
1235 * Gets the extrema for the image
1237 * @return array - Returns an associative array with the keys "min" and
1241 function getImageExtrema(): array;
1244 * Returns the filename of a particular image in a sequence
1246 * @return string - Returns a string with the filename of the image.
1249 function getImageFilename(): string;
1252 * Returns the format of a particular image in a sequence
1254 * @return string - Returns a string containing the image format on
1258 function getImageFormat(): string;
1261 * Gets the image gamma
1263 * @return float - Returns the image gamma on success.
1266 function getImageGamma(): float;
1269 * Gets the width and height as an associative array
1271 * @return array - Returns an array with the width/height of the image.
1274 function getImageGeometry(): array;
1277 * Gets the image gravity
1279 * @return int - Returns the images gravity property. Refer to the list
1280 * of gravity constants.
1283 function getImageGravity(): int;
1286 * Returns the chromaticy green primary point
1288 * @return array - Returns an array with the keys "x" and "y" on
1289 * success, throws an ImagickException on failure.
1292 function getImageGreenPrimary(): array;
1295 * Returns the image height
1297 * @return int - Returns the image height in pixels.
1300 function getImageHeight(): int;
1303 * Gets the image histogram
1305 * @return array - Returns the image histogram as an array of
1306 * ImagickPixel objects.
1309 function getImageHistogram(): array;
1312 * Gets the index of the current active image
1314 * @return int - Returns an integer containing the index of the image
1318 function getImageIndex(): int;
1321 * Gets the image interlace scheme
1323 * @return int - Returns the interlace scheme as an integer on success.
1326 function getImageInterlaceScheme(): int;
1329 * Returns the interpolation method
1331 * @return int - Returns the interpolate method on success.
1334 function getImageInterpolateMethod(): int;
1337 * Gets the image iterations
1339 * @return int - Returns the image iterations as an integer.
1342 function getImageIterations(): int;
1345 * Returns the image length in bytes
1347 * @return int - Returns an int containing the current image size.
1350 function getImageLength(): int;
1353 * Return if the image has a matte channel
1358 function getImageMatte(): bool;
1361 * Returns the image matte color
1363 * @return ImagickPixel - Returns ImagickPixel object on success.
1366 function getImageMatteColor(): ImagickPixel
;
1369 function getImageMimeType(): string;
1372 * Gets the image orientation
1374 * @return int - Returns an int on success.
1377 function getImageOrientation(): int;
1380 * Returns the page geometry
1382 * @return array - Returns the page geometry associated with the image
1383 * in an array with the keys "width", "height", "x", and "y".
1386 function getImagePage(): array;
1389 * Returns the color of the specified pixel
1391 * @param int $x - x The x-coordinate of the pixel
1392 * @param int $y - y The y-coordinate of the pixel
1394 * @return ImagickPixel - Returns an ImagickPixel instance for the
1395 * color at the coordinates given.
1398 function getImagePixelColor(int $x,
1399 int $y): ImagickPixel
;
1402 * Returns the named image profile
1404 * @param string $name - name The name of the profile to return.
1406 * @return string - Returns a string containing the image profile.
1409 function getImageProfile(string $name): string;
1412 * Returns the image profiles
1414 * @param string $pattern - pattern The pattern for profile names.
1415 * @param bool $only_names - only_names Whether to return only
1416 * profile names. If FALSE then values are returned as well
1418 * @return array - Returns an array containing the image profiles or
1422 function getImageProfiles(string $pattern = '*',
1423 bool $with_values = true): array;
1426 * Returns the image properties
1428 * @param string $pattern - pattern The pattern for property names.
1429 * @param bool $only_names - only_names Whether to return only
1430 * property names. If FALSE then also the values are returned
1432 * @return array - Returns an array containing the image properties or
1436 function getImageProperties(string $pattern = '*',
1437 bool $with_values = true): array;
1440 * Returns the named image property
1442 * @param string $name - name name of the property (for example
1445 * @return string - Returns a string containing the image property,
1446 * false if a property with the given name does not exist.
1449 function getImageProperty(string $name): string;
1452 * Returns the chromaticity red primary point
1454 * @return array - Returns the chromaticity red primary point as an
1455 * array with the keys "x" and "y".
1458 function getImageRedPrimary(): array;
1461 * Extracts a region of the image
1463 * @param int $width - width The width of the extracted region.
1464 * @param int $height - height The height of the extracted region.
1465 * @param int $x - x X-coordinate of the top-left corner of the
1467 * @param int $y - y Y-coordinate of the top-left corner of the
1470 * @return Imagick - Extracts a region of the image and returns it as a
1474 function getImageRegion(int $width,
1480 * Gets the image rendering intent
1482 * @return int - Returns the image rendering intent.
1485 function getImageRenderingIntent(): int;
1488 * Gets the image X and Y resolution
1490 * @return array - Returns the resolution as an array.
1493 function getImageResolution(): array;
1496 * Returns all image sequences as a blob
1498 * @return string - Returns a string containing the images. On failure,
1499 * throws ImagickException.
1502 function getImagesBlob(): string;
1505 * Gets the image scene
1507 * @return int - Returns the image scene.
1510 function getImageScene(): int;
1513 * Generates an SHA-256 message digest
1515 * @return string - Returns a string containing the SHA-256 hash of the
1519 function getImageSignature(): string;
1522 * Returns the image length in bytes
1524 * @return int - Returns an int containing the current image size.
1527 function getImageSize(): int;
1530 * Gets the image ticks-per-second
1532 * @return int - Returns the image ticks-per-second.
1535 function getImageTicksPerSecond(): int;
1538 * Gets the image total ink density
1540 * @return float - Returns the image total ink density of the image.
1543 function getImageTotalInkDensity(): float;
1546 * Gets the potential image type
1548 * @return int - Returns the potential image type.
1549 * Imagick::IMGTYPE_UNDEFINED Imagick::IMGTYPE_BILEVEL
1550 * Imagick::IMGTYPE_GRAYSCALE Imagick::IMGTYPE_GRAYSCALEMATTE
1551 * Imagick::IMGTYPE_PALETTE Imagick::IMGTYPE_PALETTEMATTE
1552 * Imagick::IMGTYPE_TRUECOLOR Imagick::IMGTYPE_TRUECOLORMATTE
1553 * Imagick::IMGTYPE_COLORSEPARATION
1554 * Imagick::IMGTYPE_COLORSEPARATIONMATTE Imagick::IMGTYPE_OPTIMIZE
1557 function getImageType(): int;
1560 * Gets the image units of resolution
1562 * @return int - Returns the image units of resolution.
1565 function getImageUnits(): int;
1568 * Returns the virtual pixel method
1570 * @return int - Returns the virtual pixel method on success.
1573 function getImageVirtualPixelMethod(): int;
1576 * Returns the chromaticity white point
1578 * @return array - Returns the chromaticity white point as an
1579 * associative array with the keys "x" and "y".
1582 function getImageWhitePoint(): array;
1585 * Returns the image width
1587 * @return int - Returns the image width.
1590 function getImageWidth(): int;
1593 * Gets the object interlace scheme
1595 * @return int - Gets the wand interlace scheme.
1598 function getInterlaceScheme(): int;
1601 * Gets the index of the current active image
1603 * @return int - Returns an integer containing the index of the image
1607 function getIteratorIndex(): int;
1610 * Returns the number of images in the object
1612 * @return int - Returns the number of images associated with Imagick
1616 function getNumberImages(): int;
1619 * Returns a value associated with the specified key
1621 * @param string $key - key The name of the option
1623 * @return string - Returns a value associated with a wand and the
1627 function getOption(string $key): string;
1630 * Returns the ImageMagick package name
1632 * @return string - Returns the ImageMagick package name as a string.
1635 static function getPackageName(): string;
1638 * Returns the page geometry
1640 * @return array - Returns the page geometry associated with the
1641 * Imagick object in an associative array with the keys "width",
1642 * "height", "x", and "y", throwing ImagickException on error.
1645 function getPage(): array;
1648 * Returns a MagickPixelIterator
1650 * @return ImagickPixelIterator - Returns an ImagickPixelIterator on
1654 function getPixelIterator(): ImagickPixelIterator
;
1657 * Get an ImagickPixelIterator for an image section
1659 * @param int $x - x The x-coordinate of the region.
1660 * @param int $y - y The y-coordinate of the region.
1661 * @param int $columns - columns The width of the region.
1662 * @param int $rows - rows The height of the region.
1664 * @return ImagickPixelIterator - Returns an ImagickPixelIterator for
1668 function getPixelRegionIterator(int $x,
1671 int $rows): ImagickPixelIterator
;
1676 * @return float - Returns a containing the point size.
1679 function getPointSize(): float;
1682 * Gets the quantum depth
1684 * @return array - Returns the Imagick quantum depth as a string.
1687 static function getQuantumDepth(): array;
1690 * Returns the Imagick quantum range
1692 * @return array - Returns the Imagick quantum range as a string.
1695 static function getQuantumRange(): array;
1698 * Returns the ImageMagick release date
1700 * @return string - Returns the ImageMagick release date as a string.
1703 static function getReleaseDate(): string;
1706 * Returns the specified resource's memory usage
1708 * @param int $type - type Refer to the list of resourcetype
1711 * @return int - Returns the specified resource's memory usage in
1715 static function getResource(int $type): int;
1718 * Returns the specified resource limit
1720 * @param int $type - type Refer to the list of resourcetype
1723 * @return int - Returns the specified resource limit in megabytes.
1726 static function getResourceLimit(int $type): int;
1729 * Gets the horizontal and vertical sampling factor
1731 * @return array - Returns an associative array with the horizontal and
1732 * vertical sampling factors of the image.
1735 function getSamplingFactors(): array;
1738 * Returns the size associated with the Imagick object
1740 * @return array - Returns the size associated with the Imagick object
1741 * as an array with the keys "columns" and "rows".
1744 function getSize(): array;
1747 * Returns the size offset
1749 * @return int - Returns the size offset associated with the Imagick
1753 function getSizeOffset(): int;
1756 * Returns the ImageMagick API version
1758 * @return array - Returns the ImageMagick API version as a string and
1762 static function getVersion(): array;
1765 * Replaces colors in the image
1767 * @param Imagick $clut - clut Imagick object containing the Hald
1769 * @param int $channel - channel
1774 public function haldClutImage(Imagick
$clut,
1775 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
1778 * Checks if the object has more images
1780 * @return bool - Returns TRUE if the object has more images when
1781 * traversing the list in the forward direction, returns FALSE if there
1785 function hasNextImage(): bool;
1788 * Checks if the object has a previous image
1790 * @return bool - Returns TRUE if the object has more images when
1791 * traversing the list in the reverse direction, returns FALSE if there
1795 function hasPreviousImage(): bool;
1798 * Identifies an image and fetches attributes
1800 * @param bool $appendRawOutput - appendRawOutput
1802 * @return array - Identifies an image and returns the attributes.
1803 * Attributes include the image width, height, size, and others.
1806 function identifyImage(bool $appendRawOutput = false): array;
1809 * Creates a new image as a copy
1811 * @param float $radius - radius The radius of the implode
1816 function implodeImage(float $radius): bool;
1819 * Imports image pixels
1821 * @param int $x - x The image x position
1822 * @param int $y - y The image y position
1823 * @param int $width - width The image width
1824 * @param int $height - height The image height
1825 * @param string $map - map Map of pixel ordering as a string. This
1826 * can be for example RGB. The value can be any combination or order of
1827 * R = red, G = green, B = blue, A = alpha (0 is transparent), O =
1828 * opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black,
1829 * I = intensity (for grayscale), P = pad.
1830 * @param int $storage - storage The pixel storage method. Refer to
1831 * this list of pixel constants.
1832 * @param array $pixels - pixels The array of pixels
1837 public function importImagePixels(int $x,
1843 array $pixels): bool;
1846 * Adds a label to an image
1848 * @param string $label - label The label to add
1853 function labelImage(string $label): bool;
1856 * Adjusts the levels of an image
1858 * @param float $blackPoint - blackPoint The image black point
1859 * @param float $gamma - gamma The gamma value
1860 * @param float $whitePoint - whitePoint The image white point
1861 * @param int $channel - channel Provide any channel constant that is
1862 * valid for your channel mode. To apply to more than one channel,
1863 * combine channeltype constants using bitwise operators. Refer to this
1864 * list of channel constants.
1869 function levelImage(float $blackPoint,
1872 int $channel = Imagick
::CHANNEL_ALL
): bool;
1875 * Stretches with saturation the image intensity
1877 * @param float $blackPoint - blackPoint The image black point
1878 * @param float $whitePoint - whitePoint The image white point
1883 function linearStretchImage(float $blackPoint,
1884 float $whitePoint): bool;
1887 * Animates an image or images
1889 * @param int $width - width The width of the target size
1890 * @param int $height - height The height of the target size
1891 * @param float $delta_x - delta_x How much the seam can traverse on
1892 * x-axis. Passing 0 causes the seams to be straight.
1893 * @param float $rigidity - rigidity Introduces a bias for
1894 * non-straight seams. This parameter is typically 0.
1899 function liquidRescaleImage(int $width,
1902 float $rigidity): bool;
1905 * Scales an image proportionally 2x
1910 function magnifyImage(): bool;
1913 * Replaces the colors of an image with the closest color from a reference
1916 * @param Imagick $map - map
1917 * @param bool $dither - dither
1922 function mapImage(Imagick
$map,
1923 bool $dither): bool;
1926 * Changes the transparency value of a color
1928 * @param float $alpha - alpha The level of transparency: 1.0 is
1929 * fully opaque and 0.0 is fully transparent.
1930 * @param float $fuzz - fuzz The fuzz member of image defines how
1931 * much tolerance is acceptable to consider two colors as the same.
1932 * @param mixed $bordercolor - bordercolor An ImagickPixel object or
1933 * string representing the border color.
1934 * @param int $x - x The starting x coordinate of the operation.
1935 * @param int $y - y The starting y coordinate of the operation.
1940 function matteFloodfillImage(float $alpha,
1947 * Applies a digital filter
1949 * @param float $radius - radius The radius of the pixel
1955 function medianFilterImage(float $radius): bool;
1958 * Merges image layers
1960 * @param int $layer_method - layer_method One of the
1961 * Imagick::LAYERMETHOD_* constants
1966 function mergeImageLayers(int $layer_method): Imagick
;
1969 * Scales an image proportionally to half its size
1974 function minifyImage(): bool;
1977 * Control the brightness, saturation, and hue
1979 * @param float $brightness - brightness
1980 * @param float $saturation - saturation
1981 * @param float $hue - hue
1986 function modulateImage(float $brightness,
1991 * Creates a composite image
1993 * @param ImagickDraw $draw - draw The font name, size, and color are
1994 * obtained from this object.
1995 * @param string $tile_geometry - tile_geometry The number of tiles
1996 * per row and page (e.g. 6x4+0+0).
1997 * @param string $thumbnail_geometry - thumbnail_geometry Preferred
1998 * image size and border size of each thumbnail (e.g. 120x120+4+3>).
1999 * @param int $mode - mode Thumbnail framing mode, see Montage Mode
2001 * @param string $frame - frame Surround the image with an ornamental
2002 * border (e.g. 15x15+3+3). The frame color is that of the thumbnail's
2008 function montageImage(ImagickDraw
$draw,
2009 string $tile_geometry,
2010 string $thumbnail_geometry,
2012 string $frame): Imagick
;
2015 * Method morphs a set of images
2017 * @param int $number_frames - number_frames The number of in-between
2018 * images to generate.
2020 * @return Imagick - This method returns a new Imagick object on
2024 function morphImages(int $number_frames): Imagick
;
2027 * Forms a mosaic from images
2032 function mosaicImages(): Imagick
;
2035 * Simulates motion blur
2037 * @param float $radius - radius The radius of the Gaussian, in
2038 * pixels, not counting the center pixel.
2039 * @param float $sigma - sigma The standard deviation of the
2040 * Gaussian, in pixels.
2041 * @param float $angle - angle Apply the effect along this angle.
2042 * @param int $channel - channel Provide any channel constant that is
2043 * valid for your channel mode. To apply to more than one channel,
2044 * combine channeltype constants using bitwise operators. Refer to this
2045 * list of channel constants. The channel argument affects only if
2046 * Imagick is compiled against ImageMagick version 6.4.4 or greater.
2051 function motionBlurImage(float $radius,
2054 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
2057 * Negates the colors in the reference image
2059 * @param bool $gray - gray Whether to only negate grayscale pixels
2061 * @param int $channel - channel Provide any channel constant that is
2062 * valid for your channel mode. To apply to more than one channel,
2063 * combine channeltype constants using bitwise operators. Refer to this
2064 * list of channel constants.
2069 function negateImage(bool $gray,
2070 int $channel = Imagick
::CHANNEL_ALL
): bool;
2073 * Creates a new image
2075 * @param int $cols - cols Columns in the new image
2076 * @param int $rows - rows Rows in the new image
2077 * @param mixed $background - background The background color used
2079 * @param string $format - format Image format. This parameter was
2080 * added in Imagick version 2.0.1.
2085 function newImage(int $cols,
2088 string $format = ''): bool;
2091 * Creates a new image
2093 * @param int $columns - columns columns in the new image
2094 * @param int $rows - rows rows in the new image
2095 * @param string $pseudoString - pseudoString string containing
2096 * pseudo image definition.
2101 function newPseudoImage(int $columns,
2103 string $pseudoString): bool;
2106 * Moves to the next image
2111 function nextImage(): bool;
2114 * Enhances the contrast of a color image
2116 * @param int $channel - channel Provide any channel constant that is
2117 * valid for your channel mode. To apply to more than one channel,
2118 * combine channeltype constants using bitwise operators. Refer to this
2119 * list of channel constants.
2124 function normalizeImage(int $channel = Imagick
::CHANNEL_ALL
): bool;
2127 * Simulates an oil painting
2129 * @param float $radius - radius The radius of the circular
2135 function oilPaintImage(float $radius): bool;
2138 * Changes the color value of any pixel that matches target
2140 * @param mixed $target - target ImagickPixel object or a string
2141 * containing the color to change
2142 * @param mixed $fill - fill The replacement color
2143 * @param float $fuzz - fuzz
2144 * @param bool $invert - invert If TRUE paints any pixel that does
2145 * not match the target color.
2146 * @param int $channel - channel
2151 function opaquePaintImage(mixed $target,
2155 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
2158 * Removes repeated portions of images to optimize
2163 function optimizeImageLayers(): Imagick
;
2166 * Performs an ordered dither
2168 * @param string $threshold_map - threshold_map A string containing
2169 * the name of the threshold dither map to use
2170 * @param int $channel - channel Provide any channel constant that is
2171 * valid for your channel mode. To apply to more than one channel,
2172 * combine channeltype constants using bitwise operators. Refer to this
2173 * list of channel constants.
2178 function orderedPosterizeImage(string $threshold_map,
2179 int $channel = Imagick
::CHANNEL_ALL
): bool;
2182 * Changes the color value of any pixel that matches target
2184 * @param mixed $fill - fill ImagickPixel object or a string
2185 * containing the fill color
2186 * @param float $fuzz - fuzz The amount of fuzz. For example, set
2187 * fuzz to 10 and the color red at intensities of 100 and 102
2188 * respectively are now interpreted as the same color for the purposes
2190 * @param mixed $bordercolor - bordercolor ImagickPixel object or a
2191 * string containing the border color
2192 * @param int $x - x X start position of the floodfill
2193 * @param int $y - y Y start position of the floodfill
2194 * @param int $channel - channel
2199 function paintFloodfillImage(mixed $fill,
2204 int $channel = Imagick
::CHANNEL_ALL
): bool;
2207 * Change any pixel that matches color
2209 * @param mixed $target - target Change this target color to the fill
2210 * color within the image. An ImagickPixel object or a string
2211 * representing the target color.
2212 * @param mixed $fill - fill An ImagickPixel object or a string
2213 * representing the fill color.
2214 * @param float $fuzz - fuzz The fuzz member of image defines how
2215 * much tolerance is acceptable to consider two colors as the same.
2216 * @param int $channel - channel Provide any channel constant that is
2217 * valid for your channel mode. To apply to more than one channel,
2218 * combine channeltype constants using bitwise operators. Refer to this
2219 * list of channel constants.
2224 function paintOpaqueImage(mixed $target,
2227 int $channel = Imagick
::CHANNEL_ALL
): bool;
2230 * Changes any pixel that matches color with the color defined by fill
2232 * @param mixed $target - target Change this target color to
2233 * specified opacity value within the image.
2234 * @param float $alpha - alpha The level of transparency: 1.0 is
2235 * fully opaque and 0.0 is fully transparent.
2236 * @param float $fuzz - fuzz The fuzz member of image defines how
2237 * much tolerance is acceptable to consider two colors as the same.
2242 function paintTransparentImage(mixed $target,
2247 * Fetch basic attributes about the image
2249 * @param string $filename - filename The filename to read the
2255 function pingImage(string $filename): bool;
2258 * Quickly fetch attributes
2260 * @param string $image - image A string containing the image.
2265 function pingImageBlob(string $image): bool;
2268 * Get basic image attributes in a lightweight manner
2270 * @param resource $filehandle - filehandle An open filehandle to the
2272 * @param string $fileName - fileName Optional filename for this
2278 function pingImageFile(resource $filehandle,
2279 string $fileName): bool;
2282 * Simulates a Polaroid picture
2284 * @param ImagickDraw $properties - properties The polaroid
2286 * @param float $angle - angle The polaroid angle
2291 function polaroidImage(ImagickDraw
$properties,
2292 float $angle): bool;
2295 * Reduces the image to a limited number of color level
2297 * @param int $levels - levels
2298 * @param bool $dither - dither
2303 function posterizeImage(int $levels,
2304 bool $dither): bool;
2307 * Quickly pin-point appropriate parameters for image processing
2309 * @param int $preview - preview Preview type. See Preview type
2315 function previewImages(int $preview): Imagick
;
2318 * Move to the previous image in the object
2323 function previousImage(): bool;
2326 * Adds or removes a profile from an image
2328 * @param string $name - name
2329 * @param string $profile - profile
2334 function profileImage(string $name,
2335 string $profile): bool;
2338 * Analyzes the colors within a reference image
2340 * @param int $numberColors - numberColors
2341 * @param int $colorspace - colorspace
2342 * @param int $treedepth - treedepth
2343 * @param bool $dither - dither
2344 * @param bool $measureError - measureError
2349 function quantizeImage(int $numberColors,
2353 bool $measureError): bool;
2356 * Analyzes the colors within a sequence of images
2358 * @param int $numberColors - numberColors
2359 * @param int $colorspace - colorspace
2360 * @param int $treedepth - treedepth
2361 * @param bool $dither - dither
2362 * @param bool $measureError - measureError
2367 function quantizeImages(int $numberColors,
2371 bool $measureError): bool;
2374 * Returns an array representing the font metrics
2376 * @param ImagickDraw $properties - properties ImagickDraw object
2377 * containing font properties
2378 * @param string $text - text The text
2379 * @param bool $multiline - multiline Multiline parameter. If left
2380 * empty it is autodetected
2382 * @return array - Returns a multi-dimensional array representing the
2386 function queryFontMetrics(ImagickDraw
$properties,
2388 mixed $multiline = null): array;
2391 * Returns the configured fonts
2393 * @param string $pattern - pattern The query pattern
2395 * @return array - Returns an array containing the configured fonts.
2398 static function queryFonts(string $pattern = '*'): array;
2401 * Returns formats supported by Imagick
2403 * @param string $pattern - pattern
2405 * @return array - Returns an array containing the formats supported by
2409 static function queryFormats(string $pattern = '*'): array;
2412 * Radial blurs an image
2414 * @param float $angle - angle
2415 * @param int $channel - channel
2420 function radialBlurImage(float $angle,
2421 int $channel = Imagick
::CHANNEL_ALL
): bool;
2424 * Creates a simulated 3d button-like effect
2426 * @param int $width - width
2427 * @param int $height - height
2430 * @param bool $raise - raise
2435 function raiseImage(int $width,
2442 * Creates a high-contrast, two-color image
2444 * @param float $low - low The low point
2445 * @param float $high - high The high point
2446 * @param int $channel - channel Provide any channel constant that is
2447 * valid for your channel mode. To apply to more than one channel,
2448 * combine channeltype constants using bitwise operators. Refer to this
2449 * list of channel constants.
2454 function randomThresholdImage(float $low,
2456 int $channel = Imagick
::CHANNEL_ALL
): bool;
2459 * Reads image from filename
2461 * @param string $filename - filename
2466 function readImage(string $filename): bool;
2469 * Reads image from a binary string
2471 * @param string $image - image
2472 * @param string $filename -
2477 function readImageBlob(string $image,
2478 string $filename = ''): bool;
2481 * Reads image from open filehandle
2483 * @param resource $filehandle - filehandle
2484 * @param string $fileName - fileName
2489 function readImageFile(resource $filehandle,
2490 string $fileName = ''): bool;
2493 function readImages(array $files): bool;
2498 * @param array $matrix - matrix The matrix containing the color
2504 function recolorImage(array $matrix): bool;
2507 * Smooths the contours of an image
2509 * @param float $radius - radius
2514 function reduceNoiseImage(float $radius): bool;
2517 * Remaps image colors
2519 * @param Imagick $replacement - replacement An Imagick object
2520 * containing the replacement colors
2521 * @param int $dither - dither Refer to this list of dither method
2527 public function remapImage(Imagick
$replacement,
2531 * Removes an image from the image list
2536 function removeImage(): bool;
2539 * Removes the named image profile and returns it
2541 * @param string $name - name
2543 * @return string - Returns a string containing the profile of the
2547 function removeImageProfile(string $name): string;
2550 * Resample image to desired resolution
2552 * @param float $x_resolution - x_resolution
2553 * @param float $y_resolution - y_resolution
2554 * @param int $filter - filter
2555 * @param float $blur - blur
2560 function resampleImage(float $x_resolution,
2561 float $y_resolution,
2568 * @param string $page - page The page definition. For example
2574 function resetImagePage(string $page): bool;
2579 * @param int $columns - columns Width of the image
2580 * @param int $rows - rows Height of the image
2581 * @param int $filter - filter Refer to the list of filter constants.
2582 * @param float $blur - blur The blur factor where 1 is blurry, 1 is
2584 * @param bool $bestfit - bestfit Optional fit parameter.
2589 function resizeImage(int $columns,
2593 bool $bestfit = false): bool;
2598 * @param int $x - x The X offset.
2599 * @param int $y - y The Y offset.
2604 function rollImage(int $x,
2610 * @param mixed $background - background The background color
2611 * @param float $degrees - degrees The number of degrees to rotate
2617 function rotateImage(mixed $background,
2618 float $degrees): bool;
2621 * Rounds image corners
2623 * @param float $x_rounding - x_rounding x rounding
2624 * @param float $y_rounding - y_rounding y rounding
2625 * @param float $stroke_width - stroke_width stroke width
2626 * @param float $displace - displace image displace
2627 * @param float $size_correction - size_correction size correction
2632 function roundCorners(float $x_rounding,
2634 float $stroke_width = 10.0,
2635 float $displace = 5.0,
2636 float $size_correction = -6.0): bool;
2639 function roundCornersImage(float $x_rounding,
2641 float $stroke_width = 10.0,
2642 float $displace = 5.0,
2643 float $size_correction = -6.0): bool;
2646 * Scales an image with pixel sampling
2648 * @param int $columns - columns
2649 * @param int $rows - rows
2654 function sampleImage(int $columns,
2658 * Scales the size of an image
2660 * @param int $cols - cols
2661 * @param int $rows - rows
2662 * @param bool $bestfit - bestfit
2667 function scaleImage(int $cols,
2669 bool $bestfit = false): bool;
2674 * @param int $COLORSPACE - COLORSPACE One of the COLORSPACE
2676 * @param float $cluster_threshold - cluster_threshold A percentage
2677 * describing minimum number of pixels contained in hexedra before it
2678 * is considered valid.
2679 * @param float $smooth_threshold - smooth_threshold Eliminates noise
2680 * from the histogram.
2681 * @param bool $verbose - verbose Whether to output detailed
2682 * information about recognised classes.
2687 public function segmentImage(int $COLORSPACE,
2688 float $cluster_threshold,
2689 float $smooth_threshold,
2690 bool $verbose = false): bool;
2693 * Separates a channel from the image
2695 * @param int $channel - channel
2700 function separateImageChannel(int $channel): bool;
2703 * Sepia tones an image
2705 * @param float $threshold - threshold
2710 function sepiaToneImage(float $threshold): bool;
2713 * Sets the object's default background color
2715 * @param mixed $background - background
2720 function setBackgroundColor(mixed $background): bool;
2725 * @param int $COLORSPACE - COLORSPACE One of the COLORSPACE
2731 function setColorspace(int $COLORSPACE): bool;
2734 * Sets the object's default compression type
2736 * @param int $compression - compression
2741 function setCompression(int $compression): bool;
2744 * Sets the object's default compression quality
2746 * @param int $quality - quality
2751 function setCompressionQuality(int $quality): bool;
2754 * Sets the filename before you read or write the image
2756 * @param string $filename - filename
2761 function setFilename(string $filename): bool;
2764 * Sets the Imagick iterator to the first image
2769 function setFirstIterator(): bool;
2774 * @param string $font - font Font name or a filename
2779 function setFont(string $font): bool;
2782 * Sets the format of the Imagick object
2784 * @param string $format - format
2789 function setFormat(string $format): bool;
2794 * @param int $gravity - gravity The gravity property. Refer to the
2795 * list of gravity constants.
2800 function setGravity(int $gravity): bool;
2803 * Replaces image in the object
2805 * @param Imagick $replace - replace The replace Imagick object
2810 function setImage(Imagick
$replace): bool;
2813 * Sets image alpha channel
2815 * @param int $mode - mode One of the Imagick::ALPHACHANNEL_*
2821 function setImageAlphaChannel(int $mode): bool;
2824 * Set image artifact
2826 * @param string $artifact - artifact The name of the artifact
2827 * @param string $value - value The value of the artifact
2832 function setImageArtifact(string $artifact,
2833 string $value): bool;
2836 * Sets the image background color
2838 * @param mixed $background - background
2843 function setImageBackgroundColor(mixed $background): bool;
2846 * Sets the image bias for any method that convolves an image
2848 * @param float $bias - bias
2853 function setImageBias(float $bias): bool;
2856 * Sets the image chromaticity blue primary point
2858 * @param float $x - x
2859 * @param float $y - y
2864 function setImageBluePrimary(float $x,
2868 * Sets the image border color
2870 * @param mixed $border - border The border color
2875 function setImageBorderColor(mixed $border): bool;
2878 * Sets the depth of a particular image channel
2880 * @param int $channel - channel
2881 * @param int $depth - depth
2886 function setImageChannelDepth(int $channel,
2890 * Sets image clip mask
2892 * @param Imagick $clip_mask - clip_mask The Imagick object
2893 * containing the clip mask
2898 function setImageClipMask(Imagick
$clip_mask): bool;
2901 * Sets the color of the specified colormap index
2903 * @param int $index - index
2904 * @param ImagickPixel $color - color
2909 function setImageColormapColor(int $index,
2910 ImagickPixel
$color): bool;
2913 * Sets the image colorspace
2915 * @param int $colorspace - colorspace One of the COLORSPACE
2921 function setImageColorspace(int $colorspace): bool;
2924 * Sets the image composite operator
2926 * @param int $compose - compose
2931 function setImageCompose(int $compose): bool;
2934 * Sets the image compression
2936 * @param int $compression - compression One of the COMPRESSION
2942 function setImageCompression(int $compression): bool;
2945 * Sets the image compression quality
2947 * @param int $quality - quality The image compression quality as an
2953 function setImageCompressionQuality(int $quality): bool;
2956 * Sets the image delay
2958 * @param int $delay - delay The amount of time expressed in 'ticks'
2959 * that the image should be displayed for. For animated GIFs there are
2960 * 100 ticks per second, so a value of 20 would be 20/100 of a second
2961 * aka 1/5th of a second.
2966 function setImageDelay(int $delay): bool;
2969 * Sets the image depth
2971 * @param int $depth - depth
2976 function setImageDepth(int $depth): bool;
2979 * Sets the image disposal method
2981 * @param int $dispose - dispose
2986 function setImageDispose(int $dispose): bool;
2989 * Sets the image size
2991 * @param int $columns - columns
2992 * @param int $rows - rows
2997 function setImageExtent(int $columns,
3001 * Sets the filename of a particular image
3003 * @param string $filename - filename
3008 function setImageFilename(string $filename): bool;
3011 * Sets the format of a particular image
3013 * @param string $format - format String presentation of the image
3014 * format. Format support depends on the ImageMagick installation.
3019 function setImageFormat(string $format): bool;
3022 * Sets the image gamma
3024 * @param float $gamma - gamma
3029 function setImageGamma(float $gamma): bool;
3032 * Sets the image gravity
3034 * @param int $gravity - gravity The gravity property. Refer to the
3035 * list of gravity constants.
3040 function setImageGravity(int $gravity): bool;
3043 * Sets the image chromaticity green primary point
3045 * @param float $x - x
3046 * @param float $y - y
3051 function setImageGreenPrimary(float $x,
3055 * Set the iterator position
3057 * @param int $index - index The position to set the iterator to
3062 function setImageIndex(int $index): bool;
3065 * Sets the image compression
3067 * @param int $interlace_scheme - interlace_scheme
3072 function setImageInterlaceScheme(int $interlace_scheme): bool;
3075 * Sets the image interpolate pixel method
3077 * @param int $method - method The method is one of the
3078 * Imagick::INTERPOLATE_* constants
3083 function setImageInterpolateMethod(int $method): bool;
3086 * Sets the image iterations
3088 * @param int $iterations - iterations The number of iterations the
3089 * image should loop over. Set to '0' to loop continuously.
3094 function setImageIterations(int $iterations): bool;
3097 * Sets the image matte channel
3099 * @param bool $matte - matte True activates the matte channel and
3100 * false disables it.
3105 function setImageMatte(bool $matte): bool;
3108 * Sets the image matte color
3110 * @param mixed $matte - matte
3115 function setImageMatteColor(mixed $matte): bool;
3118 * Sets the image opacity level
3120 * @param float $opacity - opacity The level of transparency: 1.0 is
3121 * fully opaque and 0.0 is fully transparent.
3126 function setImageOpacity(float $opacity): bool;
3129 * Sets the image orientation
3131 * @param int $orientation - orientation One of the orientation
3137 function setImageOrientation(int $orientation): bool;
3140 * Sets the page geometry of the image
3142 * @param int $width - width
3143 * @param int $height - height
3150 function setImagePage(int $width,
3156 * Adds a named profile to the Imagick object
3158 * @param string $name - name
3159 * @param string $profile - profile
3164 function setImageProfile(string $name,
3165 string $profile): bool;
3168 * Sets an image property
3170 * @param string $name - name
3171 * @param string $value - value
3176 function setImageProperty(string $name,
3177 string $value): bool;
3180 * Sets the image chromaticity red primary point
3182 * @param float $x - x
3183 * @param float $y - y
3188 function setImageRedPrimary(float $x,
3192 * Sets the image rendering intent
3194 * @param int $rendering_intent - rendering_intent
3199 function setImageRenderingIntent(int $rendering_intent): bool;
3202 * Sets the image resolution
3204 * @param float $x_resolution - x_resolution
3205 * @param float $y_resolution - y_resolution
3210 function setImageResolution(float $x_resolution,
3211 float $y_resolution): bool;
3214 * Sets the image scene
3216 * @param int $scene - scene
3221 function setImageScene(int $scene): bool;
3224 * Sets the image ticks-per-second
3226 * @param int $ticks_per_second - ticks_per_second The duration for
3227 * which an image should be displayed expressed in ticks per second.
3232 function setImageTicksPerSecond(int $ticks_per_second): bool;
3235 * Sets the image type
3237 * @param int $image_type - image_type
3242 function setImageType(int $image_type): bool;
3245 * Sets the image units of resolution
3247 * @param int $units - units
3252 function setImageUnits(int $units): bool;
3255 * Sets the image virtual pixel method
3257 * @param int $method - method
3262 function setImageVirtualPixelMethod(int $method): bool;
3265 * Sets the image chromaticity white point
3267 * @param float $x - x
3268 * @param float $y - y
3273 function setImageWhitePoint(float $x,
3277 * Sets the image compression
3279 * @param int $interlace_scheme - interlace_scheme
3284 function setInterlaceScheme(int $interlace_scheme): bool;
3287 * Set the iterator position
3289 * @param int $index - index The position to set the iterator to
3294 function setIteratorIndex(int $index): bool;
3297 * Sets the Imagick iterator to the last image
3302 function setLastIterator(): bool;
3307 * @param string $key - key
3308 * @param string $value - value
3313 function setOption(string $key,
3314 string $value): bool;
3317 * Sets the page geometry of the Imagick object
3319 * @param int $width - width
3320 * @param int $height - height
3327 function setPage(int $width,
3335 * @param float $point_size - point_size Point size
3340 function setPointSize(float $point_size): bool;
3343 * Sets the image resolution
3345 * @param float $x_resolution - x_resolution The horizontal
3347 * @param float $y_resolution - y_resolution The vertical resolution.
3352 function setResolution(float $x_resolution,
3353 float $y_resolution): bool;
3356 * Sets the limit for a particular resource in megabytes
3358 * @param int $type - type Refer to the list of resourcetype
3360 * @param int $limit - limit The resource limit. The unit depends on
3361 * the type of the resource being limited.
3366 static function setResourceLimit(int $type,
3370 * Sets the image sampling factors
3372 * @param array $factors - factors
3377 function setSamplingFactors(array $factors): bool;
3380 * Sets the size of the Imagick object
3382 * @param int $columns - columns
3383 * @param int $rows - rows
3388 function setSize(int $columns,
3392 * Sets the size and offset of the Imagick object
3394 * @param int $columns - columns The width in pixels.
3395 * @param int $rows - rows The height in pixels.
3396 * @param int $offset - offset The image offset.
3401 function setSizeOffset(int $columns,
3406 * Sets the image type attribute
3408 * @param int $image_type - image_type
3413 function setType(int $image_type): bool;
3416 * Creates a 3D effect
3418 * @param bool $gray - gray A value other than zero shades the
3419 * intensity of each pixel.
3420 * @param float $azimuth - azimuth Defines the light source
3422 * @param float $elevation - elevation Defines the light source
3428 function shadeImage(bool $gray,
3430 float $elevation): bool;
3433 * Simulates an image shadow
3435 * @param float $opacity - opacity
3436 * @param float $sigma - sigma
3443 function shadowImage(float $opacity,
3451 * @param float $radius - radius
3452 * @param float $sigma - sigma
3453 * @param int $channel - channel
3458 function sharpenImage(float $radius,
3460 int $channel = Imagick
::CHANNEL_ALL
): bool;
3463 * Shaves pixels from the image edges
3465 * @param int $columns - columns
3466 * @param int $rows - rows
3471 function shaveImage(int $columns,
3475 * Creating a parallelogram
3477 * @param mixed $background - background The background color
3478 * @param float $x_shear - x_shear The number of degrees to shear on
3480 * @param float $y_shear - y_shear The number of degrees to shear on
3486 function shearImage(mixed $background,
3488 float $y_shear): bool;
3491 * Adjusts the contrast of an image
3493 * @param bool $sharpen - sharpen
3494 * @param float $alpha - alpha
3495 * @param float $beta - beta
3496 * @param int $channel - channel
3501 function sigmoidalContrastImage(bool $sharpen,
3504 int $channel = Imagick
::CHANNEL_ALL
): bool;
3507 * Simulates a pencil sketch
3509 * @param float $radius - radius The radius of the Gaussian, in
3510 * pixels, not counting the center pixel
3511 * @param float $sigma - sigma The standard deviation of the
3512 * Gaussian, in pixels.
3513 * @param float $angle - angle Apply the effect along this angle.
3518 function sketchImage(float $radius,
3520 float $angle): bool;
3523 * Applies a solarizing effect to the image
3525 * @param int $threshold - threshold
3530 function solarizeImage(int $threshold): bool;
3533 * Interpolates colors
3535 * @param int $SPARSE_METHOD - SPARSE_METHOD Refer to this list of
3536 * sparse method constants
3537 * @param array $arguments - arguments An array containing the
3538 * coordinates. The array is in format array(1,1, 2,45)
3539 * @param int $channel - CHANNEL
3544 public function sparseColorImage(int $SPARSE_METHOD,
3546 int $channel = Imagick
::CHANNEL_DEFAULT
): bool;
3549 * Splices a solid color into the image
3551 * @param int $width - width
3552 * @param int $height - height
3559 function spliceImage(int $width,
3565 * Randomly displaces each pixel in a block
3567 * @param float $radius - radius
3572 function spreadImage(float $radius): bool;
3575 * Hides a digital watermark within the image
3577 * @param Imagick $watermark_wand - watermark_wand
3578 * @param int $offset - offset
3583 function steganoImage(Imagick
$watermark_wand,
3584 int $offset): Imagick
;
3587 * Composites two images
3589 * @param Imagick $offset_wand - offset_wand
3594 function stereoImage(Imagick
$offset_wand): Imagick
;
3597 * Strips an image of all profiles and comments
3602 function stripImage(): bool;
3605 * Swirls the pixels about the center of the image
3607 * @param float $degrees - degrees
3612 function swirlImage(float $degrees): bool;
3615 * Repeatedly tiles the texture image
3617 * @param Imagick $texture_wand - texture_wand
3622 function textureImage(Imagick
$texture_wand): Imagick
;
3625 * Changes the value of individual pixels based on a threshold
3627 * @param float $threshold - threshold
3628 * @param int $channel - channel
3633 function thresholdImage(float $threshold,
3634 int $channel = Imagick
::CHANNEL_ALL
): bool;
3637 * Changes the size of an image
3639 * @param int $columns - columns Image width
3640 * @param int $rows - rows Image height
3641 * @param bool $bestfit - bestfit Whether to force maximum values
3642 * @param bool $fill -
3647 function thumbnailImage(int $columns,
3649 bool $bestfit = false,
3650 bool $fill = false): bool;
3653 * Applies a color vector to each pixel in the image
3655 * @param mixed $tint - tint
3656 * @param mixed $opacity - opacity
3661 function tintImage(mixed $tint,
3662 mixed $opacity): bool;
3665 * Convenience method for setting crop size and the image geometry
3667 * @param string $crop - crop A crop geometry string. This geometry
3668 * defines a subregion of the image to crop.
3669 * @param string $geometry - geometry An image geometry string. This
3670 * geometry defines the final size of the image.
3675 function transformImage(string $crop,
3676 string $geometry): Imagick
;
3679 * Paints pixels transparent
3681 * @param mixed $target - target The target color to paint
3682 * @param float $alpha - alpha
3683 * @param float $fuzz - fuzz
3684 * @param bool $invert - invert If TRUE paints any pixel that does
3685 * not match the target color.
3690 function transparentPaintImage(mixed $target,
3693 bool $invert): bool;
3696 * Creates a vertical mirror image
3701 function transposeImage(): bool;
3704 * Creates a horizontal mirror image
3709 function transverseImage(): bool;
3712 * Remove edges from the image
3714 * @param float $fuzz - fuzz By default target must match a
3715 * particular pixel color exactly. However, in many cases two colors
3716 * may differ by a small amount. The fuzz member of image defines how
3717 * much tolerance is acceptable to consider two colors as the same.
3718 * This parameter represents the variation on the quantum range.
3723 function trimImage(float $fuzz): bool;
3726 * Discards all but one of any pixel color
3731 function uniqueImageColors(): bool;
3736 * @param float $radius - radius
3737 * @param float $sigma - sigma
3738 * @param float $amount - amount
3739 * @param float $threshold - threshold
3740 * @param int $channel - channel
3745 function unsharpMaskImage(float $radius,
3749 int $channel = Imagick
::CHANNEL_ALL
): bool;
3752 * Checks if the current item is valid
3757 function valid(): bool;
3760 * Adds vignette filter to the image
3762 * @param float $blackPoint - blackPoint The black point.
3763 * @param float $whitePoint - whitePoint The white point
3764 * @param int $x - x X offset of the ellipse
3765 * @param int $y - y Y offset of the ellipse
3770 function vignetteImage(float $blackPoint,
3776 * Applies wave filter to the image
3778 * @param float $amplitude - amplitude The amplitude of the wave.
3779 * @param float $length - length The length of the wave.
3784 function waveImage(float $amplitude,
3785 float $length): bool;
3788 * Force all pixels above the threshold into white
3790 * @param mixed $threshold - threshold
3795 function whiteThresholdImage(mixed $threshold): bool;
3798 * Writes an image to the specified filename
3800 * @param string $filename - filename Filename where to write the
3801 * image. The extension of the filename defines the type of the file.
3802 * Format can be forced regardless of file extension using format:
3803 * prefix, for example "jpg:test.png".
3808 function writeImage(string $filename = ''): bool;
3811 * Writes an image to a filehandle
3813 * @param resource $filehandle - filehandle Filehandle where to write
3819 function writeImageFile(resource $filehandle,
3820 string $format = ''): bool;
3823 * Writes an image or image sequence
3825 * @param string $filename - filename
3826 * @param bool $adjoin - adjoin
3831 function writeImages(string $filename,
3832 bool $adjoin): bool;
3835 * Writes frames to a filehandle
3837 * @param resource $filehandle - filehandle Filehandle where to write
3843 function writeImagesFile(resource $filehandle,
3844 string $format = ''): bool;
3849 private ?
resource $wand = null;
3852 * Adjusts the current affine transformation matrix
3854 * @param array $affine - Affine matrix parameters
3859 function affine(array $affine): bool;
3862 * Draws text on the image
3864 * @param float $x - The x coordinate where text is drawn
3865 * @param float $y - The y coordinate where text is drawn
3866 * @param string $text - The text to draw on the image
3871 function annotation(float $x,
3873 string $text): bool;
3878 * @param float $sx - Starting x ordinate of bounding rectangle
3879 * @param float $sy - starting y ordinate of bounding rectangle
3880 * @param float $ex - ending x ordinate of bounding rectangle
3881 * @param float $ey - ending y ordinate of bounding rectangle
3882 * @param float $sd - starting degrees of rotation
3883 * @param float $ed - ending degrees of rotation
3888 function arc(float $sx,
3896 * Draws a bezier curve
3898 * @param array $coordinates - Multidimensional array like array(
3899 * array( 'x' => 1, 'y' => 2 ), array( 'x' => 3, 'y' => 4 ) )
3904 function bezier(array $coordinates): bool;
3909 * @param float $ox - origin x coordinate
3910 * @param float $oy - origin y coordinate
3911 * @param float $px - perimeter x coordinate
3912 * @param float $py - perimeter y coordinate
3917 function circle(float $ox,
3923 * Clears the ImagickDraw
3925 * @return bool - Returns an ImagickDraw object.
3928 function clear(): bool;
3931 * Makes an exact copy of the specified ImagickDraw object
3933 * @return ImagickDraw - What the function returns, first on success,
3934 * then on failure. See also the return.success; entity
3937 function __clone(): void
;
3940 * Draws color on image
3942 * @param float $x - x coordinate of the paint
3943 * @param float $y - y coordinate of the paint
3944 * @param int $paintMethod - one of the PAINT_ constants
3949 function color(float $x,
3951 int $paintMethod): bool;
3956 * @param string $comment - The comment string to add to vector output
3962 function comment(string $comment): bool;
3965 * Composites an image onto the current image
3967 * @param int $compose - composition operator. One of COMPOSITE_
3969 * @param float $x - x coordinate of the top left corner
3970 * @param float $y - y coordinate of the top left corner
3971 * @param float $width - width of the composition image
3972 * @param float $height - height of the composition image
3973 * @param Imagick $compositeWand - the Imagick object where composition
3974 * image is taken from
3979 function composite(int $compose,
3984 Imagick
$compositeWand): bool;
3987 * The ImagickDraw constructor
3992 function __construct(): void
;
3995 * Frees all associated resources
4000 function destroy(): bool;
4003 * Draws an ellipse on the image
4005 * @param float $ox -
4006 * @param float $oy -
4007 * @param float $rx -
4008 * @param float $ry -
4009 * @param float $start -
4010 * @param float $end -
4015 function ellipse(float $ox,
4023 * Obtains the current clipping path ID
4025 * @return string - Returns a string containing the clip path ID or
4026 * false if no clip path exists.
4029 function getClipPath(): string;
4032 * Returns the current polygon fill rule
4034 * @return int - Returns one of the FILLRULE_ constants.
4037 function getClipRule(): int;
4040 * Returns the interpretation of clip path units
4042 * @return int - Returns an int on success.
4045 function getClipUnits(): int;
4048 * Returns the fill color
4050 * @return ImagickPixel - Returns an ImagickPixel object.
4053 function getFillColor(): ImagickPixel
;
4056 * Returns the opacity used when drawing
4058 * @return float - The opacity.
4061 function getFillOpacity(): float;
4064 * Returns the fill rule
4066 * @return int - Returns a FILLRULE_ constant
4069 function getFillRule(): int;
4074 * @return string - Returns a string on success and false if no font is
4078 function getFont(): string;
4081 * Returns the font family
4083 * @return string - Returns the font family currently selected or false
4084 * if font family is not set.
4087 function getFontFamily(): string;
4090 * Returns the font pointsize
4092 * @return float - Returns the font size associated with the current
4093 * ImagickDraw object.
4096 function getFontSize(): float;
4099 * Returns the font stretch
4101 * @return int - Returns the font stretch constant (STRETCH_) associated
4102 * with the ImagickDraw object or 0 if no stretch is set.
4105 function getFontStretch(): int;
4108 * Returns the font style
4110 * @return int - Returns the font style constant (STYLE_) associated
4111 * with the ImagickDraw object or 0 if no style is set.
4114 function getFontStyle(): int;
4117 * Returns the font weight
4119 * @return int - Returns an int on success and 0 if no weight is set.
4122 function getFontWeight(): int;
4125 * Returns the text placement gravity
4127 * @return int - Returns a GRAVITY_ constant on success and 0 if no
4131 function getGravity(): int;
4134 * Returns the current stroke antialias setting
4136 * @return bool - Returns TRUE if antialiasing is on and false if it is
4140 function getStrokeAntialias(): bool;
4143 * Returns the color used for stroking object outlines
4145 * @return ImagickPixel - Returns an ImagickPixel object which
4146 * describes the color.
4149 function getStrokeColor(): ImagickPixel
;
4152 * Returns an array representing the pattern of dashes and gaps used to
4155 * @return array - Returns an array on success and empty array if not
4159 function getStrokeDashArray(): array;
4162 * Returns the offset into the dash pattern to start the dash
4164 * @return float - Returns a float representing the offset and 0 if
4168 function getStrokeDashOffset(): float;
4171 * Returns the shape to be used at the end of open subpaths when they are
4174 * @return int - Returns one of the LINECAP_ constants or 0 if stroke
4175 * linecap is not set.
4178 function getStrokeLineCap(): int;
4181 * Returns the shape to be used at the corners of paths when they are
4184 * @return int - Returns one of the LINEJOIN_ constants or 0 if stroke
4185 * line join is not set.
4188 function getStrokeLineJoin(): int;
4191 * Returns the stroke miter limit
4193 * @return int - Returns an int describing the miter limit and 0 if no
4194 * miter limit is set.
4197 function getStrokeMiterLimit(): int;
4200 * Returns the opacity of stroked object outlines
4202 * @return float - Returns a double describing the opacity.
4205 function getStrokeOpacity(): float;
4208 * Returns the width of the stroke used to draw object outlines
4210 * @return float - Returns a double describing the stroke width.
4213 function getStrokeWidth(): float;
4216 * Returns the text alignment
4218 * @return int - Returns one of the ALIGN_ constants and 0 if no align
4222 function getTextAlignment(): int;
4225 * Returns the current text antialias setting
4227 * @return bool - Returns TRUE if text is antialiased and false if not.
4230 function getTextAntialias(): bool;
4233 * Returns the text decoration
4235 * @return int - Returns one of the DECORATION_ constants and 0 if no
4236 * decoration is set.
4239 function getTextDecoration(): int;
4242 * Returns the code set used for text annotations
4244 * @return string - Returns a string specifying the code set or false
4245 * if text encoding is not set.
4248 function getTextEncoding(): string;
4251 * Returns the text under color
4253 * @return ImagickPixel - Returns an ImagickPixel object describing the
4257 function getTextUnderColor(): ImagickPixel
;
4260 * Returns a string containing vector graphics
4262 * @return string - Returns a string containing the vector graphics.
4265 function getVectorGraphics(): string;
4270 * @param float $sx - starting x coordinate
4271 * @param float $sy - starting y coordinate
4272 * @param float $ex - ending x coordinate
4273 * @param float $ey - ending y coordinate
4278 function line(float $sx,
4284 * Paints on the image's opacity channel
4286 * @param float $x - x coordinate of the matte
4287 * @param float $y - y coordinate of the matte
4288 * @param int $paintMethod - PAINT_ constant
4293 function matte(float $x,
4295 int $paintMethod): bool;
4298 * Adds a path element to the current path
4303 function pathClose(): bool;
4306 * Draws a cubic Bezier curve
4308 * @param float $x1 - x coordinate of the first control point
4309 * @param float $y1 - y coordinate of the first control point
4310 * @param float $x2 - x coordinate of the second control point
4311 * @param float $y2 - y coordinate of the first control point
4312 * @param float $x - x coordinate of the curve end
4313 * @param float $y - y coordinate of the curve end
4318 function pathCurveToAbsolute(float $x1,
4326 * Draws a quadratic Bezier curve
4328 * @param float $x1 - x coordinate of the control point
4329 * @param float $y1 - y coordinate of the control point
4330 * @param float $x - x coordinate of the end point
4331 * @param float $y - y coordinate of the end point
4336 function pathCurveToQuadraticBezierAbsolute(float $x1,
4342 * Draws a quadratic Bezier curve
4344 * @param float $x1 - starting x coordinate
4345 * @param float $y1 - starting y coordinate
4346 * @param float $x - ending x coordinate
4347 * @param float $y - ending y coordinate
4352 function pathCurveToQuadraticBezierRelative(float $x1,
4358 * Draws a quadratic Bezier curve
4360 * @param float $x - ending x coordinate
4361 * @param float $y - ending y coordinate
4366 function pathCurveToQuadraticBezierSmoothAbsolute(float $x,
4370 * Draws a quadratic Bezier curve
4372 * @param float $x - ending x coordinate
4373 * @param float $y - ending y coordinate
4378 function pathCurveToQuadraticBezierSmoothRelative(float $x,
4382 * Draws a cubic Bezier curve
4384 * @param float $x1 - x coordinate of starting control point
4385 * @param float $y1 - y coordinate of starting control point
4386 * @param float $x2 - x coordinate of ending control point
4387 * @param float $y2 - y coordinate of ending control point
4388 * @param float $x - ending x coordinate
4389 * @param float $y - ending y coordinate
4394 function pathCurveToRelative(float $x1,
4402 * Draws a cubic Bezier curve
4404 * @param float $x2 - x coordinate of the second control point
4405 * @param float $y2 - y coordinate of the second control point
4406 * @param float $x - x coordinate of the ending point
4407 * @param float $y - y coordinate of the ending point
4412 function pathCurveToSmoothAbsolute(float $x2,
4418 * Draws a cubic Bezier curve
4420 * @param float $x2 - x coordinate of the second control point
4421 * @param float $y2 - y coordinate of the second control point
4422 * @param float $x - x coordinate of the ending point
4423 * @param float $y - y coordinate of the ending point
4428 function pathCurveToSmoothRelative(float $x2,
4434 * Draws an elliptical arc
4436 * @param float $rx - x radius
4437 * @param float $ry - y radius
4438 * @param float $x_axis_rotation - x axis rotation
4439 * @param bool $large_arc_flag - large arc flag
4440 * @param bool $sweep_flag - sweep flag
4441 * @param float $x - x coordinate
4442 * @param float $y - y coordinate
4447 function pathEllipticArcAbsolute(float $rx,
4449 float $x_axis_rotation,
4450 bool $large_arc_flag,
4456 * Draws an elliptical arc
4458 * @param float $rx - x radius
4459 * @param float $ry - y radius
4460 * @param float $x_axis_rotation - x axis rotation
4461 * @param bool $large_arc_flag - large arc flag
4462 * @param bool $sweep_flag - sweep flag
4463 * @param float $x - x coordinate
4464 * @param float $y - y coordinate
4469 function pathEllipticArcRelative(float $rx,
4471 float $x_axis_rotation,
4472 bool $large_arc_flag,
4478 * Terminates the current path
4483 function pathFinish(): bool;
4488 * @param float $x - starting x coordinate
4489 * @param float $y - ending x coordinate
4494 function pathLineToAbsolute(float $x,
4498 * Draws a horizontal line path
4500 * @param float $x - x coordinate
4505 function pathLineToHorizontalAbsolute(float $x): bool;
4508 * Draws a horizontal line
4510 * @param float $x - x coordinate
4515 function pathLineToHorizontalRelative(float $x): bool;
4520 * @param float $x - starting x coordinate
4521 * @param float $y - starting y coordinate
4526 function pathLineToRelative(float $x,
4530 * Draws a vertical line
4532 * @param float $y - y coordinate
4537 function pathLineToVerticalAbsolute(float $y): bool;
4540 * Draws a vertical line path
4542 * @param float $y - y coordinate
4547 function pathLineToVerticalRelative(float $y): bool;
4550 * Starts a new sub-path
4552 * @param float $x - x coordinate of the starting point
4553 * @param float $y - y coordinate of the starting point
4558 function pathMoveToAbsolute(float $x,
4562 * Starts a new sub-path
4564 * @param float $x - target x coordinate
4565 * @param float $y - target y coordinate
4570 function pathMoveToRelative(float $x,
4574 * Declares the start of a path drawing list
4579 function pathStart(): bool;
4584 * @param float $x - point's x coordinate
4585 * @param float $y - point's y coordinate
4590 function point(float $x,
4596 * @param array $coordinates - multidimensional array like array(
4597 * array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) );
4602 function polygon(array $coordinates): bool;
4607 * @param array $coordinates - array of x and y coordinates: array(
4608 * array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) )
4613 function polyline(array $coordinates): bool;
4616 * Destroys the current ImagickDraw in the stack, and returns to the
4617 * previously pushed ImagickDraw
4619 * @return bool - Returns TRUE on success and false on failure.
4622 function pop(): bool;
4625 * Terminates a clip path definition
4630 function popClipPath(): bool;
4633 * Terminates a definition list
4638 function popDefs(): bool;
4641 * Terminates a pattern definition
4646 function popPattern(): bool;
4649 * Clones the current ImagickDraw and pushes it to the stack
4654 function push(): bool;
4657 * Starts a clip path definition
4659 * @param string $clip_mask_id - Clip mask Id
4664 function pushClipPath(string $clip_mask_id): bool;
4667 * Indicates that following commands create named elements for early
4673 function pushDefs(): bool;
4676 * Indicates that subsequent commands up to a ImagickDraw::opPattern()
4677 * command comprise the definition of a named pattern
4679 * @param string $pattern_id - the pattern Id
4680 * @param float $x - x coordinate of the top-left corner
4681 * @param float $y - y coordinate of the top-left corner
4682 * @param float $width - width of the pattern
4683 * @param float $height - height of the pattern
4688 function pushPattern(string $pattern_id,
4692 float $height): bool;
4697 * @param float $x1 - x coordinate of the top left corner
4698 * @param float $y1 - y coordinate of the top left corner
4699 * @param float $x2 - x coordinate of the bottom right corner
4700 * @param float $y2 - y coordinate of the bottom right corner
4705 function rectangle(float $x1,
4711 * Renders all preceding drawing commands onto the image
4716 function render(): bool;
4719 * Applies the specified rotation to the current coordinate space
4721 * @param float $degrees - degrees to rotate
4726 function rotate(float $degrees): bool;
4729 * Draws a rounded rectangle
4731 * @param float $x1 - x coordinate of the top left corner
4732 * @param float $y1 - y coordinate of the top left corner
4733 * @param float $x2 - x coordinate of the bottom right
4734 * @param float $y2 - y coordinate of the bottom right
4735 * @param float $rx - x rounding
4736 * @param float $ry - y rounding
4741 function roundRectangle(float $x1,
4749 * Adjusts the scaling factor
4751 * @param float $x - horizontal factor
4752 * @param float $y - vertical factor
4757 function scale(float $x,
4761 * Associates a named clipping path with the image
4763 * @param string $clip_mask - the clipping path name
4768 function setClipPath(string $clip_mask): bool;
4771 * Set the polygon fill rule to be used by the clipping path
4773 * @param int $fill_rule - FILLRULE_ constant
4778 function setClipRule(int $fill_rule): bool;
4781 * Sets the interpretation of clip path units
4783 * @param int $clip_units - the number of clip units
4788 function setClipUnits(int $clip_units): bool;
4791 * Sets the opacity to use when drawing using the fill color or fill texture
4793 * @param float $opacity - fill alpha
4798 function setFillAlpha(float $opacity): bool;
4801 * Sets the fill color to be used for drawing filled objects
4803 * @param ImagickPixel $fill_pixel - ImagickPixel to use to set the
4809 function setFillColor(mixed $fill_pixel): bool;
4812 * Sets the opacity to use when drawing using the fill color or fill texture
4814 * @param float $fillOpacity - the fill opacity
4819 function setFillOpacity(float $fillOpacity): bool;
4822 * Sets the URL to use as a fill pattern for filling objects
4824 * @param string $fill_url - URL to use to obtain fill pattern.
4829 function setFillPatternURL(string $fill_url): bool;
4832 * Sets the fill rule to use while drawing polygons
4834 * @param int $fill_rule - FILLRULE_ constant
4839 function setFillRule(int $fill_rule): bool;
4842 * Sets the fully-specified font to use when annotating with text
4844 * @param string $font_name -
4849 function setFont(string $font_name): bool;
4852 * Sets the font family to use when annotating with text
4854 * @param string $font_family - the font family
4859 function setFontFamily(string $font_family): bool;
4862 * Sets the font pointsize to use when annotating with text
4864 * @param float $pointsize - the point size
4869 function setFontSize(float $pointsize): bool;
4872 * Sets the font stretch to use when annotating with text
4874 * @param int $fontStretch - STRETCH_ constant
4879 function setFontStretch(int $fontStretch): bool;
4882 * Sets the font style to use when annotating with text
4884 * @param int $style - STYLETYPE_ constant
4889 function setFontStyle(int $style): bool;
4892 * Sets the font weight
4894 * @param int $font_weight -
4899 function setFontWeight(int $font_weight): bool;
4902 * Sets the text placement gravity
4904 * @param int $gravity - GRAVITY_ constant
4909 function setGravity(int $gravity): bool;
4912 function setResolution(float $x,
4916 * Specifies the opacity of stroked object outlines
4918 * @param float $opacity - opacity
4923 function setStrokeAlpha(float $opacity): bool;
4926 * Controls whether stroked outlines are antialiased
4928 * @param bool $stroke_antialias - the antialias setting
4933 function setStrokeAntialias(bool $stroke_antialias): bool;
4936 * Sets the color used for stroking object outlines
4938 * @param ImagickPixel $stroke_pixel - the stroke color
4943 function setStrokeColor(mixed $stroke_pixel): bool;
4946 * Specifies the pattern of dashes and gaps used to stroke paths
4948 * @param array $dashArray - array of floats
4953 function setStrokeDashArray(array $dashArray): bool;
4956 * Specifies the offset into the dash pattern to start the dash
4958 * @param float $dash_offset - dash offset
4963 function setStrokeDashOffset(float $dash_offset): bool;
4966 * Specifies the shape to be used at the end of open subpaths when they are
4969 * @param int $linecap - LINECAP_ constant
4974 function setStrokeLineCap(int $linecap): bool;
4977 * Specifies the shape to be used at the corners of paths when they are
4980 * @param int $linejoin - LINEJOIN_ constant
4985 function setStrokeLineJoin(int $linejoin): bool;
4988 * Specifies the miter limit
4990 * @param int $miterlimit - the miter limit
4995 function setStrokeMiterLimit(int $miterlimit): bool;
4998 * Specifies the opacity of stroked object outlines
5000 * @param float $stroke_opacity - stroke opacity. 1.0 is fully opaque
5005 function setStrokeOpacity(float $stroke_opacity): bool;
5008 * Sets the pattern used for stroking object outlines
5010 * @param string $stroke_url - stroke URL
5012 * @return bool - Imagick.ImagickDraw.return.success;
5015 function setStrokePatternURL(string $stroke_url): bool;
5018 * Sets the width of the stroke used to draw object outlines
5020 * @param float $stroke_width - stroke width
5025 function setStrokeWidth(float $stroke_width): bool;
5028 * Specifies a text alignment
5030 * @param int $alignment - ALIGN_ constant
5035 function setTextAlignment(int $alignment): bool;
5038 * Controls whether text is antialiased
5040 * @param bool $antiAlias -
5045 function setTextAntialias(bool $antiAlias): bool;
5048 * Specifies a decoration
5050 * @param int $decoration - DECORATION_ constant
5055 function setTextDecoration(int $decoration): bool;
5058 * Specifies specifies the text code set
5060 * @param string $encoding - the encoding name
5065 function setTextEncoding(string $encoding): bool;
5068 * Specifies the color of a background rectangle
5070 * @param ImagickPixel $under_color - the under color
5075 function setTextUnderColor(mixed $under_color): bool;
5078 * Sets the vector graphics
5080 * @param string $xml - xml containing the vector graphics
5085 function setVectorGraphics(string $xml): bool;
5088 * Sets the overall canvas size
5090 * @param int $x1 - left x coordinate
5091 * @param int $y1 - left y coordinate
5092 * @param int $x2 - right x coordinate
5093 * @param int $y2 - right y coordinate
5098 function setViewbox(int $x1,
5104 * Skews the current coordinate system in the horizontal direction
5106 * @param float $degrees - degrees to skew
5111 function skewX(float $degrees): bool;
5114 * Skews the current coordinate system in the vertical direction
5116 * @param float $degrees - degrees to skew
5121 function skewY(float $degrees): bool;
5124 * Applies a translation to the current coordinate system
5126 * @param float $x - horizontal translation
5127 * @param float $y - vertical translation
5132 function translate(float $x,
5137 class ImagickPixel
{
5138 private ?
resource $wand = null;
5141 * Clears resources associated with this object
5146 function clear(): bool;
5149 * The ImagickPixel constructor
5151 * @param string $color - The optional color string to use as the
5152 * initial value of this object.
5154 * @return - Returns an ImagickPixel object on success, throwing
5155 * ImagickPixelException on failure.
5158 function __construct(string $color = ''): void
;
5161 * Deallocates resources associated with this object
5166 function destroy(): bool;
5171 * @param bool $normalized - Normalize the color values
5173 * @return array - An array of channel values, each normalized if TRUE
5174 * is given as param. Throws ImagickPixelException on error.
5177 function getColor(bool $normalized = false): array;
5180 * Returns the color as a string
5182 * @return string - Returns the color of the ImagickPixel object as a
5186 function getColorAsString(): string;
5189 * Returns the color count associated with this color
5191 * @return int - Returns the color count as an integer on success,
5192 * throws ImagickPixelException on failure.
5195 function getColorCount(): int;
5198 * Gets the normalized value of the provided color channel
5200 * @param int $color - The color to get the value of, specified as one
5201 * of the Imagick color constants. This can be one of the RGB colors,
5202 * CMYK colors, alpha and opacity e.g (Imagick::COLOR_BLUE,
5203 * Imagick::COLOR_MAGENTA).
5205 * @return float - The value of the channel, as a normalized
5206 * floating-point number, throwing ImagickPixelException on error.
5209 function getColorValue(int $color): float;
5212 * Returns the normalized HSL color of the ImagickPixel object
5214 * @return array - Returns the HSL value in an array with the keys
5215 * "hue", "saturation", and "luminosity". Throws ImagickPixelException
5219 function getHSL(): array;
5222 * Check the distance between this color and another
5224 * @param ImagickPixel $color - The ImagickPixel object to compare this
5226 * @param float $fuzz - The maximum distance within which to consider
5227 * these colors as similar. The theoretical maximum for this value is
5228 * the square root of three (1.732).
5233 function isPixelSimilar(mixed $color,
5237 * Check the distance between this color and another
5239 * @param ImagickPixel $color - The ImagickPixel object to compare this
5241 * @param float $fuzz - The maximum distance within which to consider
5242 * these colors as similar. The theoretical maximum for this value is
5243 * the square root of three (1.732).
5248 function isSimilar(mixed $color,
5254 * @param string $color - The color definition to use in order to
5255 * initialise the ImagickPixel object.
5257 * @return bool - Returns TRUE if the specified color was set, FALSE
5261 function setColor(string $color): bool;
5264 * Sets the normalized value of one of the channels
5266 * @param int $color - One of the Imagick color constants e.g.
5267 * \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA.
5268 * @param float $value - The value to set this channel to, ranging from
5274 function setColorValue(int $color,
5275 float $value): bool;
5278 * Sets the normalized HSL color
5280 * @param float $hue - The normalized value for hue, described as a
5281 * fractional arc (between 0 and 1) of the hue circle, where the zero
5283 * @param float $saturation - The normalized value for saturation, with
5284 * 1 as full saturation.
5285 * @param float $luminosity - The normalized value for luminosity, on a
5286 * scale from black at 0 to white at 1, with the full HS value at 0.5
5292 function setHSL(float $hue,
5294 float $luminosity): bool;
5298 class ImagickPixelIterator
implements Iterator
{
5299 private ?
resource $wand = null;
5302 static function getPixelIterator(Imagick
$wand): ImagickPixelIterator
;
5305 static function getPixelRegionIterator(Imagick
$wand,
5309 int $rows): ImagickPixelIterator
;
5312 function current(): array;
5315 function key(): int;
5318 function next(): void
;
5321 function rewind(): void
;
5324 function valid(): bool;
5327 * Clear resources associated with a PixelIterator
5332 function clear(): bool;
5335 * The ImagickPixelIterator constructor
5337 * @param Imagick $wand -
5342 function __construct(Imagick
$wand): void
;
5345 * Deallocates resources associated with a PixelIterator
5350 function destroy(): bool;
5353 * Returns the current row of ImagickPixel objects
5355 * @return array - Returns a row as an array of ImagickPixel objects
5356 * that can themselves be iterated.
5359 function getCurrentIteratorRow(): array;
5362 * Returns the current pixel iterator row
5364 * @return int - Returns the integer offset of the row, throwing
5365 * ImagickPixelIteratorException on error.
5368 function getIteratorRow(): int;
5371 * Returns the next row of the pixel iterator
5373 * @return array - Returns the next row as an array of ImagickPixel
5374 * objects, throwing ImagickPixelIteratorException on error.
5377 function getNextIteratorRow(): array;
5380 * Returns the previous row
5382 * @return array - Returns the previous row as an array of
5383 * ImagickPixelWand objects from the ImagickPixelIterator, throwing
5384 * ImagickPixelIteratorException on error.
5387 function getPreviousIteratorRow(): array;
5390 * Returns a new pixel iterator
5392 * @param Imagick $wand -
5394 * @return bool - Throwing ImagickPixelIteratorException.
5397 function newPixelIterator(Imagick
$wand): bool;
5400 * Returns a new pixel iterator
5402 * @param Imagick $wand -
5405 * @param int $columns -
5406 * @param int $rows -
5408 * @return bool - Returns a new ImagickPixelIterator on success; on
5409 * failure, throws ImagickPixelIteratorException.
5412 function newPixelRegionIterator(Imagick
$wand,
5419 * Resets the pixel iterator
5424 function resetIterator(): bool;
5427 * Sets the pixel iterator to the first pixel row
5432 function setIteratorFirstRow(): bool;
5435 * Sets the pixel iterator to the last pixel row
5440 function setIteratorLastRow(): bool;
5443 * Set the pixel iterator row
5450 function setIteratorRow(int $row): bool;
5453 * Syncs the pixel iterator
5458 function syncIterator(): bool;