Skip to content

Imagick

See Also:

  • https://php.net/manual/en/class.imagick.php -

Constants

Constant Visibility Type Value
COLOR_BLACK public 11
COLOR_BLUE public 12
COLOR_CYAN public 13
COLOR_GREEN public 14
COLOR_RED public 15
COLOR_YELLOW public 16
COLOR_MAGENTA public 17
COLOR_OPACITY public 18
COLOR_ALPHA public 19
COLOR_FUZZ public 20
IMAGICK_EXTNUM public 30403
IMAGICK_EXTVER public "3.4.3"
QUANTUM_RANGE public 65535
USE_ZEND_MM public 0
COMPOSITE_DEFAULT public 40
COMPOSITE_UNDEFINED public 0
COMPOSITE_NO public 1
COMPOSITE_ADD public 2
COMPOSITE_ATOP public 3
COMPOSITE_BLEND public 4
COMPOSITE_BUMPMAP public 5
COMPOSITE_CLEAR public 7
COMPOSITE_COLORBURN public 8
COMPOSITE_COLORDODGE public 9
COMPOSITE_COLORIZE public 10
COMPOSITE_COPYBLACK public 11
COMPOSITE_COPYBLUE public 12
COMPOSITE_COPY public 13
COMPOSITE_COPYCYAN public 14
COMPOSITE_COPYGREEN public 15
COMPOSITE_COPYMAGENTA public 16
COMPOSITE_COPYOPACITY public 17
COMPOSITE_COPYRED public 18
COMPOSITE_COPYYELLOW public 19
COMPOSITE_DARKEN public 20
COMPOSITE_DSTATOP public 21
COMPOSITE_DST public 22
COMPOSITE_DSTIN public 23
COMPOSITE_DSTOUT public 24
COMPOSITE_DSTOVER public 25
COMPOSITE_DIFFERENCE public 26
COMPOSITE_DISPLACE public 27
COMPOSITE_DISSOLVE public 28
COMPOSITE_EXCLUSION public 29
COMPOSITE_HARDLIGHT public 30
COMPOSITE_HUE public 31
COMPOSITE_IN public 32
COMPOSITE_LIGHTEN public 33
COMPOSITE_LUMINIZE public 35
COMPOSITE_MINUS public 36
COMPOSITE_MODULATE public 37
COMPOSITE_MULTIPLY public 38
COMPOSITE_OUT public 39
COMPOSITE_OVER public 40
COMPOSITE_OVERLAY public 41
COMPOSITE_PLUS public 42
COMPOSITE_REPLACE public 43
COMPOSITE_SATURATE public 44
COMPOSITE_SCREEN public 45
COMPOSITE_SOFTLIGHT public 46
COMPOSITE_SRCATOP public 47
COMPOSITE_SRC public 48
COMPOSITE_SRCIN public 49
COMPOSITE_SRCOUT public 50
COMPOSITE_SRCOVER public 51
COMPOSITE_SUBTRACT public 52
COMPOSITE_THRESHOLD public 53
COMPOSITE_XOR public 54
COMPOSITE_CHANGEMASK public 6
COMPOSITE_LINEARLIGHT public 34
COMPOSITE_DIVIDE public 55
COMPOSITE_DISTORT public 56
COMPOSITE_BLUR public 57
COMPOSITE_PEGTOPLIGHT public 58
COMPOSITE_VIVIDLIGHT public 59
COMPOSITE_PINLIGHT public 60
COMPOSITE_LINEARDODGE public 61
COMPOSITE_LINEARBURN public 62
COMPOSITE_MATHEMATICS public 63
COMPOSITE_MODULUSADD public 2
COMPOSITE_MODULUSSUBTRACT public 52
COMPOSITE_MINUSDST public 36
COMPOSITE_DIVIDEDST public 55
COMPOSITE_DIVIDESRC public 64
COMPOSITE_MINUSSRC public 65
COMPOSITE_DARKENINTENSITY public 66
COMPOSITE_LIGHTENINTENSITY public 67
MONTAGEMODE_FRAME public 1
MONTAGEMODE_UNFRAME public 2
MONTAGEMODE_CONCATENATE public 3
STYLE_NORMAL public 1
STYLE_ITALIC public 2
STYLE_OBLIQUE public 3
STYLE_ANY public 4
FILTER_UNDEFINED public 0
FILTER_POINT public 1
FILTER_BOX public 2
FILTER_TRIANGLE public 3
FILTER_HERMITE public 4
FILTER_HANNING public 5
FILTER_HAMMING public 6
FILTER_BLACKMAN public 7
FILTER_GAUSSIAN public 8
FILTER_QUADRATIC public 9
FILTER_CUBIC public 10
FILTER_CATROM public 11
FILTER_MITCHELL public 12
FILTER_LANCZOS public 22
FILTER_BESSEL public 13
FILTER_SINC public 14
FILTER_KAISER public 16
FILTER_WELSH public 17
FILTER_PARZEN public 18
FILTER_LAGRANGE public 21
FILTER_SENTINEL public 31
FILTER_BOHMAN public 19
FILTER_BARTLETT public 20
FILTER_JINC public 13
FILTER_SINCFAST public 15
FILTER_ROBIDOUX public 26
FILTER_LANCZOSSHARP public 23
FILTER_LANCZOS2 public 24
FILTER_LANCZOS2SHARP public 25
FILTER_ROBIDOUXSHARP public 27
FILTER_COSINE public 28
FILTER_SPLINE public 29
FILTER_LANCZOSRADIUS public 30
IMGTYPE_UNDEFINED public 0
IMGTYPE_BILEVEL public 1
IMGTYPE_GRAYSCALE public 2
IMGTYPE_GRAYSCALEMATTE public 3
IMGTYPE_PALETTE public 4
IMGTYPE_PALETTEMATTE public 5
IMGTYPE_TRUECOLOR public 6
IMGTYPE_TRUECOLORMATTE public 7
IMGTYPE_COLORSEPARATION public 8
IMGTYPE_COLORSEPARATIONMATTE public 9
IMGTYPE_OPTIMIZE public 10
IMGTYPE_PALETTEBILEVELMATTE public 11
RESOLUTION_UNDEFINED public 0
RESOLUTION_PIXELSPERINCH public 1
RESOLUTION_PIXELSPERCENTIMETER public 2
COMPRESSION_UNDEFINED public 0
COMPRESSION_NO public 1
COMPRESSION_BZIP public 2
COMPRESSION_FAX public 6
COMPRESSION_GROUP4 public 7
COMPRESSION_JPEG public 8
COMPRESSION_JPEG2000 public 9
COMPRESSION_LOSSLESSJPEG public 10
COMPRESSION_LZW public 11
COMPRESSION_RLE public 12
COMPRESSION_ZIP public 13
COMPRESSION_DXT1 public 3
COMPRESSION_DXT3 public 4
COMPRESSION_DXT5 public 5
COMPRESSION_ZIPS public 14
COMPRESSION_PIZ public 15
COMPRESSION_PXR24 public 16
COMPRESSION_B44 public 17
COMPRESSION_B44A public 18
COMPRESSION_LZMA public 19
COMPRESSION_JBIG1 public 20
COMPRESSION_JBIG2 public 21
PAINT_POINT public 1
PAINT_REPLACE public 2
PAINT_FLOODFILL public 3
PAINT_FILLTOBORDER public 4
PAINT_RESET public 5
GRAVITY_NORTHWEST public 1
GRAVITY_NORTH public 2
GRAVITY_NORTHEAST public 3
GRAVITY_WEST public 4
GRAVITY_CENTER public 5
GRAVITY_EAST public 6
GRAVITY_SOUTHWEST public 7
GRAVITY_SOUTH public 8
GRAVITY_SOUTHEAST public 9
GRAVITY_FORGET public 0
GRAVITY_STATIC public 10
STRETCH_NORMAL public 1
STRETCH_ULTRACONDENSED public 2
STRETCH_EXTRACONDENSED public 3
STRETCH_CONDENSED public 4
STRETCH_SEMICONDENSED public 5
STRETCH_SEMIEXPANDED public 6
STRETCH_EXPANDED public 7
STRETCH_EXTRAEXPANDED public 8
STRETCH_ULTRAEXPANDED public 9
STRETCH_ANY public 10
ALIGN_UNDEFINED public 0
ALIGN_LEFT public 1
ALIGN_CENTER public 2
ALIGN_RIGHT public 3
DECORATION_NO public 1
DECORATION_UNDERLINE public 2
DECORATION_OVERLINE public 3
DECORATION_LINETROUGH public 4
DECORATION_LINETHROUGH public 4
NOISE_UNIFORM public 1
NOISE_GAUSSIAN public 2
NOISE_MULTIPLICATIVEGAUSSIAN public 3
NOISE_IMPULSE public 4
NOISE_LAPLACIAN public 5
NOISE_POISSON public 6
NOISE_RANDOM public 7
CHANNEL_UNDEFINED public 0
CHANNEL_RED public 1
CHANNEL_GRAY public 1
CHANNEL_CYAN public 1
CHANNEL_GREEN public 2
CHANNEL_MAGENTA public 2
CHANNEL_BLUE public 4
CHANNEL_YELLOW public 4
CHANNEL_ALPHA public 8
CHANNEL_OPACITY public 8
CHANNEL_MATTE public 8
CHANNEL_BLACK public 32
CHANNEL_INDEX public 32
CHANNEL_ALL public 134217727
CHANNEL_DEFAULT public 134217719
CHANNEL_RGBA public 15
CHANNEL_TRUEALPHA public 64
CHANNEL_RGBS public 128
CHANNEL_GRAY_CHANNELS public 128
CHANNEL_SYNC public 256
CHANNEL_COMPOSITES public 47
METRIC_UNDEFINED public 0
METRIC_ABSOLUTEERRORMETRIC public 1
METRIC_MEANABSOLUTEERROR public 2
METRIC_MEANERRORPERPIXELMETRIC public 3
METRIC_MEANSQUAREERROR public 4
METRIC_PEAKABSOLUTEERROR public 5
METRIC_PEAKSIGNALTONOISERATIO public 6
METRIC_ROOTMEANSQUAREDERROR public 7
METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC public 8
METRIC_FUZZERROR public 9
PIXEL_CHAR public 1
PIXEL_DOUBLE public 2
PIXEL_FLOAT public 3
PIXEL_INTEGER public 4
PIXEL_LONG public 5
PIXEL_QUANTUM public 6
PIXEL_SHORT public 7
EVALUATE_UNDEFINED public 0
EVALUATE_ADD public 1
EVALUATE_AND public 2
EVALUATE_DIVIDE public 3
EVALUATE_LEFTSHIFT public 4
EVALUATE_MAX public 5
EVALUATE_MIN public 6
EVALUATE_MULTIPLY public 7
EVALUATE_OR public 8
EVALUATE_RIGHTSHIFT public 9
EVALUATE_SET public 10
EVALUATE_SUBTRACT public 11
EVALUATE_XOR public 12
EVALUATE_POW public 13
EVALUATE_LOG public 14
EVALUATE_THRESHOLD public 15
EVALUATE_THRESHOLDBLACK public 16
EVALUATE_THRESHOLDWHITE public 17
EVALUATE_GAUSSIANNOISE public 18
EVALUATE_IMPULSENOISE public 19
EVALUATE_LAPLACIANNOISE public 20
EVALUATE_MULTIPLICATIVENOISE public 21
EVALUATE_POISSONNOISE public 22
EVALUATE_UNIFORMNOISE public 23
EVALUATE_COSINE public 24
EVALUATE_SINE public 25
EVALUATE_ADDMODULUS public 26
EVALUATE_MEAN public 27
EVALUATE_ABS public 28
EVALUATE_EXPONENTIAL public 29
EVALUATE_MEDIAN public 30
EVALUATE_SUM public 31
COLORSPACE_UNDEFINED public 0
COLORSPACE_RGB public 1
COLORSPACE_GRAY public 2
COLORSPACE_TRANSPARENT public 3
COLORSPACE_OHTA public 4
COLORSPACE_LAB public 5
COLORSPACE_XYZ public 6
COLORSPACE_YCBCR public 7
COLORSPACE_YCC public 8
COLORSPACE_YIQ public 9
COLORSPACE_YPBPR public 10
COLORSPACE_YUV public 11
COLORSPACE_CMYK public 12
COLORSPACE_SRGB public 13
COLORSPACE_HSB public 14
COLORSPACE_HSL public 15
COLORSPACE_HWB public 16
COLORSPACE_REC601LUMA public 17
COLORSPACE_REC709LUMA public 19
COLORSPACE_LOG public 21
COLORSPACE_CMY public 22
COLORSPACE_LUV public 23
COLORSPACE_HCL public 24
COLORSPACE_LCH public 25
COLORSPACE_LMS public 26
COLORSPACE_LCHAB public 27
COLORSPACE_LCHUV public 28
COLORSPACE_SCRGB public 29
COLORSPACE_HSI public 30
COLORSPACE_HSV public 31
COLORSPACE_HCLP public 32
COLORSPACE_YDBDR public 33
COLORSPACE_REC601YCBCR public 18
COLORSPACE_REC709YCBCR public 20
VIRTUALPIXELMETHOD_UNDEFINED public 0
VIRTUALPIXELMETHOD_BACKGROUND public 1
VIRTUALPIXELMETHOD_CONSTANT public 2
VIRTUALPIXELMETHOD_EDGE public 4
VIRTUALPIXELMETHOD_MIRROR public 5
VIRTUALPIXELMETHOD_TILE public 7
VIRTUALPIXELMETHOD_TRANSPARENT public 8
VIRTUALPIXELMETHOD_MASK public 9
VIRTUALPIXELMETHOD_BLACK public 10
VIRTUALPIXELMETHOD_GRAY public 11
VIRTUALPIXELMETHOD_WHITE public 12
VIRTUALPIXELMETHOD_HORIZONTALTILE public 13
VIRTUALPIXELMETHOD_VERTICALTILE public 14
VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE public 15
VIRTUALPIXELMETHOD_VERTICALTILEEDGE public 16
VIRTUALPIXELMETHOD_CHECKERTILE public 17
PREVIEW_UNDEFINED public 0
PREVIEW_ROTATE public 1
PREVIEW_SHEAR public 2
PREVIEW_ROLL public 3
PREVIEW_HUE public 4
PREVIEW_SATURATION public 5
PREVIEW_BRIGHTNESS public 6
PREVIEW_GAMMA public 7
PREVIEW_SPIFF public 8
PREVIEW_DULL public 9
PREVIEW_GRAYSCALE public 10
PREVIEW_QUANTIZE public 11
PREVIEW_DESPECKLE public 12
PREVIEW_REDUCENOISE public 13
PREVIEW_ADDNOISE public 14
PREVIEW_SHARPEN public 15
PREVIEW_BLUR public 16
PREVIEW_THRESHOLD public 17
PREVIEW_EDGEDETECT public 18
PREVIEW_SPREAD public 19
PREVIEW_SOLARIZE public 20
PREVIEW_SHADE public 21
PREVIEW_RAISE public 22
PREVIEW_SEGMENT public 23
PREVIEW_SWIRL public 24
PREVIEW_IMPLODE public 25
PREVIEW_WAVE public 26
PREVIEW_OILPAINT public 27
PREVIEW_CHARCOALDRAWING public 28
PREVIEW_JPEG public 29
RENDERINGINTENT_UNDEFINED public 0
RENDERINGINTENT_SATURATION public 1
RENDERINGINTENT_PERCEPTUAL public 2
RENDERINGINTENT_ABSOLUTE public 3
RENDERINGINTENT_RELATIVE public 4
INTERLACE_UNDEFINED public 0
INTERLACE_NO public 1
INTERLACE_LINE public 2
INTERLACE_PLANE public 3
INTERLACE_PARTITION public 4
INTERLACE_GIF public 5
INTERLACE_JPEG public 6
INTERLACE_PNG public 7
FILLRULE_UNDEFINED public 0
FILLRULE_EVENODD public 1
FILLRULE_NONZERO public 2
PATHUNITS_UNDEFINED public 0
PATHUNITS_USERSPACE public 1
PATHUNITS_USERSPACEONUSE public 2
PATHUNITS_OBJECTBOUNDINGBOX public 3
LINECAP_UNDEFINED public 0
LINECAP_BUTT public 1
LINECAP_ROUND public 2
LINECAP_SQUARE public 3
LINEJOIN_UNDEFINED public 0
LINEJOIN_MITER public 1
LINEJOIN_ROUND public 2
LINEJOIN_BEVEL public 3
RESOURCETYPE_UNDEFINED public 0
RESOURCETYPE_AREA public 1
RESOURCETYPE_DISK public 2
RESOURCETYPE_FILE public 3
RESOURCETYPE_MAP public 4
RESOURCETYPE_MEMORY public 5
RESOURCETYPE_TIME public 7
RESOURCETYPE_THROTTLE public 8
RESOURCETYPE_THREAD public 6
DISPOSE_UNRECOGNIZED public 0
DISPOSE_UNDEFINED public 0
DISPOSE_NONE public 1
DISPOSE_BACKGROUND public 2
DISPOSE_PREVIOUS public 3
INTERPOLATE_UNDEFINED public 0
INTERPOLATE_AVERAGE public 1
INTERPOLATE_BICUBIC public 2
INTERPOLATE_BILINEAR public 3
INTERPOLATE_FILTER public 4
INTERPOLATE_INTEGER public 5
INTERPOLATE_MESH public 6
INTERPOLATE_NEARESTNEIGHBOR public 7
INTERPOLATE_SPLINE public 8
LAYERMETHOD_UNDEFINED public 0
LAYERMETHOD_COALESCE public 1
LAYERMETHOD_COMPAREANY public 2
LAYERMETHOD_COMPARECLEAR public 3
LAYERMETHOD_COMPAREOVERLAY public 4
LAYERMETHOD_DISPOSE public 5
LAYERMETHOD_OPTIMIZE public 6
LAYERMETHOD_OPTIMIZEPLUS public 8
LAYERMETHOD_OPTIMIZETRANS public 9
LAYERMETHOD_COMPOSITE public 12
LAYERMETHOD_OPTIMIZEIMAGE public 7
LAYERMETHOD_REMOVEDUPS public 10
LAYERMETHOD_REMOVEZERO public 11
LAYERMETHOD_TRIMBOUNDS public 16
ORIENTATION_UNDEFINED public 0
ORIENTATION_TOPLEFT public 1
ORIENTATION_TOPRIGHT public 2
ORIENTATION_BOTTOMRIGHT public 3
ORIENTATION_BOTTOMLEFT public 4
ORIENTATION_LEFTTOP public 5
ORIENTATION_RIGHTTOP public 6
ORIENTATION_RIGHTBOTTOM public 7
ORIENTATION_LEFTBOTTOM public 8
DISTORTION_UNDEFINED public 0
DISTORTION_AFFINE public 1
DISTORTION_AFFINEPROJECTION public 2
DISTORTION_ARC public 9
DISTORTION_BILINEAR public 6
DISTORTION_PERSPECTIVE public 4
DISTORTION_PERSPECTIVEPROJECTION public 5
DISTORTION_SCALEROTATETRANSLATE public 3
DISTORTION_POLYNOMIAL public 8
DISTORTION_POLAR public 10
DISTORTION_DEPOLAR public 11
DISTORTION_BARREL public 14
DISTORTION_SHEPARDS public 16
DISTORTION_SENTINEL public 18
DISTORTION_BARRELINVERSE public 15
DISTORTION_BILINEARFORWARD public 6
DISTORTION_BILINEARREVERSE public 7
DISTORTION_RESIZE public 17
DISTORTION_CYLINDER2PLANE public 12
DISTORTION_PLANE2CYLINDER public 13
LAYERMETHOD_MERGE public 13
LAYERMETHOD_FLATTEN public 14
LAYERMETHOD_MOSAIC public 15
ALPHACHANNEL_ACTIVATE public 1
ALPHACHANNEL_RESET public 7
ALPHACHANNEL_SET public 8
ALPHACHANNEL_UNDEFINED public 0
ALPHACHANNEL_COPY public 3
ALPHACHANNEL_DEACTIVATE public 4
ALPHACHANNEL_EXTRACT public 5
ALPHACHANNEL_OPAQUE public 6
ALPHACHANNEL_SHAPE public 9
ALPHACHANNEL_TRANSPARENT public 10
SPARSECOLORMETHOD_UNDEFINED public 0
SPARSECOLORMETHOD_BARYCENTRIC public 1
SPARSECOLORMETHOD_BILINEAR public 7
SPARSECOLORMETHOD_POLYNOMIAL public 8
SPARSECOLORMETHOD_SPEPARDS public 16
SPARSECOLORMETHOD_VORONOI public 18
SPARSECOLORMETHOD_INVERSE public 19
DITHERMETHOD_UNDEFINED public 0
DITHERMETHOD_NO public 1
DITHERMETHOD_RIEMERSMA public 2
DITHERMETHOD_FLOYDSTEINBERG public 3
FUNCTION_UNDEFINED public 0
FUNCTION_POLYNOMIAL public 1
FUNCTION_SINUSOID public 2
ALPHACHANNEL_BACKGROUND public 2
FUNCTION_ARCSIN public 3
FUNCTION_ARCTAN public 4
ALPHACHANNEL_FLATTEN public 11
ALPHACHANNEL_REMOVE public 12
STATISTIC_GRADIENT public 1
STATISTIC_MAXIMUM public 2
STATISTIC_MEAN public 3
STATISTIC_MEDIAN public 4
STATISTIC_MINIMUM public 5
STATISTIC_MODE public 6
STATISTIC_NONPEAK public 7
STATISTIC_STANDARD_DEVIATION public 8
MORPHOLOGY_CONVOLVE public 1
MORPHOLOGY_CORRELATE public 2
MORPHOLOGY_ERODE public 3
MORPHOLOGY_DILATE public 4
MORPHOLOGY_ERODE_INTENSITY public 5
MORPHOLOGY_DILATE_INTENSITY public 6
MORPHOLOGY_DISTANCE public 7
MORPHOLOGY_OPEN public 8
MORPHOLOGY_CLOSE public 9
MORPHOLOGY_OPEN_INTENSITY public 10
MORPHOLOGY_CLOSE_INTENSITY public 11
MORPHOLOGY_SMOOTH public 12
MORPHOLOGY_EDGE_IN public 13
MORPHOLOGY_EDGE_OUT public 14
MORPHOLOGY_EDGE public 15
MORPHOLOGY_TOP_HAT public 16
MORPHOLOGY_BOTTOM_HAT public 17
MORPHOLOGY_HIT_AND_MISS public 18
MORPHOLOGY_THINNING public 19
MORPHOLOGY_THICKEN public 20
MORPHOLOGY_VORONOI public 21
MORPHOLOGY_ITERATIVE public 22
KERNEL_UNITY public 1
KERNEL_GAUSSIAN public 2
KERNEL_DIFFERENCE_OF_GAUSSIANS public 3
KERNEL_LAPLACIAN_OF_GAUSSIANS public 4
KERNEL_BLUR public 5
KERNEL_COMET public 6
KERNEL_LAPLACIAN public 7
KERNEL_SOBEL public 8
KERNEL_FREI_CHEN public 9
KERNEL_ROBERTS public 10
KERNEL_PREWITT public 11
KERNEL_COMPASS public 12
KERNEL_KIRSCH public 13
KERNEL_DIAMOND public 14
KERNEL_SQUARE public 15
KERNEL_RECTANGLE public 16
KERNEL_OCTAGON public 17
KERNEL_DISK public 18
KERNEL_PLUS public 19
KERNEL_CROSS public 20
KERNEL_RING public 21
KERNEL_PEAKS public 22
KERNEL_EDGES public 23
KERNEL_CORNERS public 24
KERNEL_DIAGONALS public 25
KERNEL_LINE_ENDS public 26
KERNEL_LINE_JUNCTIONS public 27
KERNEL_RIDGES public 28
KERNEL_CONVEX_HULL public 29
KERNEL_THIN_SE public 30
KERNEL_SKELETON public 31
KERNEL_CHEBYSHEV public 32
KERNEL_MANHATTAN public 33
KERNEL_OCTAGONAL public 34
KERNEL_EUCLIDEAN public 35
KERNEL_USER_DEFINED public 36
KERNEL_BINOMIAL public 37
DIRECTION_LEFT_TO_RIGHT public 2
DIRECTION_RIGHT_TO_LEFT public 1
NORMALIZE_KERNEL_NONE public 0
NORMALIZE_KERNEL_VALUE public 8192
NORMALIZE_KERNEL_CORRELATE public 65536
NORMALIZE_KERNEL_PERCENT public 4096

Methods

optimizeImageLayers

(PECL imagick 2.0.0)
Removes repeated portions of images to optimize

public optimizeImageLayers(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.optimizeimagelayers.php -

compareImageLayers

(PECL imagick 2.0.0)
Returns the maximum bounding region between images

public compareImageLayers(int $method): \Imagick

Parameters:

Parameter Type Description
$method int <p>
One of the layer method constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.compareimagelayers.php -

pingImageBlob

(PECL imagick 2.0.0)
Quickly fetch attributes

public pingImageBlob(string $image): bool

Parameters:

Parameter Type Description
$image string <p>
A string containing the image.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.pingimageblob.php -

pingImageFile

(PECL imagick 2.0.0)
Get basic image attributes in a lightweight manner

public pingImageFile(resource $filehandle, string $fileName = null): bool

Parameters:

Parameter Type Description
$filehandle resource <p>
An open filehandle to the image.
</p>
$fileName string [optional] <p>
Optional filename for this image.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.pingimagefile.php -

transposeImage

(PECL imagick 2.0.0)
Creates a vertical mirror image

public transposeImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.transposeimage.php -

transverseImage

(PECL imagick 2.0.0)
Creates a horizontal mirror image

public transverseImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.transverseimage.php -

trimImage

(PECL imagick 2.0.0)
Remove edges from the image

public trimImage(float $fuzz): bool

Parameters:

Parameter Type Description
$fuzz float <p>
By default target must match a particular pixel color exactly.
However, in many cases two colors may differ by a small amount.
The fuzz member of image defines how much tolerance is acceptable
to consider two colors as the same. This parameter represents the variation
on the quantum range.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.trimimage.php -

waveImage

(PECL imagick 2.0.0)
Applies wave filter to the image

public waveImage(float $amplitude, float $length): bool

Parameters:

Parameter Type Description
$amplitude float <p>
The amplitude of the wave.
</p>
$length float <p>
The length of the wave.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.waveimage.php -

vignetteImage

(PECL imagick 2.0.0)
Adds vignette filter to the image

public vignetteImage(float $blackPoint, float $whitePoint, int $x, int $y): bool

Parameters:

Parameter Type Description
$blackPoint float <p>
The black point.
</p>
$whitePoint float <p>
The white point
</p>
$x int <p>
X offset of the ellipse
</p>
$y int <p>
Y offset of the ellipse
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.vignetteimage.php -

uniqueImageColors

(PECL imagick 2.0.0)
Discards all but one of any pixel color

public uniqueImageColors(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.uniqueimagecolors.php -

getImageMatte

(PECL imagick 2.0.0)
Return if the image has a matte channel

public getImageMatte(): bool

Return Value:

TRUE on success or FALSE on failure.

See Also:

  • https://php.net/manual/en/imagick.getimagematte.php -

setImageMatte

(PECL imagick 2.0.0)
Sets the image matte channel

public setImageMatte(bool $matte): bool

Parameters:

Parameter Type Description
$matte bool <p>
True activates the matte channel and false disables it.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagematte.php -

adaptiveResizeImage

Adaptively resize image with data dependent triangulation

public adaptiveResizeImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false): bool

If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
If false, the calculations should produce the same results as ImageMagick CLI does.

Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.

Parameters:

Parameter Type Description
$columns int The number of columns in the scaled image.
$rows int The number of rows in the scaled image.
$bestfit bool [optional] Whether to fit the image inside a bounding box.<br>
The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on success

Throws:

Throws ImagickException on error

See Also:

  • https://php.net/manual/en/imagick.adaptiveresizeimage.php -

sketchImage

(PECL imagick 2.0.0)
Simulates a pencil sketch

public sketchImage(float $radius, float $sigma, float $angle): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels.
</p>
$angle float <p>
Apply the effect along this angle.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sketchimage.php -

shadeImage

(PECL imagick 2.0.0)
Creates a 3D effect

public shadeImage(bool $gray, float $azimuth, float $elevation): bool

Parameters:

Parameter Type Description
$gray bool <p>
A value other than zero shades the intensity of each pixel.
</p>
$azimuth float <p>
Defines the light source direction.
</p>
$elevation float <p>
Defines the light source direction.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.shadeimage.php -

getSizeOffset

(PECL imagick 2.0.0)
Returns the size offset

public getSizeOffset(): int

Return Value:

the size offset associated with the Imagick object.

See Also:

  • https://php.net/manual/en/imagick.getsizeoffset.php -

setSizeOffset

(PECL imagick 2.0.0)
Sets the size and offset of the Imagick object

public setSizeOffset(int $columns, int $rows, int $offset): bool

Parameters:

Parameter Type Description
$columns int <p>
The width in pixels.
</p>
$rows int <p>
The height in pixels.
</p>
$offset int <p>
The image offset.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setsizeoffset.php -

adaptiveBlurImage

(PECL imagick 2.0.0)
Adds adaptive blur filter to image

public adaptiveBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel.
Provide a value of 0 and the radius will be chosen automagically.
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.adaptiveblurimage.php -

contrastStretchImage

(PECL imagick 2.0.0)
Enhances the contrast of a color image

public contrastStretchImage(float $black_point, float $white_point, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$black_point float <p>
The black point.
</p>
$white_point float <p>
The white point.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. <b>Imagick::CHANNEL_ALL</b>. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.contraststretchimage.php -

adaptiveSharpenImage

(PECL imagick 2.0.0)
Adaptively sharpen the image

public adaptiveSharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.adaptivesharpenimage.php -

randomThresholdImage

(PECL imagick 2.0.0)
Creates a high-contrast, two-color image

public randomThresholdImage(float $low, float $high, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$low float <p>
The low point
</p>
$high float <p>
The high point
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.randomthresholdimage.php -

roundCornersImage

public roundCornersImage(mixed $xRounding, mixed $yRounding, mixed $strokeWidth, mixed $displace, mixed $sizeCorrection): mixed

Parameters:

Parameter Type Description
$xRounding mixed
$yRounding mixed
$strokeWidth mixed [optional]
$displace mixed [optional]
$sizeCorrection mixed [optional]

roundCorners

(PECL imagick 2.0.0)
Rounds image corners

public roundCorners(float $x_rounding, float $y_rounding, float $stroke_width = 10.0, float $displace = 5.0, float $size_correction = -6.0): bool

Parameters:

Parameter Type Description
$x_rounding float <p>
x rounding
</p>
$y_rounding float <p>
y rounding
</p>
$stroke_width float [optional] <p>
stroke width
</p>
$displace float [optional] <p>
image displace
</p>
$size_correction float [optional] <p>
size correction
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.roundcorners.php -

setIteratorIndex

(PECL imagick 2.0.0)
Set the iterator position

public setIteratorIndex(int $index): bool

Parameters:

Parameter Type Description
$index int <p>
The position to set the iterator to
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setiteratorindex.php -

getIteratorIndex

(PECL imagick 2.0.0)
Gets the index of the current active image

public getIteratorIndex(): int

Return Value:

an integer containing the index of the image in the stack.

See Also:

  • https://php.net/manual/en/imagick.getiteratorindex.php -

transformImage

(PECL imagick 2.0.0)
Convenience method for setting crop size and the image geometry

public transformImage(string $crop, string $geometry): \Imagick

Parameters:

Parameter Type Description
$crop string <p>
A crop geometry string. This geometry defines a subregion of the image to crop.
</p>
$geometry string <p>
An image geometry string. This geometry defines the final size of the image.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.transformimage.php -

setImageOpacity

(PECL imagick 2.0.0)
Sets the image opacity level

public setImageOpacity(float $opacity): bool

Parameters:

Parameter Type Description
$opacity float <p>
The level of transparency: 1.0 is fully opaque and 0.0 is fully
transparent.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageopacity.php -

orderedPosterizeImage

(PECL imagick 2.2.2)
Performs an ordered dither

public orderedPosterizeImage(string $threshold_map, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$threshold_map string <p>
A string containing the name of the threshold dither map to use
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.orderedposterizeimage.php -

polaroidImage

(PECL imagick 2.0.0)
Simulates a Polaroid picture

public polaroidImage(\ImagickDraw $properties, float $angle): bool

Parameters:

Parameter Type Description
$properties \ImagickDraw <p>
The polaroid properties
</p>
$angle float <p>
The polaroid angle
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.polaroidimage.php -

getImageProperty

(PECL imagick 2.0.0)
Returns the named image property

public getImageProperty(string $name): string|false

Parameters:

Parameter Type Description
$name string <p>
name of the property (for example Exif:DateTime)
</p>

Return Value:

a string containing the image property, false if a property with the given name does not exist.

See Also:

  • https://php.net/manual/en/imagick.getimageproperty.php -

setImageProperty

(PECL imagick 2.0.0)
Sets an image property

public setImageProperty(string $name, string $value): bool

Parameters:

Parameter Type Description
$name string
$value string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageproperty.php -

setImageInterpolateMethod

(PECL imagick 2.0.0)
Sets the image interpolate pixel method

public setImageInterpolateMethod(int $method): bool

Parameters:

Parameter Type Description
$method int <p>
The method is one of the <b>Imagick::INTERPOLATE_*</b> constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageinterpolatemethod.php -

getImageInterpolateMethod

(PECL imagick 2.0.0)
Returns the interpolation method

public getImageInterpolateMethod(): int

Return Value:

the interpolate method on success.

See Also:

  • https://php.net/manual/en/imagick.getimageinterpolatemethod.php -

linearStretchImage

(PECL imagick 2.0.0)
Stretches with saturation the image intensity

public linearStretchImage(float $blackPoint, float $whitePoint): bool

Parameters:

Parameter Type Description
$blackPoint float <p>
The image black point
</p>
$whitePoint float <p>
The image white point
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.linearstretchimage.php -

getImageLength

(PECL imagick 2.0.0)
Returns the image length in bytes

public getImageLength(): int

Return Value:

an int containing the current image size.

See Also:

  • https://php.net/manual/en/imagick.getimagelength.php -

extentImage

(No version information available, might only be in SVN)
Set image size

public extentImage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int <p>
The new width
</p>
$height int <p>
The new height
</p>
$x int <p>
X position for the new size
</p>
$y int <p>
Y position for the new size
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.extentimage.php -

getImageOrientation

(PECL imagick 2.0.0)
Gets the image orientation

public getImageOrientation(): int

Return Value:

an int on success.

See Also:

  • https://php.net/manual/en/imagick.getimageorientation.php -

setImageOrientation

(PECL imagick 2.0.0)
Sets the image orientation

public setImageOrientation(int $orientation): bool

Parameters:

Parameter Type Description
$orientation int <p>
One of the orientation constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageorientation.php -

paintFloodfillImage

(PECL imagick 2.1.0)
Changes the color value of any pixel that matches target

public paintFloodfillImage(mixed $fill, float $fuzz, mixed $bordercolor, int $x, int $y, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$fill mixed <p>
ImagickPixel object or a string containing the fill color
</p>
$fuzz float <p>
The amount of fuzz. For example, set fuzz to 10 and the color red at
intensities of 100 and 102 respectively are now interpreted as the
same color for the purposes of the floodfill.
</p>
$bordercolor mixed <p>
ImagickPixel object or a string containing the border color
</p>
$x int <p>
X start position of the floodfill
</p>
$y int <p>
Y start position of the floodfill
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.paintfloodfillimage.php -

clutImage

(PECL imagick 2.0.0)
Replaces colors in the image from a color lookup table. Optional second parameter to replace colors in a specific channel. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.

public clutImage(\Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$lookup_table \Imagick <p>
Imagick object containing the color lookup table
</p>
$channel int [optional] <p>
The Channeltype
constant. When not supplied, default channels are replaced.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.clutimage.php -

getImageProperties

(PECL imagick 2.0.0)
Returns the image properties

public getImageProperties(string $pattern = &quot;*&quot;, bool $only_names = true): array

Parameters:

Parameter Type Description
$pattern string [optional] <p>
The pattern for property names.
</p>
$only_names bool [optional] <p>
Whether to return only property names. If <b>FALSE</b> then also the values are returned
</p>

Return Value:

an array containing the image properties or property names.

See Also:

  • https://php.net/manual/en/imagick.getimageproperties.php -

getImageProfiles

(PECL imagick 2.2.0)
Returns the image profiles

public getImageProfiles(string $pattern = &quot;*&quot;, bool $include_values = true): array

Parameters:

Parameter Type Description
$pattern string [optional] <p>
The pattern for profile names.
</p>
$include_values bool [optional] <p>
Whether to return only profile names. If <b>FALSE</b> then only profile names will be returned.
</p>

Return Value:

an array containing the image profiles or profile names.

See Also:

  • https://php.net/manual/en/imagick.getimageprofiles.php -

distortImage

(PECL imagick 2.0.1)
Distorts an image using various distortion methods

public distortImage(int $method, array $arguments, bool $bestfit): bool

Parameters:

Parameter Type Description
$method int <p>
The method of image distortion. See distortion constants
</p>
$arguments array <p>
The arguments for this distortion method
</p>
$bestfit bool <p>
Attempt to resize destination to fit distorted source
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.distortimage.php -

writeImageFile

(No version information available, might only be in SVN)
Writes an image to a filehandle

public writeImageFile(resource $filehandle): bool

Parameters:

Parameter Type Description
$filehandle resource <p>
Filehandle where to write the image
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.writeimagefile.php -

writeImagesFile

(No version information available, might only be in SVN)
Writes frames to a filehandle

public writeImagesFile(resource $filehandle): bool

Parameters:

Parameter Type Description
$filehandle resource <p>
Filehandle where to write the images
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.writeimagesfile.php -

resetImagePage

(No version information available, might only be in SVN)
Reset image page

public resetImagePage(string $page): bool

Parameters:

Parameter Type Description
$page string <p>
The page definition. For example 7168x5147+0+0
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.resetimagepage.php -

setImageClipMask

(No version information available, might only be in SVN)
Sets image clip mask

public setImageClipMask(\Imagick $clip_mask): bool

Parameters:

Parameter Type Description
$clip_mask \Imagick <p>
The Imagick object containing the clip mask
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageclipmask.php -

getImageClipMask

(No version information available, might only be in SVN)
Gets image clip mask

public getImageClipMask(): \Imagick

Return Value:

an Imagick object containing the clip mask.

See Also:

  • https://php.net/manual/en/imagick.getimageclipmask.php -

animateImages

(No version information available, might only be in SVN)
Animates an image or images

public animateImages(string $x_server): bool

Parameters:

Parameter Type Description
$x_server string <p>
X server address
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.animateimages.php -

recolorImage

(No version information available, might only be in SVN)
Recolors image

public recolorImage(array $matrix): bool

Parameters:

Parameter Type Description
$matrix array <p>
The matrix containing the color values
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.recolorimage.php -

setFont

(PECL imagick 2.1.0)
Sets font

public setFont(string $font): bool

Parameters:

Parameter Type Description
$font string <p>
Font name or a filename
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setfont.php -

getFont

(PECL imagick 2.1.0)
Gets font

public getFont(): string|false

Return Value:

the string containing the font name or FALSE if not font is set.

See Also:

  • https://php.net/manual/en/imagick.getfont.php -

setPointSize

(PECL imagick 2.1.0)
Sets point size

public setPointSize(float $point_size): bool

Parameters:

Parameter Type Description
$point_size float <p>
Point size
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setpointsize.php -

getPointSize

(No version information available, might only be in SVN)
Gets point size

public getPointSize(): float

Return Value:

a float containing the point size.

See Also:

  • https://php.net/manual/en/imagick.getpointsize.php -

mergeImageLayers

(PECL imagick 2.1.0)
Merges image layers

public mergeImageLayers(int $layer_method): \Imagick

Parameters:

Parameter Type Description
$layer_method int <p>
One of the <b>Imagick::LAYERMETHOD_*</b> constants
</p>

Return Value:

Returns an Imagick object containing the merged image.

Throws:

See Also:

  • https://php.net/manual/en/imagick.mergeimagelayers.php -

setImageAlphaChannel

(No version information available, might only be in SVN)
Sets image alpha channel

public setImageAlphaChannel(int $mode): bool

Parameters:

Parameter Type Description
$mode int <p>
One of the <b>Imagick::ALPHACHANNEL_*</b> constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagealphachannel.php -

floodFillPaintImage

(No version information available, might only be in SVN)
Changes the color value of any pixel that matches target

public floodFillPaintImage(mixed $fill, float $fuzz, mixed $target, int $x, int $y, bool $invert, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$fill mixed <p>
ImagickPixel object or a string containing the fill color
</p>
$fuzz float <p>
The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
</p>
$target mixed <p>
ImagickPixel object or a string containing the target color to paint
</p>
$x int <p>
X start position of the floodfill
</p>
$y int <p>
Y start position of the floodfill
</p>
$invert bool <p>
If <b>TRUE</b> paints any pixel that does not match the target color.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.floodfillpaintimage.php -

opaquePaintImage

(No version information available, might only be in SVN)
Changes the color value of any pixel that matches target

public opaquePaintImage(mixed $target, mixed $fill, float $fuzz, bool $invert, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$target mixed <p>
ImagickPixel object or a string containing the color to change
</p>
$fill mixed <p>
The replacement color
</p>
$fuzz float <p>
The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
</p>
$invert bool <p>
If <b>TRUE</b> paints any pixel that does not match the target color.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.opaquepaintimage.php -

transparentPaintImage

(No version information available, might only be in SVN)
Paints pixels transparent

public transparentPaintImage(mixed $target, float $alpha, float $fuzz, bool $invert): bool

Parameters:

Parameter Type Description
$target mixed <p>
The target color to paint
</p>
$alpha float <p>
The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.
</p>
$fuzz float <p>
The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
</p>
$invert bool <p>
If <b>TRUE</b> paints any pixel that does not match the target color.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.transparentpaintimage.php -

liquidRescaleImage

(No version information available, might only be in SVN)
Animates an image or images

public liquidRescaleImage(int $width, int $height, float $delta_x, float $rigidity): bool

Parameters:

Parameter Type Description
$width int <p>
The width of the target size
</p>
$height int <p>
The height of the target size
</p>
$delta_x float <p>
How much the seam can traverse on x-axis.
Passing 0 causes the seams to be straight.
</p>
$rigidity float <p>
Introduces a bias for non-straight seams. This parameter is
typically 0.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.liquidrescaleimage.php -

encipherImage

(No version information available, might only be in SVN)
Enciphers an image

public encipherImage(string $passphrase): bool

Parameters:

Parameter Type Description
$passphrase string <p>
The passphrase
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.encipherimage.php -

decipherImage

(No version information available, might only be in SVN)
Deciphers an image

public decipherImage(string $passphrase): bool

Parameters:

Parameter Type Description
$passphrase string <p>
The passphrase
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.decipherimage.php -

setGravity

(No version information available, might only be in SVN)
Sets the gravity

public setGravity(int $gravity): bool

Parameters:

Parameter Type Description
$gravity int <p>
The gravity property. Refer to the list of
gravity constants.
</p>

Return Value:

No value is returned.

See Also:

  • https://php.net/manual/en/imagick.setgravity.php -

getGravity

(No version information available, might only be in SVN)
Gets the gravity

public getGravity(): int

Return Value:

the gravity property. Refer to the list of gravity constants.

See Also:

  • https://php.net/manual/en/imagick.getgravity.php -

getImageChannelRange

(PECL imagick 2.2.1)
Gets channel range

public getImageChannelRange(int $channel): array

Parameters:

Parameter Type Description
$channel int <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

an array containing minima and maxima values of the channel(s).

See Also:

  • https://php.net/manual/en/imagick.getimagechannelrange.php -

getImageAlphaChannel

(No version information available, might only be in SVN)
Gets the image alpha channel

public getImageAlphaChannel(): int

Return Value:

a constant defining the current alpha channel value. Refer to this list of alpha channel constants.

See Also:

  • https://php.net/manual/en/imagick.getimagealphachannel.php -

getImageChannelDistortions

(No version information available, might only be in SVN)
Gets channel distortions

public getImageChannelDistortions(\Imagick $reference, int $metric, int $channel = Imagick::CHANNEL_DEFAULT): float

Parameters:

Parameter Type Description
$reference \Imagick <p>
Imagick object containing the reference image
</p>
$metric int <p>
Refer to this list of metric type constants.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

a float describing the channel distortion.

See Also:

  • https://php.net/manual/en/imagick.getimagechanneldistortions.php -

setImageGravity

(No version information available, might only be in SVN)
Sets the image gravity

public setImageGravity(int $gravity): bool

Parameters:

Parameter Type Description
$gravity int <p>
The gravity property. Refer to the list of
gravity constants.
</p>

Return Value:

No value is returned.

See Also:

  • https://php.net/manual/en/imagick.setimagegravity.php -

getImageGravity

(No version information available, might only be in SVN)
Gets the image gravity

public getImageGravity(): int

Return Value:

the images gravity property. Refer to the list of gravity constants.

See Also:

  • https://php.net/manual/en/imagick.getimagegravity.php -

importImagePixels

(No version information available, might only be in SVN)
Imports image pixels

public importImagePixels(int $x, int $y, int $width, int $height, string $map, int $storage, array $pixels): bool

Parameters:

Parameter Type Description
$x int <p>
The image x position
</p>
$y int <p>
The image y position
</p>
$width int <p>
The image width
</p>
$height int <p>
The image height
</p>
$map string <p>
Map of pixel ordering as a string. This can be for example RGB.
The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent),
O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
</p>
$storage int <p>
The pixel storage method.
Refer to this list of pixel constants.
</p>
$pixels array <p>
The array of pixels
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.importimagepixels.php -

deskewImage

(No version information available, might only be in SVN)
Removes skew from the image

public deskewImage(float $threshold): bool

Parameters:

Parameter Type Description
$threshold float <p>
Deskew threshold
</p>

See Also:

  • https://php.net/manual/en/imagick.deskewimage.php -

segmentImage

(No version information available, might only be in SVN)
Segments an image

public segmentImage(int $COLORSPACE, float $cluster_threshold, float $smooth_threshold, bool $verbose = false): bool

Parameters:

Parameter Type Description
$COLORSPACE int <p>
One of the COLORSPACE constants.
</p>
$cluster_threshold float <p>
A percentage describing minimum number of pixels
contained in hexedra before it is considered valid.
</p>
$smooth_threshold float <p>
Eliminates noise from the histogram.
</p>
$verbose bool [optional] <p>
Whether to output detailed information about recognised classes.
</p>

See Also:

  • https://php.net/manual/en/imagick.segmentimage.php -

sparseColorImage

(No version information available, might only be in SVN)
Interpolates colors

public sparseColorImage(int $SPARSE_METHOD, array $arguments, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$SPARSE_METHOD int <p>
Refer to this list of sparse method constants
</p>
$arguments array <p>
An array containing the coordinates.
The array is in format array(1,1, 2,45)
</p>
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sparsecolorimage.php -

remapImage

(No version information available, might only be in SVN)
Remaps image colors

public remapImage(\Imagick $replacement, int $DITHER): bool

Parameters:

Parameter Type Description
$replacement \Imagick <p>
An Imagick object containing the replacement colors
</p>
$DITHER int <p>
Refer to this list of dither method constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.remapimage.php -

exportImagePixels

(No version information available, might only be in SVN)
Exports raw image pixels

public exportImagePixels(int $x, int $y, int $width, int $height, string $map, int $STORAGE): array

Parameters:

Parameter Type Description
$x int <p>
X-coordinate of the exported area
</p>
$y int <p>
Y-coordinate of the exported area
</p>
$width int <p>
Width of the exported aread
</p>
$height int <p>
Height of the exported area
</p>
$map string <p>
Ordering of the exported pixels. For example "RGB".
Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P.
</p>
$STORAGE int <p>
Refer to this list of pixel type constants
</p>

Return Value:

an array containing the pixels values.

See Also:

  • https://php.net/manual/en/imagick.exportimagepixels.php -

getImageChannelKurtosis

(No version information available, might only be in SVN)
The getImageChannelKurtosis purpose

public getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT): array

Parameters:

Parameter Type Description
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

an array with kurtosis and skewness members.

See Also:

  • https://php.net/manual/en/imagick.getimagechannelkurtosis.php -

functionImage

(No version information available, might only be in SVN)
Applies a function on the image

public functionImage(int $function, array $arguments, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$function int <p>
Refer to this list of function constants
</p>
$arguments array <p>
Array of arguments to pass to this function.
</p>
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.functionimage.php -

transformImageColorspace

public transformImageColorspace(mixed $COLORSPACE): mixed

Parameters:

Parameter Type Description
$COLORSPACE mixed

haldClutImage

(No version information available, might only be in SVN)
Replaces colors in the image

public haldClutImage(\Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$clut \Imagick <p>
Imagick object containing the Hald lookup image.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.haldclutimage.php -

autoLevelImage

public autoLevelImage(mixed $CHANNEL): mixed

Parameters:

Parameter Type Description
$CHANNEL mixed [optional]

blueShiftImage

public blueShiftImage(mixed $factor): mixed

Parameters:

Parameter Type Description
$factor mixed [optional]

getImageArtifact

(No version information available, might only be in SVN)
Get image artifact

public getImageArtifact(string $artifact): string

Parameters:

Parameter Type Description
$artifact string <p>
The name of the artifact
</p>

Return Value:

the artifact value on success.

See Also:

  • https://php.net/manual/en/imagick.getimageartifact.php -

setImageArtifact

(No version information available, might only be in SVN)
Set image artifact

public setImageArtifact(string $artifact, string $value): bool

Parameters:

Parameter Type Description
$artifact string <p>
The name of the artifact
</p>
$value string <p>
The value of the artifact
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageartifact.php -

deleteImageArtifact

(No version information available, might only be in SVN)
Delete image artifact

public deleteImageArtifact(string $artifact): bool

Parameters:

Parameter Type Description
$artifact string <p>
The name of the artifact to delete
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.deleteimageartifact.php -

getColorspace

(PECL imagick 0.9.10-0.9.9)
Gets the colorspace

public getColorspace(): int

Return Value:

an integer which can be compared against COLORSPACE constants.

See Also:

  • https://php.net/manual/en/imagick.getcolorspace.php -

setColorspace

(No version information available, might only be in SVN)
Set colorspace

public setColorspace(int $COLORSPACE): bool

Parameters:

Parameter Type Description
$COLORSPACE int <p>
One of the COLORSPACE constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setcolorspace.php -

clampImage

public clampImage(mixed $CHANNEL): mixed

Parameters:

Parameter Type Description
$CHANNEL mixed [optional]

smushImages

public smushImages(mixed $stack, mixed $offset): mixed

Parameters:

Parameter Type Description
$stack mixed
$offset mixed

__construct

(PECL imagick 2.0.0)
The Imagick constructor

public __construct(mixed $files = null): mixed

Parameters:

Parameter Type Description
$files mixed <p>
The path to an image to load or an array of paths. Paths can include
wildcards for file names, or can be URLs.
</p>

Throws:

Throws ImagickException on error.

See Also:

  • https://php.net/manual/en/imagick.construct.php -

__toString

public __toString(): string

count

public count(): mixed

getPixelIterator

(PECL imagick 2.0.0)
Returns a MagickPixelIterator

public getPixelIterator(): \ImagickPixelIterator

Return Value:

an ImagickPixelIterator on success.

See Also:

  • https://php.net/manual/en/imagick.getpixeliterator.php -

getPixelRegionIterator

(PECL imagick 2.0.0)
Get an ImagickPixelIterator for an image section

public getPixelRegionIterator(int $x, int $y, int $columns, int $rows): \ImagickPixelIterator

Parameters:

Parameter Type Description
$x int <p>
The x-coordinate of the region.
</p>
$y int <p>
The y-coordinate of the region.
</p>
$columns int <p>
The width of the region.
</p>
$rows int <p>
The height of the region.
</p>

Return Value:

an ImagickPixelIterator for an image section.

See Also:

  • https://php.net/manual/en/imagick.getpixelregioniterator.php -

readImage

(PECL imagick 0.9.0-0.9.9)
Reads image from filename

public readImage(string $filename): bool

Parameters:

Parameter Type Description
$filename string

Return Value:

TRUE on success.

Throws:

Throws ImagickException on error.

See Also:

  • https://php.net/manual/en/imagick.readimage.php -

readImages

public readImages(mixed $filenames): mixed

Parameters:

Parameter Type Description
$filenames mixed

Throws:

Throws ImagickException on error.


readImageBlob

(PECL imagick 2.0.0)
Reads image from a binary string

public readImageBlob(string $image, string $filename = null): bool

Parameters:

Parameter Type Description
$image string
$filename string [optional]

Return Value:

TRUE on success.

Throws:

Throws ImagickException on error.

See Also:

  • https://php.net/manual/en/imagick.readimageblob.php -

setImageFormat

(PECL imagick 2.0.0)
Sets the format of a particular image

public setImageFormat(string $format): bool

Parameters:

Parameter Type Description
$format string <p>
String presentation of the image format. Format support
depends on the ImageMagick installation.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageformat.php -

scaleImage

Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.
If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
If false, the calculations should produce the same results as ImageMagick CLI does.

public scaleImage(int $cols, int $rows, bool $bestfit = false, bool $legacy = false): bool

Parameters:

Parameter Type Description
$cols int
$rows int
$bestfit bool [optional] The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on success.

Throws:

Throws ImagickException on error

See Also:

  • https://php.net/manual/en/imagick.scaleimage.php -

writeImage

(PECL imagick 0.9.0-0.9.9)
Writes an image to the specified filename

public writeImage(string $filename = null): bool

Parameters:

Parameter Type Description
$filename string [optional] <p>
Filename where to write the image. The extension of the filename
defines the type of the file.
Format can be forced regardless of file extension using format: prefix,
for example "jpg:test.png".
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.writeimage.php -

writeImages

(PECL imagick 0.9.0-0.9.9)
Writes an image or image sequence

public writeImages(string $filename, bool $adjoin): bool

Parameters:

Parameter Type Description
$filename string
$adjoin bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.writeimages.php -

blurImage

(PECL imagick 2.0.0)
Adds blur filter to image

public blurImage(float $radius, float $sigma, int $channel = null): bool

Parameters:

Parameter Type Description
$radius float <p>
Blur radius
</p>
$sigma float <p>
Standard deviation
</p>
$channel int [optional] <p>
The Channeltype
constant. When not supplied, all channels are blurred.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.blurimage.php -

thumbnailImage

Changes the size of an image to the given dimensions and removes any associated profiles.
If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
If false, the calculations should produce the same results as ImageMagick CLI does.

Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.

public thumbnailImage(int $columns, int $rows, bool $bestfit = false, bool $fill = false, bool $legacy = false): bool

Parameters:

Parameter Type Description
$columns int <p>
Image width
</p>
$rows int <p>
Image height
</p>
$bestfit bool [optional] <p>
Whether to force maximum values
</p>
The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
$fill bool [optional]
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.thumbnailimage.php -

cropThumbnailImage

Creates a cropped thumbnail at the requested size.

public cropThumbnailImage(int $width, int $height, bool $legacy = false): bool

If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. If false it uses the correct behaviour.

Parameters:

Parameter Type Description
$width int The width of the thumbnail
$height int The Height of the thumbnail
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on succes

Throws:

Throws ImagickException on error

See Also:

  • https://php.net/manual/en/imagick.cropthumbnailimage.php -

getImageFilename

(PECL imagick 2.0.0)
Returns the filename of a particular image in a sequence

public getImageFilename(): string

Return Value:

a string with the filename of the image.

See Also:

  • https://php.net/manual/en/imagick.getimagefilename.php -

setImageFilename

(PECL imagick 2.0.0)
Sets the filename of a particular image

public setImageFilename(string $filename): bool

Parameters:

Parameter Type Description
$filename string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagefilename.php -

getImageFormat

(PECL imagick 2.0.0)
Returns the format of a particular image in a sequence

public getImageFormat(): string

Return Value:

a string containing the image format on success.

See Also:

  • https://php.net/manual/en/imagick.getimageformat.php -

getImageMimeType

public getImageMimeType(): string

Return Value:

Returns the image mime-type.

See Also:

  • https://secure.php.net/manual/en/imagick.getimagemimetype.php -

removeImage

(PECL imagick 2.0.0)
Removes an image from the image list

public removeImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.removeimage.php -

destroy

(PECL imagick 2.0.0)
Destroys the Imagick object

public destroy(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.destroy.php -

clear

(PECL imagick 2.0.0)
Clears all resources associated to Imagick object

public clear(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.clear.php -

getImageSize

(PECL imagick 2.0.0)
Returns the image length in bytes

public getImageSize(): int
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Return Value:

an int containing the current image size.

See Also:

  • https://php.net/manual/en/imagick.getimagesize.php -

getImageBlob

(PECL imagick 2.0.0)
Returns the image sequence as a blob

public getImageBlob(): string

Return Value:

a string containing the image.

See Also:

  • https://php.net/manual/en/imagick.getimageblob.php -

getImagesBlob

(PECL imagick 2.0.0)
Returns all image sequences as a blob

public getImagesBlob(): string

Return Value:

a string containing the images. On failure, throws ImagickException on failure

Throws:

on failure

See Also:

  • https://php.net/manual/en/imagick.getimagesblob.php -

setFirstIterator

(PECL imagick 2.0.0)
Sets the Imagick iterator to the first image

public setFirstIterator(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setfirstiterator.php -

setLastIterator

(PECL imagick 2.0.1)
Sets the Imagick iterator to the last image

public setLastIterator(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setlastiterator.php -

resetIterator

public resetIterator(): mixed

previousImage

(PECL imagick 2.0.0)
Move to the previous image in the object

public previousImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.previousimage.php -

nextImage

(PECL imagick 2.0.0)
Moves to the next image

public nextImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.nextimage.php -

hasPreviousImage

(PECL imagick 2.0.0)
Checks if the object has a previous image

public hasPreviousImage(): bool

Return Value:

TRUE if the object has more images when traversing the list in the reverse direction, returns FALSE if there are none.

See Also:

  • https://php.net/manual/en/imagick.haspreviousimage.php -

hasNextImage

(PECL imagick 2.0.0)
Checks if the object has more images

public hasNextImage(): bool

Return Value:

TRUE if the object has more images when traversing the list in the forward direction, returns FALSE if there are none.

See Also:

  • https://php.net/manual/en/imagick.hasnextimage.php -

setImageIndex

(PECL imagick 2.0.0)
Set the iterator position

public setImageIndex(int $index): bool

Parameters:

Parameter Type Description
$index int <p>
The position to set the iterator to
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageindex.php -

getImageIndex

(PECL imagick 2.0.0)
Gets the index of the current active image

public getImageIndex(): int

Return Value:

an integer containing the index of the image in the stack.

See Also:

  • https://php.net/manual/en/imagick.getimageindex.php -

commentImage

(PECL imagick 2.0.0)
Adds a comment to your image

public commentImage(string $comment): bool

Parameters:

Parameter Type Description
$comment string <p>
The comment to add
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.commentimage.php -

cropImage

(PECL imagick 2.0.0)
Extracts a region of the image

public cropImage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int <p>
The width of the crop
</p>
$height int <p>
The height of the crop
</p>
$x int <p>
The X coordinate of the cropped region's top left corner
</p>
$y int <p>
The Y coordinate of the cropped region's top left corner
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.cropimage.php -

labelImage

(PECL imagick 2.0.0)
Adds a label to an image

public labelImage(string $label): bool

Parameters:

Parameter Type Description
$label string <p>
The label to add
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.labelimage.php -

getImageGeometry

(PECL imagick 2.0.0)
Gets the width and height as an associative array

public getImageGeometry(): array

Return Value:

an array with the width/height of the image.

See Also:

  • https://php.net/manual/en/imagick.getimagegeometry.php -

drawImage

(PECL imagick 2.0.0)
Renders the ImagickDraw object on the current image

public drawImage(\ImagickDraw $draw): bool

Parameters:

Parameter Type Description
$draw \ImagickDraw <p>
The drawing operations to render on the image.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.drawimage.php -

setImageCompressionQuality

(No version information available, might only be in SVN)
Sets the image compression quality

public setImageCompressionQuality(int $quality): bool

Parameters:

Parameter Type Description
$quality int <p>
The image compression quality as an integer
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagecompressionquality.php -

getImageCompressionQuality

(PECL imagick 2.2.2)
Gets the current image's compression quality

public getImageCompressionQuality(): int

Return Value:

integer describing the images compression quality

See Also:

  • https://php.net/manual/en/imagick.getimagecompressionquality.php -

annotateImage

(PECL imagick 2.0.0)
Annotates an image with text

public annotateImage(\ImagickDraw $draw_settings, float $x, float $y, float $angle, string $text): bool

Parameters:

Parameter Type Description
$draw_settings \ImagickDraw <p>
The ImagickDraw object that contains settings for drawing the text
</p>
$x float <p>
Horizontal offset in pixels to the left of text
</p>
$y float <p>
Vertical offset in pixels to the baseline of text
</p>
$angle float <p>
The angle at which to write the text
</p>
$text string <p>
The string to draw
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.annotateimage.php -

compositeImage

(PECL imagick 2.0.0)
Composite one image onto another

public compositeImage(\Imagick $composite_object, int $composite, int $x, int $y, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$composite_object \Imagick <p>
Imagick object which holds the composite image
</p>
$composite int Composite operator
$x int <p>
The column offset of the composited image
</p>
$y int <p>
The row offset of the composited image
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.compositeimage.php -

modulateImage

(PECL imagick 2.0.0)
Control the brightness, saturation, and hue

public modulateImage(float $brightness, float $saturation, float $hue): bool

Parameters:

Parameter Type Description
$brightness float
$saturation float
$hue float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.modulateimage.php -

getImageColors

(PECL imagick 2.0.0)
Gets the number of unique colors in the image

public getImageColors(): int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagecolors.php -

montageImage

(PECL imagick 2.0.0)
Creates a composite image

public montageImage(\ImagickDraw $draw, string $tile_geometry, string $thumbnail_geometry, int $mode, string $frame): \Imagick

Parameters:

Parameter Type Description
$draw \ImagickDraw <p>
The font name, size, and color are obtained from this object.
</p>
$tile_geometry string <p>
The number of tiles per row and page (e.g. 6x4+0+0).
</p>
$thumbnail_geometry string <p>
Preferred image size and border size of each thumbnail
(e.g. 120x120+4+3>).
</p>
$mode int <p>
Thumbnail framing mode, see Montage Mode constants.
</p>
$frame string <p>
Surround the image with an ornamental border (e.g. 15x15+3+3). The
frame color is that of the thumbnail's matte color.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.montageimage.php -

identifyImage

(PECL imagick 2.0.0)
Identifies an image and fetches attributes

public identifyImage(bool $appendRawOutput = false): array

Parameters:

Parameter Type Description
$appendRawOutput bool [optional]

Return Value:

Identifies an image and returns the attributes. Attributes include the image width, height, size, and others.

See Also:

  • https://php.net/manual/en/imagick.identifyimage.php -

thresholdImage

(PECL imagick 2.0.0)
Changes the value of individual pixels based on a threshold

public thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$threshold float
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.thresholdimage.php -

adaptiveThresholdImage

(PECL imagick 2.0.0)
Selects a threshold for each pixel based on a range of intensity

public adaptiveThresholdImage(int $width, int $height, int $offset): bool

Parameters:

Parameter Type Description
$width int <p>
Width of the local neighborhood.
</p>
$height int <p>
Height of the local neighborhood.
</p>
$offset int <p>
The mean offset
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.adaptivethresholdimage.php -

blackThresholdImage

(PECL imagick 2.0.0)
Forces all pixels below the threshold into black

public blackThresholdImage(mixed $threshold): bool

Parameters:

Parameter Type Description
$threshold mixed <p>
The threshold below which everything turns black
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.blackthresholdimage.php -

whiteThresholdImage

(PECL imagick 2.0.0)
Force all pixels above the threshold into white

public whiteThresholdImage(mixed $threshold): bool

Parameters:

Parameter Type Description
$threshold mixed

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.whitethresholdimage.php -

appendImages

(PECL imagick 2.0.0)
Append a set of images

public appendImages(bool $stack = false): \Imagick

Parameters:

Parameter Type Description
$stack bool [optional] <p>
Whether to stack the images vertically.
By default (or if <b>FALSE</b> is specified) images are stacked left-to-right.
If <i>stack</i> is <b>TRUE</b>, images are stacked top-to-bottom.
</p>

Return Value:

Imagick instance on success.

See Also:

  • https://php.net/manual/en/imagick.appendimages.php -

charcoalImage

(PECL imagick 2.0.0)
Simulates a charcoal drawing

public charcoalImage(float $radius, float $sigma): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.charcoalimage.php -

normalizeImage

(PECL imagick 2.0.0)
Enhances the contrast of a color image

public normalizeImage(int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.normalizeimage.php -

oilPaintImage

(PECL imagick 2.0.0)
Simulates an oil painting

public oilPaintImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the circular neighborhood.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.oilpaintimage.php -

posterizeImage

(PECL imagick 2.0.0)
Reduces the image to a limited number of color level

public posterizeImage(int $levels, bool $dither): bool

Parameters:

Parameter Type Description
$levels int
$dither bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.posterizeimage.php -

radialBlurImage

(PECL imagick 2.0.0)
Radial blurs an image

public radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$angle float
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.radialblurimage.php -

raiseImage

(PECL imagick 2.0.0)
Creates a simulated 3d button-like effect

public raiseImage(int $width, int $height, int $x, int $y, bool $raise): bool

Parameters:

Parameter Type Description
$width int
$height int
$x int
$y int
$raise bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.raiseimage.php -

resampleImage

(PECL imagick 2.0.0)
Resample image to desired resolution

public resampleImage(float $x_resolution, float $y_resolution, int $filter, float $blur): bool

Parameters:

Parameter Type Description
$x_resolution float
$y_resolution float
$filter int
$blur float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.resampleimage.php -

resizeImage

Scales an image to the desired dimensions with one of these filters:
If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
If false, the calculations should produce the same results as ImageMagick CLI does.

Note: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched.
In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.

public resizeImage(int $columns, int $rows, int $filter, float $blur, bool $bestfit = false, bool $legacy = false): bool

Parameters:

Parameter Type Description
$columns int Width of the image
$rows int Height of the image
$filter int Refer to the list of filter constants.
$blur float The blur factor where > 1 is blurry, < 1 is sharp.
$bestfit bool [optional] Added since 2.1.0. Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on success

See Also:

  • https://php.net/manual/en/imagick.resizeimage.php -

rollImage

(PECL imagick 2.0.0)
Offsets an image

public rollImage(int $x, int $y): bool

Parameters:

Parameter Type Description
$x int <p>
The X offset.
</p>
$y int <p>
The Y offset.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.rollimage.php -

rotateImage

(PECL imagick 2.0.0)
Rotates an image

public rotateImage(mixed $background, float $degrees): bool

Parameters:

Parameter Type Description
$background mixed <p>
The background color
</p>
$degrees float <p>
The number of degrees to rotate the image
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.rotateimage.php -

sampleImage

(PECL imagick 2.0.0)
Scales an image with pixel sampling

public sampleImage(int $columns, int $rows): bool

Parameters:

Parameter Type Description
$columns int
$rows int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sampleimage.php -

solarizeImage

(PECL imagick 2.0.0)
Applies a solarizing effect to the image

public solarizeImage(int $threshold): bool

Parameters:

Parameter Type Description
$threshold int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.solarizeimage.php -

shadowImage

(PECL imagick 2.0.0)
Simulates an image shadow

public shadowImage(float $opacity, float $sigma, int $x, int $y): bool

Parameters:

Parameter Type Description
$opacity float
$sigma float
$x int
$y int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.shadowimage.php -

setImageAttribute

public setImageAttribute(mixed $key, mixed $value): mixed

Parameters:

Parameter Type Description
$key mixed
$value mixed

setImageBackgroundColor

(PECL imagick 2.0.0)
Sets the image background color

public setImageBackgroundColor(mixed $background): bool

Parameters:

Parameter Type Description
$background mixed

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagebackgroundcolor.php -

setImageCompose

(PECL imagick 2.0.0)
Sets the image composite operator

public setImageCompose(int $compose): bool

Parameters:

Parameter Type Description
$compose int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagecompose.php -

setImageCompression

(PECL imagick 2.0.0)
Sets the image compression

public setImageCompression(int $compression): bool

Parameters:

Parameter Type Description
$compression int <p>
One of the <b>COMPRESSION</b> constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagecompression.php -

setImageDelay

(PECL imagick 2.0.0)
Sets the image delay

public setImageDelay(int $delay): bool

Parameters:

Parameter Type Description
$delay int <p>
The amount of time expressed in 'ticks' that the image should be
displayed for. For animated GIFs there are 100 ticks per second, so a
value of 20 would be 20/100 of a second aka 1/5th of a second.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagedelay.php -

setImageDepth

(PECL imagick 2.0.0)
Sets the image depth

public setImageDepth(int $depth): bool

Parameters:

Parameter Type Description
$depth int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagedepth.php -

setImageGamma

(PECL imagick 2.0.0)
Sets the image gamma

public setImageGamma(float $gamma): bool

Parameters:

Parameter Type Description
$gamma float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagegamma.php -

setImageIterations

(PECL imagick 2.0.0)
Sets the image iterations

public setImageIterations(int $iterations): bool

Parameters:

Parameter Type Description
$iterations int <p>
The number of iterations the image should loop over. Set to '0' to loop
continuously.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageiterations.php -

setImageMatteColor

(PECL imagick 2.0.0)
Sets the image matte color

public setImageMatteColor(mixed $matte): bool

Parameters:

Parameter Type Description
$matte mixed

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagemattecolor.php -

setImagePage

(PECL imagick 2.0.0)
Sets the page geometry of the image

public setImagePage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int
$height int
$x int
$y int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagepage.php -

setImageProgressMonitor

public setImageProgressMonitor(mixed $filename): mixed

Parameters:

Parameter Type Description
$filename mixed

setImageResolution

(PECL imagick 2.0.0)
Sets the image resolution

public setImageResolution(float $x_resolution, float $y_resolution): bool

Parameters:

Parameter Type Description
$x_resolution float
$y_resolution float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageresolution.php -

setImageScene

(PECL imagick 2.0.0)
Sets the image scene

public setImageScene(int $scene): bool

Parameters:

Parameter Type Description
$scene int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagescene.php -

setImageTicksPerSecond

(PECL imagick 2.0.0)
Sets the image ticks-per-second

public setImageTicksPerSecond(int $ticks_per_second): bool

Parameters:

Parameter Type Description
$ticks_per_second int <p>
The duration for which an image should be displayed expressed in ticks
per second.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagetickspersecond.php -

setImageType

(PECL imagick 2.0.0)
Sets the image type

public setImageType(int $image_type): bool

Parameters:

Parameter Type Description
$image_type int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagetype.php -

setImageUnits

(PECL imagick 2.0.0)
Sets the image units of resolution

public setImageUnits(int $units): bool

Parameters:

Parameter Type Description
$units int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageunits.php -

sharpenImage

(PECL imagick 2.0.0)
Sharpens an image

public sharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$radius float
$sigma float
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sharpenimage.php -

shaveImage

(PECL imagick 2.0.0)
Shaves pixels from the image edges

public shaveImage(int $columns, int $rows): bool

Parameters:

Parameter Type Description
$columns int
$rows int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.shaveimage.php -

shearImage

(PECL imagick 2.0.0)
Creating a parallelogram

public shearImage(mixed $background, float $x_shear, float $y_shear): bool

Parameters:

Parameter Type Description
$background mixed <p>
The background color
</p>
$x_shear float <p>
The number of degrees to shear on the x axis
</p>
$y_shear float <p>
The number of degrees to shear on the y axis
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.shearimage.php -

spliceImage

(PECL imagick 2.0.0)
Splices a solid color into the image

public spliceImage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int
$height int
$x int
$y int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.spliceimage.php -

pingImage

(PECL imagick 2.0.0)
Fetch basic attributes about the image

public pingImage(string $filename): bool

Parameters:

Parameter Type Description
$filename string <p>
The filename to read the information from.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.pingimage.php -

readImageFile

(PECL imagick 2.0.0)
Reads image from open filehandle

public readImageFile(resource $filehandle, string $fileName = null): bool

Parameters:

Parameter Type Description
$filehandle resource
$fileName string [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.readimagefile.php -

displayImage

(PECL imagick 2.0.0)
Displays an image

public displayImage(string $servername): bool

Parameters:

Parameter Type Description
$servername string <p>
The X server name
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.displayimage.php -

displayImages

(PECL imagick 2.0.0)
Displays an image or image sequence

public displayImages(string $servername): bool

Parameters:

Parameter Type Description
$servername string <p>
The X server name
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.displayimages.php -

spreadImage

(PECL imagick 2.0.0)
Randomly displaces each pixel in a block

public spreadImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.spreadimage.php -

swirlImage

(PECL imagick 2.0.0)
Swirls the pixels about the center of the image

public swirlImage(float $degrees): bool

Parameters:

Parameter Type Description
$degrees float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.swirlimage.php -

stripImage

(PECL imagick 2.0.0)
Strips an image of all profiles and comments

public stripImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.stripimage.php -

queryFormats

(PECL imagick 2.0.0)
Returns formats supported by Imagick

public static queryFormats(string $pattern = &quot;*&quot;): array
  • This method is static.

Parameters:

Parameter Type Description
$pattern string [optional]

Return Value:

an array containing the formats supported by Imagick.

See Also:

  • https://php.net/manual/en/imagick.queryformats.php -

queryFonts

(PECL imagick 2.0.0)
Returns the configured fonts

public static queryFonts(string $pattern = &quot;*&quot;): array
  • This method is static.

Parameters:

Parameter Type Description
$pattern string [optional] <p>
The query pattern
</p>

Return Value:

an array containing the configured fonts.

See Also:

  • https://php.net/manual/en/imagick.queryfonts.php -

queryFontMetrics

(PECL imagick 2.0.0)
Returns an array representing the font metrics

public queryFontMetrics(\ImagickDraw $properties, string $text, bool $multiline = null): array

Parameters:

Parameter Type Description
$properties \ImagickDraw <p>
ImagickDraw object containing font properties
</p>
$text string <p>
The text
</p>
$multiline bool [optional] <p>
Multiline parameter. If left empty it is autodetected
</p>

Return Value:

a multi-dimensional array representing the font metrics.

See Also:

  • https://php.net/manual/en/imagick.queryfontmetrics.php -

steganoImage

(PECL imagick 2.0.0)
Hides a digital watermark within the image

public steganoImage(\Imagick $watermark_wand, int $offset): \Imagick

Parameters:

Parameter Type Description
$watermark_wand \Imagick
$offset int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.steganoimage.php -

addNoiseImage

(PECL imagick 2.0.0)
Adds random noise to the image

public addNoiseImage(int $noise_type, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$noise_type int <p>
The type of the noise. Refer to this list of
noise constants.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.addnoiseimage.php -

motionBlurImage

(PECL imagick 2.0.0)
Simulates motion blur

public motionBlurImage(float $radius, float $sigma, float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel.
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels.
</p>
$angle float <p>
Apply the effect along this angle.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
The channel argument affects only if Imagick is compiled against ImageMagick version
6.4.4 or greater.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.motionblurimage.php -

mosaicImages

(PECL imagick 2.0.0)
Forms a mosaic from images

public mosaicImages(): \Imagick

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.mosaicimages.php -

morphImages

(PECL imagick 2.0.0)
Method morphs a set of images

public morphImages(int $number_frames): \Imagick

Parameters:

Parameter Type Description
$number_frames int <p>
The number of in-between images to generate.
</p>

Return Value:

This method returns a new Imagick object on success. Throw an ImagickException on error.

Throws:

on error

See Also:

  • https://php.net/manual/en/imagick.morphimages.php -

minifyImage

(PECL imagick 2.0.0)
Scales an image proportionally to half its size

public minifyImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.minifyimage.php -

affineTransformImage

(PECL imagick 2.0.0)
Transforms an image

public affineTransformImage(\ImagickDraw $matrix): bool

Parameters:

Parameter Type Description
$matrix \ImagickDraw <p>
The affine matrix
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.affinetransformimage.php -

averageImages

(PECL imagick 2.0.0)
Average a set of images

public averageImages(): \Imagick

Return Value:

a new Imagick object on success.

See Also:

  • https://php.net/manual/en/imagick.averageimages.php -

borderImage

(PECL imagick 2.0.0)
Surrounds the image with a border

public borderImage(mixed $bordercolor, int $width, int $height): bool

Parameters:

Parameter Type Description
$bordercolor mixed <p>
ImagickPixel object or a string containing the border color
</p>
$width int <p>
Border width
</p>
$height int <p>
Border height
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.borderimage.php -

chopImage

(PECL imagick 2.0.0)
Removes a region of an image and trims

public chopImage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int <p>
Width of the chopped area
</p>
$height int <p>
Height of the chopped area
</p>
$x int <p>
X origo of the chopped area
</p>
$y int <p>
Y origo of the chopped area
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.chopimage.php -

clipImage

(PECL imagick 2.0.0)
Clips along the first path from the 8BIM profile

public clipImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.clipimage.php -

clipPathImage

(PECL imagick 2.0.0)
Clips along the named paths from the 8BIM profile

public clipPathImage(string $pathname, bool $inside): bool

Parameters:

Parameter Type Description
$pathname string <p>
The name of the path
</p>
$inside bool <p>
If <b>TRUE</b> later operations take effect inside clipping path.
Otherwise later operations take effect outside clipping path.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.clippathimage.php -

clipImagePath

public clipImagePath(mixed $pathname, mixed $inside): mixed

Parameters:

Parameter Type Description
$pathname mixed
$inside mixed

coalesceImages

(PECL imagick 2.0.0)
Composites a set of images

public coalesceImages(): \Imagick

Return Value:

a new Imagick object on success.

See Also:

  • https://php.net/manual/en/imagick.coalesceimages.php -

colorFloodfillImage

(PECL imagick 2.0.0)
Changes the color value of any pixel that matches target

public colorFloodfillImage(mixed $fill, float $fuzz, mixed $bordercolor, int $x, int $y): bool

Parameters:

Parameter Type Description
$fill mixed <p>
ImagickPixel object containing the fill color
</p>
$fuzz float <p>
The amount of fuzz. For example, set fuzz to 10 and the color red at
intensities of 100 and 102 respectively are now interpreted as the
same color for the purposes of the floodfill.
</p>
$bordercolor mixed <p>
ImagickPixel object containing the border color
</p>
$x int <p>
X start position of the floodfill
</p>
$y int <p>
Y start position of the floodfill
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.colorfloodfillimage.php -

colorizeImage

Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.
If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0

public colorizeImage(mixed $colorize, mixed $opacity, bool $legacy = false): bool

Parameters:

Parameter Type Description
$colorize mixed <p>
ImagickPixel object or a string containing the colorize color
</p>
$opacity mixed <p>
ImagickPixel object or an float containing the opacity value.
1.0 is fully opaque and 0.0 is fully transparent.
</p>
$legacy bool [optional] Added since 3.4.0. Default value FALSE

Return Value:

TRUE on success.

Throws:

Throws ImagickException on error

See Also:

  • https://php.net/manual/en/imagick.colorizeimage.php -

compareImageChannels

(PECL imagick 2.0.0)
Returns the difference in one or more images

public compareImageChannels(\Imagick $image, int $channelType, int $metricType): array

Parameters:

Parameter Type Description
$image \Imagick <p>
Imagick object containing the image to compare.
</p>
$channelType int <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>
$metricType int <p>
One of the metric type constants.
</p>

Return Value:

Array consisting of new_wand and distortion.

See Also:

  • https://php.net/manual/en/imagick.compareimagechannels.php -

compareImages

(PECL imagick 2.0.0)
Compares an image to a reconstructed image

public compareImages(\Imagick $compare, int $metric): array

Parameters:

Parameter Type Description
$compare \Imagick <p>
An image to compare to.
</p>
$metric int <p>
Provide a valid metric type constant. Refer to this
list of metric constants.
</p>

Return Value:

Array consisting of an Imagick object of the reconstructed image and a float representing the difference.

Throws:

Throws ImagickException on error.

See Also:

  • https://php.net/manual/en/imagick.compareimages.php -

contrastImage

(PECL imagick 2.0.0)
Change the contrast of the image

public contrastImage(bool $sharpen): bool

Parameters:

Parameter Type Description
$sharpen bool <p>
The sharpen value
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.contrastimage.php -

combineImages

(PECL imagick 2.0.0)
Combines one or more images into a single image

public combineImages(int $channelType): \Imagick

Parameters:

Parameter Type Description
$channelType int <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.combineimages.php -

convolveImage

(PECL imagick 2.0.0)
Applies a custom convolution kernel to the image

public convolveImage(array $kernel, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$kernel array <p>
The convolution kernel
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.convolveimage.php -

cycleColormapImage

(PECL imagick 2.0.0)
Displaces an image's colormap

public cycleColormapImage(int $displace): bool

Parameters:

Parameter Type Description
$displace int <p>
The amount to displace the colormap.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.cyclecolormapimage.php -

deconstructImages

(PECL imagick 2.0.0)
Returns certain pixel differences between images

public deconstructImages(): \Imagick

Return Value:

a new Imagick object on success.

See Also:

  • https://php.net/manual/en/imagick.deconstructimages.php -

despeckleImage

(PECL imagick 2.0.0)
Reduces the speckle noise in an image

public despeckleImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.despeckleimage.php -

edgeImage

(PECL imagick 2.0.0)
Enhance edges within the image

public edgeImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the operation.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.edgeimage.php -

embossImage

(PECL imagick 2.0.0)
Returns a grayscale image with a three-dimensional effect

public embossImage(float $radius, float $sigma): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the effect
</p>
$sigma float <p>
The sigma of the effect
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.embossimage.php -

enhanceImage

(PECL imagick 2.0.0)
Improves the quality of a noisy image

public enhanceImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.enhanceimage.php -

equalizeImage

(PECL imagick 2.0.0)
Equalizes the image histogram

public equalizeImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.equalizeimage.php -

evaluateImage

(PECL imagick 2.0.0)
Applies an expression to an image

public evaluateImage(int $op, float $constant, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$op int <p>
The evaluation operator
</p>
$constant float <p>
The value of the operator
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.evaluateimage.php -

flattenImages

Merges a sequence of images. This is useful for combining Photoshop layers into a single image.

public flattenImages(): \Imagick

This is replaced by:

$im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN)

Return Value:

Returns an Imagick object containing the merged image.

Throws:

Throws ImagickException on error.

See Also:

  • https://php.net/manual/en/imagick.flattenimages.php -

flipImage

(PECL imagick 2.0.0)
Creates a vertical mirror image

public flipImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.flipimage.php -

flopImage

(PECL imagick 2.0.0)
Creates a horizontal mirror image

public flopImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.flopimage.php -

frameImage

(PECL imagick 2.0.0)
Adds a simulated three-dimensional border

public frameImage(mixed $matte_color, int $width, int $height, int $inner_bevel, int $outer_bevel): bool

Parameters:

Parameter Type Description
$matte_color mixed <p>
ImagickPixel object or a string representing the matte color
</p>
$width int <p>
The width of the border
</p>
$height int <p>
The height of the border
</p>
$inner_bevel int <p>
The inner bevel width
</p>
$outer_bevel int <p>
The outer bevel width
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.frameimage.php -

fxImage

(PECL imagick 2.0.0)
Evaluate expression for each pixel in the image

public fxImage(string $expression, int $channel = Imagick::CHANNEL_ALL): \Imagick

Parameters:

Parameter Type Description
$expression string <p>
The expression.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.fximage.php -

gammaImage

(PECL imagick 2.0.0)
Gamma-corrects an image

public gammaImage(float $gamma, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$gamma float <p>
The amount of gamma-correction.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.gammaimage.php -

gaussianBlurImage

(PECL imagick 2.0.0)
Blurs an image

public gaussianBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the Gaussian, in pixels, not counting the center pixel.
</p>
$sigma float <p>
The standard deviation of the Gaussian, in pixels.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.gaussianblurimage.php -

getImageAttribute

public getImageAttribute(mixed $key): mixed

Parameters:

Parameter Type Description
$key mixed

getImageBackgroundColor

(PECL imagick 2.0.0)
Returns the image background color

public getImageBackgroundColor(): \ImagickPixel

Return Value:

an ImagickPixel set to the background color of the image.

See Also:

  • https://php.net/manual/en/imagick.getimagebackgroundcolor.php -

getImageBluePrimary

(PECL imagick 2.0.0)
Returns the chromaticy blue primary point

public getImageBluePrimary(): array

Return Value:

Array consisting of "x" and "y" coordinates of point.

See Also:

  • https://php.net/manual/en/imagick.getimageblueprimary.php -

getImageBorderColor

(PECL imagick 2.0.0)
Returns the image border color

public getImageBorderColor(): \ImagickPixel

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagebordercolor.php -

getImageChannelDepth

(PECL imagick 2.0.0)
Gets the depth for a particular image channel

public getImageChannelDepth(int $channel): int

Parameters:

Parameter Type Description
$channel int <p>
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagechanneldepth.php -

getImageChannelDistortion

(PECL imagick 2.0.0)
Compares image channels of an image to a reconstructed image

public getImageChannelDistortion(\Imagick $reference, int $channel, int $metric): float

Parameters:

Parameter Type Description
$reference \Imagick <p>
Imagick object to compare to.
</p>
$channel int <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>
$metric int <p>
One of the metric type constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagechanneldistortion.php -

getImageChannelExtrema

(PECL imagick 2.0.0)
Gets the extrema for one or more image channels

public getImageChannelExtrema(int $channel): array

Parameters:

Parameter Type Description
$channel int <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagechannelextrema.php -

getImageChannelMean

(PECL imagick 2.0.0)
Gets the mean and standard deviation

public getImageChannelMean(int $channel): array

Parameters:

Parameter Type Description
$channel int <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagechannelmean.php -

getImageChannelStatistics

(PECL imagick 2.0.0)
Returns statistics for each channel in the image

public getImageChannelStatistics(): array

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagechannelstatistics.php -

getImageColormapColor

(PECL imagick 2.0.0)
Returns the color of the specified colormap index

public getImageColormapColor(int $index): \ImagickPixel

Parameters:

Parameter Type Description
$index int <p>
The offset into the image colormap.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagecolormapcolor.php -

getImageColorspace

(PECL imagick 2.0.0)
Gets the image colorspace

public getImageColorspace(): int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagecolorspace.php -

getImageCompose

(PECL imagick 2.0.0)
Returns the composite operator associated with the image

public getImageCompose(): int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.getimagecompose.php -

getImageDelay

(PECL imagick 2.0.0)
Gets the image delay

public getImageDelay(): int

Return Value:

the image delay.

See Also:

  • https://php.net/manual/en/imagick.getimagedelay.php -

getImageDepth

(PECL imagick 0.9.1-0.9.9)
Gets the image depth

public getImageDepth(): int

Return Value:

The image depth.

See Also:

  • https://php.net/manual/en/imagick.getimagedepth.php -

getImageDistortion

(PECL imagick 2.0.0)
Compares an image to a reconstructed image

public getImageDistortion(\Imagick $reference, int $metric): float

Parameters:

Parameter Type Description
$reference \Imagick <p>
Imagick object to compare to.
</p>
$metric int <p>
One of the metric type constants.
</p>

Return Value:

the distortion metric used on the image (or the best guess thereof).

See Also:

  • https://php.net/manual/en/imagick.getimagedistortion.php -

getImageExtrema

(PECL imagick 2.0.0)
Gets the extrema for the image

public getImageExtrema(): array

Return Value:

an associative array with the keys "min" and "max".

See Also:

  • https://php.net/manual/en/imagick.getimageextrema.php -

getImageDispose

(PECL imagick 2.0.0)
Gets the image disposal method

public getImageDispose(): int

Return Value:

the dispose method on success.

See Also:

  • https://php.net/manual/en/imagick.getimagedispose.php -

getImageGamma

(PECL imagick 2.0.0)
Gets the image gamma

public getImageGamma(): float

Return Value:

the image gamma on success.

See Also:

  • https://php.net/manual/en/imagick.getimagegamma.php -

getImageGreenPrimary

(PECL imagick 2.0.0)
Returns the chromaticy green primary point

public getImageGreenPrimary(): array

Return Value:

an array with the keys "x" and "y" on success, throws an ImagickException on failure.

Throws:

on failure

See Also:

  • https://php.net/manual/en/imagick.getimagegreenprimary.php -

getImageHeight

(PECL imagick 2.0.0)
Returns the image height

public getImageHeight(): int

Return Value:

the image height in pixels.

See Also:

  • https://php.net/manual/en/imagick.getimageheight.php -

getImageHistogram

(PECL imagick 2.0.0)
Gets the image histogram

public getImageHistogram(): array

Return Value:

the image histogram as an array of ImagickPixel objects.

See Also:

  • https://php.net/manual/en/imagick.getimagehistogram.php -

getImageInterlaceScheme

(PECL imagick 2.0.0)
Gets the image interlace scheme

public getImageInterlaceScheme(): int

Return Value:

the interlace scheme as an integer on success. Trhow an ImagickException on error.

Throws:

on error

See Also:

  • https://php.net/manual/en/imagick.getimageinterlacescheme.php -

getImageIterations

(PECL imagick 2.0.0)
Gets the image iterations

public getImageIterations(): int

Return Value:

the image iterations as an integer.

See Also:

  • https://php.net/manual/en/imagick.getimageiterations.php -

getImageMatteColor

(PECL imagick 2.0.0)
Returns the image matte color

public getImageMatteColor(): \ImagickPixel

Return Value:

ImagickPixel object on success.

See Also:

  • https://php.net/manual/en/imagick.getimagemattecolor.php -

getImagePage

(PECL imagick 2.0.0)
Returns the page geometry

public getImagePage(): array

Return Value:

the page geometry associated with the image in an array with the keys "width", "height", "x", and "y".

See Also:

  • https://php.net/manual/en/imagick.getimagepage.php -

getImagePixelColor

(PECL imagick 2.0.0)
Returns the color of the specified pixel

public getImagePixelColor(int $x, int $y): \ImagickPixel

Parameters:

Parameter Type Description
$x int <p>
The x-coordinate of the pixel
</p>
$y int <p>
The y-coordinate of the pixel
</p>

Return Value:

an ImagickPixel instance for the color at the coordinates given.

See Also:

  • https://php.net/manual/en/imagick.getimagepixelcolor.php -

getImageProfile

(PECL imagick 2.0.0)
Returns the named image profile

public getImageProfile(string $name): string

Parameters:

Parameter Type Description
$name string <p>
The name of the profile to return.
</p>

Return Value:

a string containing the image profile.

See Also:

  • https://php.net/manual/en/imagick.getimageprofile.php -

getImageRedPrimary

(PECL imagick 2.0.0)
Returns the chromaticity red primary point

public getImageRedPrimary(): array

Return Value:

the chromaticity red primary point as an array with the keys "x" and "y". Throw an ImagickException on error.

Throws:

on error

See Also:

  • https://php.net/manual/en/imagick.getimageredprimary.php -

getImageRenderingIntent

(PECL imagick 2.0.0)
Gets the image rendering intent

public getImageRenderingIntent(): int

Return Value:

the image rendering intent.

See Also:

  • https://php.net/manual/en/imagick.getimagerenderingintent.php -

getImageResolution

(PECL imagick 2.0.0)
Gets the image X and Y resolution

public getImageResolution(): array

Return Value:

the resolution as an array.

See Also:

  • https://php.net/manual/en/imagick.getimageresolution.php -

getImageScene

(PECL imagick 2.0.0)
Gets the image scene

public getImageScene(): int

Return Value:

the image scene.

See Also:

  • https://php.net/manual/en/imagick.getimagescene.php -

getImageSignature

(PECL imagick 2.0.0)
Generates an SHA-256 message digest

public getImageSignature(): string

Return Value:

a string containing the SHA-256 hash of the file.

See Also:

  • https://php.net/manual/en/imagick.getimagesignature.php -

getImageTicksPerSecond

(PECL imagick 2.0.0)
Gets the image ticks-per-second

public getImageTicksPerSecond(): int

Return Value:

the image ticks-per-second.

See Also:

  • https://php.net/manual/en/imagick.getimagetickspersecond.php -

getImageType

(PECL imagick 0.9.10-0.9.9)
Gets the potential image type

public getImageType(): int

Return Value:

the potential image type. imagick::IMGTYPE_UNDEFINED imagick::IMGTYPE_BILEVEL imagick::IMGTYPE_GRAYSCALE imagick::IMGTYPE_GRAYSCALEMATTE imagick::IMGTYPE_PALETTE imagick::IMGTYPE_PALETTEMATTE imagick::IMGTYPE_TRUECOLOR imagick::IMGTYPE_TRUECOLORMATTE imagick::IMGTYPE_COLORSEPARATION imagick::IMGTYPE_COLORSEPARATIONMATTE imagick::IMGTYPE_OPTIMIZE

See Also:

  • https://php.net/manual/en/imagick.getimagetype.php -

getImageUnits

(PECL imagick 2.0.0)
Gets the image units of resolution

public getImageUnits(): int

Return Value:

the image units of resolution.

See Also:

  • https://php.net/manual/en/imagick.getimageunits.php -

getImageVirtualPixelMethod

(PECL imagick 2.0.0)
Returns the virtual pixel method

public getImageVirtualPixelMethod(): int

Return Value:

the virtual pixel method on success.

See Also:

  • https://php.net/manual/en/imagick.getimagevirtualpixelmethod.php -

getImageWhitePoint

(PECL imagick 2.0.0)
Returns the chromaticity white point

public getImageWhitePoint(): array

Return Value:

the chromaticity white point as an associative array with the keys "x" and "y".

See Also:

  • https://php.net/manual/en/imagick.getimagewhitepoint.php -

getImageWidth

(PECL imagick 2.0.0)
Returns the image width

public getImageWidth(): int

Return Value:

the image width.

See Also:

  • https://php.net/manual/en/imagick.getimagewidth.php -

getNumberImages

(PECL imagick 2.0.0)
Returns the number of images in the object

public getNumberImages(): int

Return Value:

the number of images associated with Imagick object.

See Also:

  • https://php.net/manual/en/imagick.getnumberimages.php -

getImageTotalInkDensity

(PECL imagick 2.0.0)
Gets the image total ink density

public getImageTotalInkDensity(): float

Return Value:

the image total ink density of the image. Throw an ImagickException on error.

Throws:

on error

See Also:

  • https://php.net/manual/en/imagick.getimagetotalinkdensity.php -

getImageRegion

(PECL imagick 2.0.0)
Extracts a region of the image

public getImageRegion(int $width, int $height, int $x, int $y): \Imagick

Parameters:

Parameter Type Description
$width int <p>
The width of the extracted region.
</p>
$height int <p>
The height of the extracted region.
</p>
$x int <p>
X-coordinate of the top-left corner of the extracted region.
</p>
$y int <p>
Y-coordinate of the top-left corner of the extracted region.
</p>

Return Value:

Extracts a region of the image and returns it as a new wand.

See Also:

  • https://php.net/manual/en/imagick.getimageregion.php -

implodeImage

(PECL imagick 2.0.0)
Creates a new image as a copy

public implodeImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the implode
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.implodeimage.php -

levelImage

(PECL imagick 2.0.0)
Adjusts the levels of an image

public levelImage(float $blackPoint, float $gamma, float $whitePoint, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$blackPoint float <p>
The image black point
</p>
$gamma float <p>
The gamma value
</p>
$whitePoint float <p>
The image white point
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.levelimage.php -

magnifyImage

(PECL imagick 2.0.0)
Scales an image proportionally 2x

public magnifyImage(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.magnifyimage.php -

mapImage

(PECL imagick 2.0.0)
Replaces the colors of an image with the closest color from a reference image.

public mapImage(\Imagick $map, bool $dither): bool

Parameters:

Parameter Type Description
$map \Imagick
$dither bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.mapimage.php -

matteFloodfillImage

(PECL imagick 2.0.0)
Changes the transparency value of a color

public matteFloodfillImage(float $alpha, float $fuzz, mixed $bordercolor, int $x, int $y): bool

Parameters:

Parameter Type Description
$alpha float <p>
The level of transparency: 1.0 is fully opaque and 0.0 is fully
transparent.
</p>
$fuzz float <p>
The fuzz member of image defines how much tolerance is acceptable to
consider two colors as the same.
</p>
$bordercolor mixed <p>
An <b>ImagickPixel</b> object or string representing the border color.
</p>
$x int <p>
The starting x coordinate of the operation.
</p>
$y int <p>
The starting y coordinate of the operation.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.mattefloodfillimage.php -

medianFilterImage

(PECL imagick 2.0.0)
Applies a digital filter

public medianFilterImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float <p>
The radius of the pixel neighborhood.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.medianfilterimage.php -

negateImage

(PECL imagick 2.0.0)
Negates the colors in the reference image

public negateImage(bool $gray, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$gray bool <p>
Whether to only negate grayscale pixels within the image.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.negateimage.php -

paintOpaqueImage

(PECL imagick 2.0.0)
Change any pixel that matches color

public paintOpaqueImage(mixed $target, mixed $fill, float $fuzz, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$target mixed <p>
Change this target color to the fill color within the image. An
ImagickPixel object or a string representing the target color.
</p>
$fill mixed <p>
An ImagickPixel object or a string representing the fill color.
</p>
$fuzz float <p>
The fuzz member of image defines how much tolerance is acceptable to
consider two colors as the same.
</p>
$channel int [optional] <p>
Provide any channel constant that is valid for your channel mode. To
apply to more than one channel, combine channeltype constants using
bitwise operators. Refer to this
list of channel constants.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.paintopaqueimage.php -

paintTransparentImage

(PECL imagick 2.0.0)
Changes any pixel that matches color with the color defined by fill

public paintTransparentImage(mixed $target, float $alpha, float $fuzz): bool

Parameters:

Parameter Type Description
$target mixed <p>
Change this target color to specified opacity value within the image.
</p>
$alpha float <p>
The level of transparency: 1.0 is fully opaque and 0.0 is fully
transparent.
</p>
$fuzz float <p>
The fuzz member of image defines how much tolerance is acceptable to
consider two colors as the same.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.painttransparentimage.php -

previewImages

(PECL imagick 2.0.0)
Quickly pin-point appropriate parameters for image processing

public previewImages(int $preview): bool

Parameters:

Parameter Type Description
$preview int <p>
Preview type. See Preview type constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.previewimages.php -

profileImage

(PECL imagick 2.0.0)
Adds or removes a profile from an image

public profileImage(string $name, string $profile): bool

Parameters:

Parameter Type Description
$name string
$profile string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.profileimage.php -

quantizeImage

(PECL imagick 2.0.0)
Analyzes the colors within a reference image

public quantizeImage(int $numberColors, int $colorspace, int $treedepth, bool $dither, bool $measureError): bool

Parameters:

Parameter Type Description
$numberColors int
$colorspace int
$treedepth int
$dither bool
$measureError bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.quantizeimage.php -

quantizeImages

(PECL imagick 2.0.0)
Analyzes the colors within a sequence of images

public quantizeImages(int $numberColors, int $colorspace, int $treedepth, bool $dither, bool $measureError): bool

Parameters:

Parameter Type Description
$numberColors int
$colorspace int
$treedepth int
$dither bool
$measureError bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.quantizeimages.php -

reduceNoiseImage

(PECL imagick 2.0.0)
Smooths the contours of an image

public reduceNoiseImage(float $radius): bool

Parameters:

Parameter Type Description
$radius float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.reducenoiseimage.php -

removeImageProfile

(PECL imagick 2.0.0)
Removes the named image profile and returns it

public removeImageProfile(string $name): string

Parameters:

Parameter Type Description
$name string

Return Value:

a string containing the profile of the image.

See Also:

  • https://php.net/manual/en/imagick.removeimageprofile.php -

separateImageChannel

(PECL imagick 2.0.0)
Separates a channel from the image

public separateImageChannel(int $channel): bool

Parameters:

Parameter Type Description
$channel int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.separateimagechannel.php -

sepiaToneImage

(PECL imagick 2.0.0)
Sepia tones an image

public sepiaToneImage(float $threshold): bool

Parameters:

Parameter Type Description
$threshold float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sepiatoneimage.php -

setImageBias

(PECL imagick 2.0.0)
Sets the image bias for any method that convolves an image

public setImageBias(float $bias): bool

Parameters:

Parameter Type Description
$bias float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagebias.php -

setImageBluePrimary

(PECL imagick 2.0.0)
Sets the image chromaticity blue primary point

public setImageBluePrimary(float $x, float $y): bool

Parameters:

Parameter Type Description
$x float
$y float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageblueprimary.php -

setImageBorderColor

(PECL imagick 2.0.0)
Sets the image border color

public setImageBorderColor(mixed $border): bool

Parameters:

Parameter Type Description
$border mixed <p>
The border color
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagebordercolor.php -

setImageChannelDepth

(PECL imagick 2.0.0)
Sets the depth of a particular image channel

public setImageChannelDepth(int $channel, int $depth): bool

Parameters:

Parameter Type Description
$channel int
$depth int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagechanneldepth.php -

setImageColormapColor

(PECL imagick 2.0.0)
Sets the color of the specified colormap index

public setImageColormapColor(int $index, \ImagickPixel $color): bool

Parameters:

Parameter Type Description
$index int
$color \ImagickPixel

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagecolormapcolor.php -

setImageColorspace

(PECL imagick 2.0.0)
Sets the image colorspace

public setImageColorspace(int $colorspace): bool

Parameters:

Parameter Type Description
$colorspace int <p>
One of the COLORSPACE constants
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagecolorspace.php -

setImageDispose

(PECL imagick 2.0.0)
Sets the image disposal method

public setImageDispose(int $dispose): bool

Parameters:

Parameter Type Description
$dispose int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagedispose.php -

setImageExtent

(PECL imagick 2.0.0)
Sets the image size

public setImageExtent(int $columns, int $rows): bool

Parameters:

Parameter Type Description
$columns int
$rows int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageextent.php -

setImageGreenPrimary

(PECL imagick 2.0.0)
Sets the image chromaticity green primary point

public setImageGreenPrimary(float $x, float $y): bool

Parameters:

Parameter Type Description
$x float
$y float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagegreenprimary.php -

setImageInterlaceScheme

(PECL imagick 2.0.0)
Sets the image compression

public setImageInterlaceScheme(int $interlace_scheme): bool

Parameters:

Parameter Type Description
$interlace_scheme int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageinterlacescheme.php -

setImageProfile

(PECL imagick 2.0.0)
Adds a named profile to the Imagick object

public setImageProfile(string $name, string $profile): bool

Parameters:

Parameter Type Description
$name string
$profile string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageprofile.php -

setImageRedPrimary

(PECL imagick 2.0.0)
Sets the image chromaticity red primary point

public setImageRedPrimary(float $x, float $y): bool

Parameters:

Parameter Type Description
$x float
$y float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimageredprimary.php -

setImageRenderingIntent

(PECL imagick 2.0.0)
Sets the image rendering intent

public setImageRenderingIntent(int $rendering_intent): bool

Parameters:

Parameter Type Description
$rendering_intent int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagerenderingintent.php -

setImageVirtualPixelMethod

(PECL imagick 2.0.0)
Sets the image virtual pixel method

public setImageVirtualPixelMethod(int $method): bool

Parameters:

Parameter Type Description
$method int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagevirtualpixelmethod.php -

setImageWhitePoint

(PECL imagick 2.0.0)
Sets the image chromaticity white point

public setImageWhitePoint(float $x, float $y): bool

Parameters:

Parameter Type Description
$x float
$y float

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimagewhitepoint.php -

sigmoidalContrastImage

(PECL imagick 2.0.0)
Adjusts the contrast of an image

public sigmoidalContrastImage(bool $sharpen, float $alpha, float $beta, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$sharpen bool
$alpha float
$beta float
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.sigmoidalcontrastimage.php -

stereoImage

(PECL imagick 2.0.0)
Composites two images

public stereoImage(\Imagick $offset_wand): bool

Parameters:

Parameter Type Description
$offset_wand \Imagick

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.stereoimage.php -

textureImage

(PECL imagick 2.0.0)
Repeatedly tiles the texture image

public textureImage(\Imagick $texture_wand): bool

Parameters:

Parameter Type Description
$texture_wand \Imagick

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.textureimage.php -

tintImage

pplies a color vector to each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.

public tintImage(mixed $tint, mixed $opacity, bool $legacy = false): bool

If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0

Parameters:

Parameter Type Description
$tint mixed
$opacity mixed
$legacy bool [optional]

Return Value:

TRUE on success.

Throws:

Throws ImagickException on error

See Also:

  • https://php.net/manual/en/imagick.tintimage.php -

unsharpMaskImage

(PECL imagick 2.0.0)
Sharpens an image

public unsharpMaskImage(float $radius, float $sigma, float $amount, float $threshold, int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$radius float
$sigma float
$amount float
$threshold float
$channel int [optional]

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.unsharpmaskimage.php -

getImage

(PECL imagick 2.0.0)
Returns a new Imagick object

public getImage(): \Imagick

Return Value:

a new Imagick object with the current image sequence.

See Also:

  • https://php.net/manual/en/imagick.getimage.php -

addImage

(PECL imagick 2.0.0)
Adds new image to Imagick object image list

public addImage(\Imagick $source): bool

Parameters:

Parameter Type Description
$source \Imagick <p>
The source Imagick object
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.addimage.php -

setImage

(PECL imagick 2.0.0)
Replaces image in the object

public setImage(\Imagick $replace): bool

Parameters:

Parameter Type Description
$replace \Imagick <p>
The replace Imagick object
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setimage.php -

newImage

(PECL imagick 2.0.0)
Creates a new image

public newImage(int $cols, int $rows, mixed $background, string $format = null): bool

Parameters:

Parameter Type Description
$cols int <p>
Columns in the new image
</p>
$rows int <p>
Rows in the new image
</p>
$background mixed <p>
The background color used for this image
</p>
$format string [optional] <p>
Image format. This parameter was added in Imagick version 2.0.1.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.newimage.php -

newPseudoImage

(PECL imagick 2.0.0)
Creates a new image

public newPseudoImage(int $columns, int $rows, string $pseudoString): bool

Parameters:

Parameter Type Description
$columns int <p>
columns in the new image
</p>
$rows int <p>
rows in the new image
</p>
$pseudoString string <p>
string containing pseudo image definition.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.newpseudoimage.php -

getCompression

(PECL imagick 2.0.0)
Gets the object compression type

public getCompression(): int

Return Value:

the compression constant

See Also:

  • https://php.net/manual/en/imagick.getcompression.php -

getCompressionQuality

(PECL imagick 2.0.0)
Gets the object compression quality

public getCompressionQuality(): int

Return Value:

integer describing the compression quality

See Also:

  • https://php.net/manual/en/imagick.getcompressionquality.php -

getCopyright

(PECL imagick 2.0.0)
Returns the ImageMagick API copyright as a string

public static getCopyright(): string
  • This method is static.

Return Value:

a string containing the copyright notice of Imagemagick and Magickwand C API.

See Also:

  • https://php.net/manual/en/imagick.getcopyright.php -

getFilename

(PECL imagick 2.0.0)
The filename associated with an image sequence

public getFilename(): string

Return Value:

a string on success.

See Also:

  • https://php.net/manual/en/imagick.getfilename.php -

getFormat

(PECL imagick 2.0.0)
Returns the format of the Imagick object

public getFormat(): string

Return Value:

the format of the image.

See Also:

  • https://php.net/manual/en/imagick.getformat.php -

getHomeURL

(PECL imagick 2.0.0)
Returns the ImageMagick home URL

public static getHomeURL(): string
  • This method is static.

Return Value:

a link to the imagemagick homepage.

See Also:

  • https://php.net/manual/en/imagick.gethomeurl.php -

getInterlaceScheme

(PECL imagick 2.0.0)
Gets the object interlace scheme

public getInterlaceScheme(): int

Return Value:

Gets the wand interlace scheme.

See Also:

  • https://php.net/manual/en/imagick.getinterlacescheme.php -

getOption

(PECL imagick 2.0.0)
Returns a value associated with the specified key

public getOption(string $key): string

Parameters:

Parameter Type Description
$key string <p>
The name of the option
</p>

Return Value:

a value associated with a wand and the specified key.

See Also:

  • https://php.net/manual/en/imagick.getoption.php -

getPackageName

(PECL imagick 2.0.0)
Returns the ImageMagick package name

public static getPackageName(): string
  • This method is static.

Return Value:

the ImageMagick package name as a string.

See Also:

  • https://php.net/manual/en/imagick.getpackagename.php -

getPage

(PECL imagick 2.0.0)
Returns the page geometry

public getPage(): array

Return Value:

the page geometry associated with the Imagick object in an associative array with the keys "width", "height", "x", and "y", throwing ImagickException on error.

Throws:

on error

See Also:

  • https://php.net/manual/en/imagick.getpage.php -

getQuantumDepth

(PECL imagick 2.0.0)
Gets the quantum depth

public static getQuantumDepth(): array
  • This method is static.

Return Value:

the Imagick quantum depth as a string.

See Also:

  • https://php.net/manual/en/imagick.getquantumdepth.php -

getQuantumRange

(PECL imagick 2.0.0)
Returns the Imagick quantum range

public static getQuantumRange(): array
  • This method is static.

Return Value:

the Imagick quantum range as a string.

See Also:

  • https://php.net/manual/en/imagick.getquantumrange.php -

getReleaseDate

(PECL imagick 2.0.0)
Returns the ImageMagick release date

public static getReleaseDate(): string
  • This method is static.

Return Value:

the ImageMagick release date as a string.

See Also:

  • https://php.net/manual/en/imagick.getreleasedate.php -

getResource

(PECL imagick 2.0.0)
Returns the specified resource's memory usage

public static getResource(int $type): int
  • This method is static.

Parameters:

Parameter Type Description
$type int <p>
Refer to the list of resourcetype constants.
</p>

Return Value:

the specified resource's memory usage in megabytes.

See Also:

  • https://php.net/manual/en/imagick.getresource.php -

getResourceLimit

(PECL imagick 2.0.0)
Returns the specified resource limit

public static getResourceLimit(int $type): int
  • This method is static.

Parameters:

Parameter Type Description
$type int <p>
Refer to the list of resourcetype constants.
</p>

Return Value:

the specified resource limit in megabytes.

See Also:

  • https://php.net/manual/en/imagick.getresourcelimit.php -

getSamplingFactors

(PECL imagick 2.0.0)
Gets the horizontal and vertical sampling factor

public getSamplingFactors(): array

Return Value:

an associative array with the horizontal and vertical sampling factors of the image.

See Also:

  • https://php.net/manual/en/imagick.getsamplingfactors.php -

getSize

(PECL imagick 2.0.0)
Returns the size associated with the Imagick object

public getSize(): array

Return Value:

the size associated with the Imagick object as an array with the keys "columns" and "rows".

See Also:

  • https://php.net/manual/en/imagick.getsize.php -

getVersion

(PECL imagick 2.0.0)
Returns the ImageMagick API version

public static getVersion(): array
  • This method is static.

Return Value:

the ImageMagick API version as a string and as a number.

See Also:

  • https://php.net/manual/en/imagick.getversion.php -

setBackgroundColor

(PECL imagick 2.0.0)
Sets the object's default background color

public setBackgroundColor(mixed $background): bool

Parameters:

Parameter Type Description
$background mixed

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setbackgroundcolor.php -

setCompression

(PECL imagick 2.0.0)
Sets the object's default compression type

public setCompression(int $compression): bool

Parameters:

Parameter Type Description
$compression int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setcompression.php -

setCompressionQuality

(PECL imagick 0.9.10-0.9.9)
Sets the object's default compression quality

public setCompressionQuality(int $quality): bool

Parameters:

Parameter Type Description
$quality int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setcompressionquality.php -

setFilename

(PECL imagick 2.0.0)
Sets the filename before you read or write the image

public setFilename(string $filename): bool

Parameters:

Parameter Type Description
$filename string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setfilename.php -

setFormat

(PECL imagick 2.0.0)
Sets the format of the Imagick object

public setFormat(string $format): bool

Parameters:

Parameter Type Description
$format string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setformat.php -

setInterlaceScheme

(PECL imagick 2.0.0)
Sets the image compression

public setInterlaceScheme(int $interlace_scheme): bool

Parameters:

Parameter Type Description
$interlace_scheme int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setinterlacescheme.php -

setOption

(PECL imagick 2.0.0)
Set an option

public setOption(string $key, string $value): bool

Parameters:

Parameter Type Description
$key string
$value string

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setoption.php -

setPage

(PECL imagick 2.0.0)
Sets the page geometry of the Imagick object

public setPage(int $width, int $height, int $x, int $y): bool

Parameters:

Parameter Type Description
$width int
$height int
$x int
$y int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setpage.php -

setResourceLimit

(PECL imagick 2.0.0)
Sets the limit for a particular resource in megabytes

public static setResourceLimit(int $type, int $limit): bool
  • This method is static.

Parameters:

Parameter Type Description
$type int <p>
Refer to the list of resourcetype constants.
</p>
$limit int <p>
The resource limit. The unit depends on the type of the resource being limited.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setresourcelimit.php -

setResolution

(PECL imagick 2.0.0)
Sets the image resolution

public setResolution(float $x_resolution, float $y_resolution): bool

Parameters:

Parameter Type Description
$x_resolution float <p>
The horizontal resolution.
</p>
$y_resolution float <p>
The vertical resolution.
</p>

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setresolution.php -

setSamplingFactors

(PECL imagick 2.0.0)
Sets the image sampling factors

public setSamplingFactors(array $factors): bool

Parameters:

Parameter Type Description
$factors array

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setsamplingfactors.php -

setSize

(PECL imagick 2.0.0)
Sets the size of the Imagick object

public setSize(int $columns, int $rows): bool

Parameters:

Parameter Type Description
$columns int
$rows int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.setsize.php -

setType

(PECL imagick 2.0.0)
Sets the image type attribute

public setType(int $image_type): bool

Parameters:

Parameter Type Description
$image_type int

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.settype.php -

key

public key(): mixed

next

public next(): mixed

rewind

public rewind(): mixed

valid

(PECL imagick 2.0.0)
Checks if the current item is valid

public valid(): bool

Return Value:

TRUE on success.

See Also:

  • https://php.net/manual/en/imagick.valid.php -

current

(PECL imagick 2.0.0)
Returns a reference to the current Imagick object

public current(): \Imagick

Return Value:

self on success.

See Also:

  • https://php.net/manual/en/imagick.current.php -

brightnessContrastImage

Change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.

public brightnessContrastImage(string $brightness, string $contrast, int $CHANNEL = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$brightness string
$contrast string
$CHANNEL int [optional]

See Also:

  • https://php.net/manual/en/imagick.brightnesscontrastimage.php -

morphology

Applies a user supplied kernel to the image according to the given morphology method.

public morphology(int $morphologyMethod, int $iterations, \ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$morphologyMethod int Which morphology method to use one of the \Imagick::MORPHOLOGY_* constants.
$iterations int The number of iteration to apply the morphology function. A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
$ImagickKernel \ImagickKernel
$CHANNEL int [optional]

See Also:

  • https://php.net/manual/en/imagick.morphology.php -

filter

Applies a custom convolution kernel to the image.

public filter(\ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$ImagickKernel \ImagickKernel An instance of ImagickKernel that represents either a single kernel or a linked series of kernels.
$CHANNEL int [optional] Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants

See Also:

  • https://php.net/manual/en/imagick.filter.php -

colorMatrixImage

Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets).

public colorMatrixImage(string $color_matrix = Imagick::CHANNEL_DEFAULT): void

The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255)

Parameters:

Parameter Type Description
$color_matrix string

See Also:

  • https://php.net/manual/en/imagick.colormatriximage.php -

deleteImageProperty

Deletes an image property.

public deleteImageProperty(string $name): void

Parameters:

Parameter Type Description
$name string The name of the property to delete.

See Also:

  • https://php.net/manual/en/imagick.deleteimageproperty.php -

forwardFourierTransformimage

Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

public forwardFourierTransformimage(bool $magnitude): void

Parameters:

Parameter Type Description
$magnitude bool If true, return as magnitude / phase pair otherwise a real / imaginary image pair.

See Also:

  • https://php.net/manual/en/imagick.forwardfouriertransformimage.php -

getImageCompression

Gets the current image's compression type.

public getImageCompression(): int

See Also:

  • https://php.net/manual/en/imagick.getimagecompression.php -

getRegistry

Get the StringRegistry entry for the named key or false if not set.

public static getRegistry(string $key): string|false
  • This method is static.

Parameters:

Parameter Type Description
$key string

Throws:

Since version >=3.4.3. Throws an exception if the key does not exist, rather than terminating the program.

See Also:

  • https://php.net/manual/en/imagick.getregistry.php -

getQuantum

Returns the ImageMagick quantum range as an integer.

public static getQuantum(): int
  • This method is static.

See Also:

  • https://php.net/manual/en/imagick.getquantum.php -

identifyFormat

Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See https://www.imagemagick.org/script/escape.php for escape sequences.

public identifyFormat(string $embedText): bool

Parameters:

Parameter Type Description
$embedText string A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k".

See Also:

  • https://www.imagemagick.org/script/escape.php - * https://php.net/manual/en/imagick.identifyformat.php -

inverseFourierTransformImage

Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

public inverseFourierTransformImage(\Imagick $complement, bool $magnitude): void

Parameters:

Parameter Type Description
$complement \Imagick The second image to combine with this one to form either the magnitude / phase or real / imaginary image pair.
$magnitude bool If true, combine as magnitude / phase pair otherwise a real / imaginary image pair.

See Also:

  • https://php.net/manual/en/imagick.inversefouriertransformimage.php -

listRegistry

List all the registry settings. Returns an array of all the key/value pairs in the registry

public static listRegistry(): array
  • This method is static.

Return Value:

An array containing the key/values from the registry.

See Also:

  • https://php.net/manual/en/imagick.listregistry.php -

rotationalBlurImage

Rotational blurs an image.

public rotationalBlurImage(string $angle, string $CHANNEL = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$angle string
$CHANNEL string

See Also:

  • https://php.net/manual/en/imagick.rotationalblurimage.php -

selectiveBlurImage

Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

public selectiveBlurImage(float $radius, float $sigma, float $threshold, int $CHANNEL = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$radius float
$sigma float
$threshold float
$CHANNEL int Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants

See Also:

  • https://php.net/manual/en/imagick.selectiveblurimage.php -

setAntiAlias

Set whether antialiasing should be used for operations. On by default.

public setAntiAlias(bool $antialias): int

Parameters:

Parameter Type Description
$antialias bool

setImageBiasQuantum

public setImageBiasQuantum(string $bias): void

Parameters:

Parameter Type Description
$bias string

See Also:

  • https://php.net/manual/en/imagick.setimagebiasquantum.php -

setProgressMonitor

Set a callback that will be called during the processing of the Imagick image.

public setProgressMonitor(callable $callback): void

Parameters:

Parameter Type Description
$callback callable The progress function to call. It should return true if image processing should continue, or false if it should be cancelled.
The offset parameter indicates the progress and the span parameter indicates the total amount of work needed to be done.
<pre> bool callback ( mixed $offset , mixed $span ) </pre>
<b>Caution</b>
The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial.

See Also:

  • https://php.net/manual/en/imagick.setprogressmonitor.php -

setRegistry

Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs.

public static setRegistry(string $key, string $value): void
  • This method is static.

Parameters:

Parameter Type Description
$key string
$value string

See Also:

  • https://php.net/manual/en/imagick.setregistry.php -

statisticImage

Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

public statisticImage(int $type, int $width, int $height, int $channel = Imagick::CHANNEL_DEFAULT): void

Parameters:

Parameter Type Description
$type int
$width int
$height int
$channel int [optional]

See Also:

  • https://php.net/manual/en/imagick.statisticimage.php -

subImageMatch

Searches for a subimage in the current image and returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

public subImageMatch(\Imagick $imagick, array& $bestMatch, float& $similarity, float $similarity_threshold, int $metric): \Imagick

You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will be set to the 'score' of the similarity between the subimage and the matching position in the larger image, bestMatch will contain an associative array with elements x, y, width, height that describe the matching region.

Parameters:

Parameter Type Description
$imagick \Imagick
$bestMatch array [optional]
$similarity float [optional] A new image that displays the amount of similarity at each pixel.
$similarity_threshold float [optional] Only used if compiled with ImageMagick (library) > 7
$metric int [optional] Only used if compiled with ImageMagick (library) > 7

See Also:

  • https://php.net/manual/en/imagick.subimagematch.php -

similarityImage

Is an alias of Imagick::subImageMatch

public similarityImage(\Imagick $imagick, array& $bestMatch, float& $similarity, float $similarity_threshold, int $metric): \Imagick

Parameters:

Parameter Type Description
$imagick \Imagick
$bestMatch array [optional]
$similarity float [optional] A new image that displays the amount of similarity at each pixel.
$similarity_threshold float [optional]
$metric int [optional]

See Also:

  • \Imagick::subImageMatch() - This function is an alias of subImageMatch()

getConfigureOptions

Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.

public getConfigureOptions(): string

getFeatures

GetFeatures() returns the ImageMagick features that have been compiled into the runtime.

public getFeatures(): string

getHDRIEnabled

public getHDRIEnabled(): int

setImageChannelMask

Sets the image channel mask. Returns the previous set channel mask.

public setImageChannelMask(int $channel): mixed

Only works with Imagick >=7

Parameters:

Parameter Type Description
$channel int

evaluateImages

Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence

public evaluateImages(int $EVALUATE_CONSTANT): bool

Parameters:

Parameter Type Description
$EVALUATE_CONSTANT int

See Also:

  • https://www.imagemagick.org/Usage/layers/#evaluate-sequence -

autoGammaImage

Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately.

public autoGammaImage(int $channel = Imagick::CHANNEL_ALL): bool

Parameters:

Parameter Type Description
$channel int [optional] Default value Imagick::CHANNEL_ALL

autoOrient

Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation).

public autoOrient(): bool

compositeImageGravity

Composite one image onto another using the specified gravity.

public compositeImageGravity(\Imagick $imagick, int $COMPOSITE_CONSTANT, int $GRAVITY_CONSTANT): bool

Parameters:

Parameter Type Description
$imagick \Imagick
$COMPOSITE_CONSTANT int
$GRAVITY_CONSTANT int

localContrastImage

Attempts to increase the appearance of large-scale light-dark transitions.

public localContrastImage(float $radius, float $strength): bool

Parameters:

Parameter Type Description
$radius float
$strength float

identifyImageType

Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants

public identifyImageType(): int

setImageAlpha

Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity()

public setImageAlpha(float $alpha): bool

Parameters:

Parameter Type Description
$alpha float


Automatically generated on 2025-03-18