class Imagick implements Iterator, Countable (View source)

Constants

COLOR_BLACK

COLOR_BLUE

COLOR_CYAN

COLOR_GREEN

COLOR_RED

COLOR_YELLOW

COLOR_MAGENTA

COLOR_OPACITY

COLOR_ALPHA

COLOR_FUZZ

IMAGICK_EXTNUM

IMAGICK_EXTVER

QUANTUM_RANGE

USE_ZEND_MM

COMPOSITE_DEFAULT

COMPOSITE_UNDEFINED

COMPOSITE_NO

COMPOSITE_ADD

COMPOSITE_ATOP

COMPOSITE_BLEND

COMPOSITE_BUMPMAP

COMPOSITE_CLEAR

COMPOSITE_COLORBURN

COMPOSITE_COLORDODGE

COMPOSITE_COLORIZE

COMPOSITE_COPYBLACK

COMPOSITE_COPYBLUE

COMPOSITE_COPY

COMPOSITE_COPYCYAN

COMPOSITE_COPYGREEN

COMPOSITE_COPYMAGENTA

COMPOSITE_COPYOPACITY

COMPOSITE_COPYRED

COMPOSITE_COPYYELLOW

COMPOSITE_DARKEN

COMPOSITE_DSTATOP

COMPOSITE_DST

COMPOSITE_DSTIN

COMPOSITE_DSTOUT

COMPOSITE_DSTOVER

COMPOSITE_DIFFERENCE

COMPOSITE_DISPLACE

COMPOSITE_DISSOLVE

COMPOSITE_EXCLUSION

COMPOSITE_HARDLIGHT

COMPOSITE_HUE

COMPOSITE_IN

COMPOSITE_LIGHTEN

COMPOSITE_LUMINIZE

COMPOSITE_MINUS

COMPOSITE_MODULATE

COMPOSITE_MULTIPLY

COMPOSITE_OUT

COMPOSITE_OVER

COMPOSITE_OVERLAY

COMPOSITE_PLUS

COMPOSITE_REPLACE

COMPOSITE_SATURATE

COMPOSITE_SCREEN

COMPOSITE_SOFTLIGHT

COMPOSITE_SRCATOP

COMPOSITE_SRC

COMPOSITE_SRCIN

COMPOSITE_SRCOUT

COMPOSITE_SRCOVER

COMPOSITE_SUBTRACT

COMPOSITE_THRESHOLD

COMPOSITE_XOR

COMPOSITE_CHANGEMASK

COMPOSITE_LINEARLIGHT

COMPOSITE_DIVIDE

COMPOSITE_DISTORT

COMPOSITE_BLUR

COMPOSITE_PEGTOPLIGHT

COMPOSITE_VIVIDLIGHT

COMPOSITE_PINLIGHT

COMPOSITE_LINEARDODGE

COMPOSITE_LINEARBURN

COMPOSITE_MATHEMATICS

COMPOSITE_MODULUSADD

COMPOSITE_MODULUSSUBTRACT

COMPOSITE_MINUSDST

COMPOSITE_DIVIDEDST

COMPOSITE_DIVIDESRC

COMPOSITE_MINUSSRC

COMPOSITE_DARKENINTENSITY

COMPOSITE_LIGHTENINTENSITY

MONTAGEMODE_FRAME

MONTAGEMODE_UNFRAME

MONTAGEMODE_CONCATENATE

STYLE_NORMAL

STYLE_ITALIC

STYLE_OBLIQUE

STYLE_ANY

FILTER_UNDEFINED

FILTER_POINT

FILTER_BOX

FILTER_TRIANGLE

FILTER_HERMITE

FILTER_HANNING

FILTER_HAMMING

FILTER_BLACKMAN

FILTER_GAUSSIAN

FILTER_QUADRATIC

FILTER_CUBIC

FILTER_CATROM

FILTER_MITCHELL

FILTER_LANCZOS

FILTER_BESSEL

FILTER_SINC

FILTER_KAISER

FILTER_WELSH

FILTER_PARZEN

FILTER_LAGRANGE

FILTER_SENTINEL

FILTER_BOHMAN

FILTER_BARTLETT

FILTER_JINC

FILTER_SINCFAST

FILTER_ROBIDOUX

FILTER_LANCZOSSHARP

FILTER_LANCZOS2

FILTER_LANCZOS2SHARP

FILTER_ROBIDOUXSHARP

FILTER_COSINE

FILTER_SPLINE

FILTER_LANCZOSRADIUS

IMGTYPE_UNDEFINED

IMGTYPE_BILEVEL

IMGTYPE_GRAYSCALE

IMGTYPE_GRAYSCALEMATTE

IMGTYPE_PALETTE

IMGTYPE_PALETTEMATTE

IMGTYPE_TRUECOLOR

IMGTYPE_TRUECOLORMATTE

IMGTYPE_COLORSEPARATION

IMGTYPE_COLORSEPARATIONMATTE

IMGTYPE_OPTIMIZE

IMGTYPE_PALETTEBILEVELMATTE

RESOLUTION_UNDEFINED

RESOLUTION_PIXELSPERINCH

RESOLUTION_PIXELSPERCENTIMETER

COMPRESSION_UNDEFINED

COMPRESSION_NO

COMPRESSION_BZIP

COMPRESSION_FAX

COMPRESSION_GROUP4

COMPRESSION_JPEG

COMPRESSION_JPEG2000

COMPRESSION_LOSSLESSJPEG

COMPRESSION_LZW

COMPRESSION_RLE

COMPRESSION_ZIP

COMPRESSION_DXT1

COMPRESSION_DXT3

COMPRESSION_DXT5

COMPRESSION_ZIPS

COMPRESSION_PIZ

COMPRESSION_PXR24

COMPRESSION_B44

COMPRESSION_B44A

COMPRESSION_LZMA

COMPRESSION_JBIG1

COMPRESSION_JBIG2

PAINT_POINT

PAINT_REPLACE

PAINT_FLOODFILL

PAINT_FILLTOBORDER

PAINT_RESET

GRAVITY_NORTHWEST

GRAVITY_NORTH

GRAVITY_NORTHEAST

GRAVITY_WEST

GRAVITY_CENTER

GRAVITY_EAST

GRAVITY_SOUTHWEST

GRAVITY_SOUTH

GRAVITY_SOUTHEAST

GRAVITY_FORGET

GRAVITY_STATIC

STRETCH_NORMAL

STRETCH_ULTRACONDENSED

STRETCH_EXTRACONDENSED

STRETCH_CONDENSED

STRETCH_SEMICONDENSED

STRETCH_SEMIEXPANDED

STRETCH_EXPANDED

STRETCH_EXTRAEXPANDED

STRETCH_ULTRAEXPANDED

STRETCH_ANY

ALIGN_UNDEFINED

ALIGN_LEFT

ALIGN_CENTER

ALIGN_RIGHT

DECORATION_NO

DECORATION_UNDERLINE

DECORATION_OVERLINE

DECORATION_LINETROUGH

DECORATION_LINETHROUGH

NOISE_UNIFORM

NOISE_GAUSSIAN

NOISE_MULTIPLICATIVEGAUSSIAN

NOISE_IMPULSE

NOISE_LAPLACIAN

NOISE_POISSON

NOISE_RANDOM

CHANNEL_UNDEFINED

CHANNEL_RED

CHANNEL_GRAY

CHANNEL_CYAN

CHANNEL_GREEN

CHANNEL_MAGENTA

CHANNEL_BLUE

CHANNEL_YELLOW

CHANNEL_ALPHA

CHANNEL_OPACITY

CHANNEL_MATTE

CHANNEL_BLACK

CHANNEL_INDEX

CHANNEL_ALL

CHANNEL_DEFAULT

CHANNEL_RGBA

CHANNEL_TRUEALPHA

CHANNEL_RGBS

CHANNEL_GRAY_CHANNELS

CHANNEL_SYNC

CHANNEL_COMPOSITES

METRIC_UNDEFINED

METRIC_ABSOLUTEERRORMETRIC

METRIC_MEANABSOLUTEERROR

METRIC_MEANERRORPERPIXELMETRIC

METRIC_MEANSQUAREERROR

METRIC_PEAKABSOLUTEERROR

METRIC_PEAKSIGNALTONOISERATIO

METRIC_ROOTMEANSQUAREDERROR

METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC

METRIC_FUZZERROR

PIXEL_CHAR

PIXEL_DOUBLE

PIXEL_FLOAT

PIXEL_INTEGER

PIXEL_LONG

PIXEL_QUANTUM

PIXEL_SHORT

EVALUATE_UNDEFINED

EVALUATE_ADD

EVALUATE_AND

EVALUATE_DIVIDE

EVALUATE_LEFTSHIFT

EVALUATE_MAX

EVALUATE_MIN

EVALUATE_MULTIPLY

EVALUATE_OR

EVALUATE_RIGHTSHIFT

EVALUATE_SET

EVALUATE_SUBTRACT

EVALUATE_XOR

EVALUATE_POW

EVALUATE_LOG

EVALUATE_THRESHOLD

EVALUATE_THRESHOLDBLACK

EVALUATE_THRESHOLDWHITE

EVALUATE_GAUSSIANNOISE

EVALUATE_IMPULSENOISE

EVALUATE_LAPLACIANNOISE

EVALUATE_MULTIPLICATIVENOISE

EVALUATE_POISSONNOISE

EVALUATE_UNIFORMNOISE

EVALUATE_COSINE

EVALUATE_SINE

EVALUATE_ADDMODULUS

EVALUATE_MEAN

EVALUATE_ABS

EVALUATE_EXPONENTIAL

EVALUATE_MEDIAN

EVALUATE_SUM

COLORSPACE_UNDEFINED

COLORSPACE_RGB

COLORSPACE_GRAY

COLORSPACE_TRANSPARENT

COLORSPACE_OHTA

COLORSPACE_LAB

COLORSPACE_XYZ

COLORSPACE_YCBCR

COLORSPACE_YCC

COLORSPACE_YIQ

COLORSPACE_YPBPR

COLORSPACE_YUV

COLORSPACE_CMYK

COLORSPACE_SRGB

COLORSPACE_HSB

COLORSPACE_HSL

COLORSPACE_HWB

COLORSPACE_REC601LUMA

COLORSPACE_REC709LUMA

COLORSPACE_LOG

COLORSPACE_CMY

COLORSPACE_LUV

COLORSPACE_HCL

COLORSPACE_LCH

COLORSPACE_LMS

COLORSPACE_LCHAB

COLORSPACE_LCHUV

COLORSPACE_SCRGB

COLORSPACE_HSI

COLORSPACE_HSV

COLORSPACE_HCLP

COLORSPACE_YDBDR

COLORSPACE_REC601YCBCR

COLORSPACE_REC709YCBCR

VIRTUALPIXELMETHOD_UNDEFINED

VIRTUALPIXELMETHOD_BACKGROUND

VIRTUALPIXELMETHOD_CONSTANT

VIRTUALPIXELMETHOD_EDGE

VIRTUALPIXELMETHOD_MIRROR

VIRTUALPIXELMETHOD_TILE

VIRTUALPIXELMETHOD_TRANSPARENT

VIRTUALPIXELMETHOD_MASK

VIRTUALPIXELMETHOD_BLACK

VIRTUALPIXELMETHOD_GRAY

VIRTUALPIXELMETHOD_WHITE

VIRTUALPIXELMETHOD_HORIZONTALTILE

VIRTUALPIXELMETHOD_VERTICALTILE

VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE

VIRTUALPIXELMETHOD_VERTICALTILEEDGE

VIRTUALPIXELMETHOD_CHECKERTILE

PREVIEW_UNDEFINED

PREVIEW_ROTATE

PREVIEW_SHEAR

PREVIEW_ROLL

PREVIEW_HUE

PREVIEW_SATURATION

PREVIEW_BRIGHTNESS

PREVIEW_GAMMA

PREVIEW_SPIFF

PREVIEW_DULL

PREVIEW_GRAYSCALE

PREVIEW_QUANTIZE

PREVIEW_DESPECKLE

PREVIEW_REDUCENOISE

PREVIEW_ADDNOISE

PREVIEW_SHARPEN

PREVIEW_BLUR

PREVIEW_THRESHOLD

PREVIEW_EDGEDETECT

PREVIEW_SPREAD

PREVIEW_SOLARIZE

PREVIEW_SHADE

PREVIEW_RAISE

PREVIEW_SEGMENT

PREVIEW_SWIRL

PREVIEW_IMPLODE

PREVIEW_WAVE

PREVIEW_OILPAINT

PREVIEW_CHARCOALDRAWING

PREVIEW_JPEG

RENDERINGINTENT_UNDEFINED

RENDERINGINTENT_SATURATION

RENDERINGINTENT_PERCEPTUAL

RENDERINGINTENT_ABSOLUTE

RENDERINGINTENT_RELATIVE

INTERLACE_UNDEFINED

INTERLACE_NO

INTERLACE_LINE

INTERLACE_PLANE

INTERLACE_PARTITION

INTERLACE_GIF

INTERLACE_JPEG

INTERLACE_PNG

FILLRULE_UNDEFINED

FILLRULE_EVENODD

FILLRULE_NONZERO

PATHUNITS_UNDEFINED

PATHUNITS_USERSPACE

PATHUNITS_USERSPACEONUSE

PATHUNITS_OBJECTBOUNDINGBOX

LINECAP_UNDEFINED

LINECAP_BUTT

LINECAP_ROUND

LINECAP_SQUARE

LINEJOIN_UNDEFINED

LINEJOIN_MITER

LINEJOIN_ROUND

LINEJOIN_BEVEL

RESOURCETYPE_UNDEFINED

RESOURCETYPE_AREA

RESOURCETYPE_DISK

RESOURCETYPE_FILE

RESOURCETYPE_MAP

RESOURCETYPE_MEMORY

RESOURCETYPE_TIME

RESOURCETYPE_THROTTLE

RESOURCETYPE_THREAD

DISPOSE_UNRECOGNIZED

DISPOSE_UNDEFINED

DISPOSE_NONE

DISPOSE_BACKGROUND

DISPOSE_PREVIOUS

INTERPOLATE_UNDEFINED

INTERPOLATE_AVERAGE

INTERPOLATE_BICUBIC

INTERPOLATE_BILINEAR

INTERPOLATE_FILTER

INTERPOLATE_INTEGER

INTERPOLATE_MESH

INTERPOLATE_NEARESTNEIGHBOR

INTERPOLATE_SPLINE

LAYERMETHOD_UNDEFINED

LAYERMETHOD_COALESCE

LAYERMETHOD_COMPAREANY

LAYERMETHOD_COMPARECLEAR

LAYERMETHOD_COMPAREOVERLAY

LAYERMETHOD_DISPOSE

LAYERMETHOD_OPTIMIZE

LAYERMETHOD_OPTIMIZEPLUS

LAYERMETHOD_OPTIMIZETRANS

LAYERMETHOD_COMPOSITE

LAYERMETHOD_OPTIMIZEIMAGE

LAYERMETHOD_REMOVEDUPS

LAYERMETHOD_REMOVEZERO

LAYERMETHOD_TRIMBOUNDS

ORIENTATION_UNDEFINED

ORIENTATION_TOPLEFT

ORIENTATION_TOPRIGHT

ORIENTATION_BOTTOMRIGHT

ORIENTATION_BOTTOMLEFT

ORIENTATION_LEFTTOP

ORIENTATION_RIGHTTOP

ORIENTATION_RIGHTBOTTOM

ORIENTATION_LEFTBOTTOM

DISTORTION_UNDEFINED

DISTORTION_AFFINE

DISTORTION_AFFINEPROJECTION

DISTORTION_ARC

DISTORTION_BILINEAR

DISTORTION_PERSPECTIVE

DISTORTION_PERSPECTIVEPROJECTION

DISTORTION_SCALEROTATETRANSLATE

DISTORTION_POLYNOMIAL

DISTORTION_POLAR

DISTORTION_DEPOLAR

DISTORTION_BARREL

DISTORTION_SHEPARDS

DISTORTION_SENTINEL

DISTORTION_BARRELINVERSE

DISTORTION_BILINEARFORWARD

DISTORTION_BILINEARREVERSE

DISTORTION_RESIZE

DISTORTION_CYLINDER2PLANE

DISTORTION_PLANE2CYLINDER

LAYERMETHOD_MERGE

LAYERMETHOD_FLATTEN

LAYERMETHOD_MOSAIC

ALPHACHANNEL_ACTIVATE

ALPHACHANNEL_RESET

ALPHACHANNEL_SET

ALPHACHANNEL_UNDEFINED

ALPHACHANNEL_COPY

ALPHACHANNEL_DEACTIVATE

ALPHACHANNEL_EXTRACT

ALPHACHANNEL_OPAQUE

ALPHACHANNEL_SHAPE

ALPHACHANNEL_TRANSPARENT

SPARSECOLORMETHOD_UNDEFINED

SPARSECOLORMETHOD_BARYCENTRIC

SPARSECOLORMETHOD_BILINEAR

SPARSECOLORMETHOD_POLYNOMIAL

SPARSECOLORMETHOD_SPEPARDS

SPARSECOLORMETHOD_VORONOI

SPARSECOLORMETHOD_INVERSE

DITHERMETHOD_UNDEFINED

DITHERMETHOD_NO

DITHERMETHOD_RIEMERSMA

DITHERMETHOD_FLOYDSTEINBERG

FUNCTION_UNDEFINED

FUNCTION_POLYNOMIAL

FUNCTION_SINUSOID

ALPHACHANNEL_BACKGROUND

FUNCTION_ARCSIN

FUNCTION_ARCTAN

ALPHACHANNEL_FLATTEN

ALPHACHANNEL_REMOVE

STATISTIC_GRADIENT

STATISTIC_MAXIMUM

STATISTIC_MEAN

STATISTIC_MEDIAN

STATISTIC_MINIMUM

STATISTIC_MODE

STATISTIC_NONPEAK

STATISTIC_STANDARD_DEVIATION

MORPHOLOGY_CONVOLVE

MORPHOLOGY_CORRELATE

MORPHOLOGY_ERODE

MORPHOLOGY_DILATE

MORPHOLOGY_ERODE_INTENSITY

MORPHOLOGY_DILATE_INTENSITY

MORPHOLOGY_DISTANCE

MORPHOLOGY_OPEN

MORPHOLOGY_CLOSE

MORPHOLOGY_OPEN_INTENSITY

MORPHOLOGY_CLOSE_INTENSITY

MORPHOLOGY_SMOOTH

MORPHOLOGY_EDGE_IN

MORPHOLOGY_EDGE_OUT

MORPHOLOGY_EDGE

MORPHOLOGY_TOP_HAT

MORPHOLOGY_BOTTOM_HAT

MORPHOLOGY_HIT_AND_MISS

MORPHOLOGY_THINNING

MORPHOLOGY_THICKEN

MORPHOLOGY_VORONOI

MORPHOLOGY_ITERATIVE

KERNEL_UNITY

KERNEL_GAUSSIAN

KERNEL_DIFFERENCE_OF_GAUSSIANS

KERNEL_LAPLACIAN_OF_GAUSSIANS

KERNEL_BLUR

KERNEL_COMET

KERNEL_LAPLACIAN

KERNEL_SOBEL

KERNEL_FREI_CHEN

KERNEL_ROBERTS

KERNEL_PREWITT

KERNEL_COMPASS

KERNEL_KIRSCH

KERNEL_DIAMOND

KERNEL_SQUARE

KERNEL_RECTANGLE

KERNEL_OCTAGON

KERNEL_DISK

KERNEL_PLUS

KERNEL_CROSS

KERNEL_RING

KERNEL_PEAKS

KERNEL_EDGES

KERNEL_CORNERS

KERNEL_DIAGONALS

KERNEL_LINE_ENDS

KERNEL_LINE_JUNCTIONS

KERNEL_RIDGES

KERNEL_CONVEX_HULL

KERNEL_THIN_SE

KERNEL_SKELETON

KERNEL_CHEBYSHEV

KERNEL_MANHATTAN

KERNEL_OCTAGONAL

KERNEL_EUCLIDEAN

KERNEL_USER_DEFINED

KERNEL_BINOMIAL

DIRECTION_LEFT_TO_RIGHT

DIRECTION_RIGHT_TO_LEFT

NORMALIZE_KERNEL_NONE

NORMALIZE_KERNEL_VALUE

NORMALIZE_KERNEL_CORRELATE

NORMALIZE_KERNEL_PERCENT

Methods

bool
optimizeImageLayers()

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

compareImageLayers(int $method)

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

bool
pingImageBlob(string $image)

(PECL imagick 2.0.0)
Quickly fetch attributes

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

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

bool
transposeImage()

(PECL imagick 2.0.0)
Creates a vertical mirror image

bool
transverseImage()

(PECL imagick 2.0.0)
Creates a horizontal mirror image

bool
trimImage(float $fuzz)

(PECL imagick 2.0.0)
Remove edges from the image

bool
waveImage(float $amplitude, float $length)

(PECL imagick 2.0.0)
Applies wave filter to the image

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

(PECL imagick 2.0.0)
Adds vignette filter to the image

bool
uniqueImageColors()

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

bool
getImageMatte()

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

bool
setImageMatte(bool $matte)

(PECL imagick 2.0.0)
Sets the image matte channel

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

Adaptively resize image with data dependent triangulation

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

(PECL imagick 2.0.0)
Simulates a pencil sketch

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

(PECL imagick 2.0.0)
Creates a 3D effect

int
getSizeOffset()

(PECL imagick 2.0.0)
Returns the size offset

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

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

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

(PECL imagick 2.0.0)
Adds adaptive blur filter to image

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

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

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

(PECL imagick 2.0.0)
Adaptively sharpen the image

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

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

roundCornersImage($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection)

No description

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

(PECL imagick 2.0.0)
Rounds image corners Alias to {Imagick::roundCornersImage}

bool
setIteratorIndex(int $index)

(PECL imagick 2.0.0)
Set the iterator position

int
getIteratorIndex()

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

transformImage(string $crop, string $geometry)

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

bool
setImageOpacity(float $opacity)

(PECL imagick 2.0.0)
Sets the image opacity level

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

(PECL imagick 2.2.2)
Performs an ordered dither

bool
polaroidImage(ImagickDraw $properties, float $angle)

(PECL imagick 2.0.0)
Simulates a Polaroid picture

string|false
getImageProperty(string $name)

(PECL imagick 2.0.0)
Returns the named image property

bool
setImageProperty(string $name, string $value)

(PECL imagick 2.0.0)
Sets an image property

bool
setImageInterpolateMethod(int $method)

(PECL imagick 2.0.0)
Sets the image interpolate pixel method

int
getImageInterpolateMethod()

(PECL imagick 2.0.0)
Returns the interpolation method

bool
linearStretchImage(float $blackPoint, float $whitePoint)

(PECL imagick 2.0.0)
Stretches with saturation the image intensity

int
getImageLength()

(PECL imagick 2.0.0)
Returns the image length in bytes

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

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

int
getImageOrientation()

(PECL imagick 2.0.0)
Gets the image orientation

bool
setImageOrientation(int $orientation)

(PECL imagick 2.0.0)
Sets the image orientation

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

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

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

(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.

array
getImageProperties(string $pattern = "*", bool $only_names = true)

(PECL imagick 2.0.0)
Returns the image properties

array
getImageProfiles(string $pattern = "*", bool $include_values = true)

(PECL imagick 2.2.0)
Returns the image profiles

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

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

bool
writeImageFile(resource $filehandle, string|null $format = null)

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

bool
writeImagesFile(resource $filehandle, string|null $format = null)

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

bool
resetImagePage(string $page)

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

bool
setImageClipMask(Imagick $clip_mask)

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

getImageClipMask()

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

bool
animateImages(string $x_server)

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

bool
recolorImage(array $matrix)

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

bool
setFont(string $font)

(PECL imagick 2.1.0)
Sets font

string|false
getFont()

(PECL imagick 2.1.0)
Gets font

bool
setPointSize(float $point_size)

(PECL imagick 2.1.0)
Sets point size

float
getPointSize()

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

mergeImageLayers(int $layer_method)

(PECL imagick 2.1.0)
Merges image layers

bool
setImageAlphaChannel(int $mode)

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

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

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

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

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

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

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

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

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

bool
encipherImage(string $passphrase)

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

bool
decipherImage(string $passphrase)

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

bool
setGravity(int $gravity)

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

int
getGravity()

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

float[]
getImageChannelRange(int $channel)

(PECL imagick 2.2.1)
Gets channel range

bool
getImageAlphaChannel()

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

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

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

bool
setImageGravity(int $gravity)

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

int
getImageGravity()

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

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

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

bool
deskewImage(float $threshold)

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

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

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

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

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

bool
remapImage(Imagick $replacement, int $DITHER)

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

int[]
exportImagePixels(int $x, int $y, int $width, int $height, string $map, int $STORAGE)

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

float[]
getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT)

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

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

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

bool
transformImageColorspace($COLORSPACE)

Transform image colorspace

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

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

bool
autoLevelImage($CHANNEL)

Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

bool
blueShiftImage(float $factor)

No description

string
getImageArtifact(string $artifact)

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

bool
setImageArtifact(string $artifact, string $value)

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

bool
deleteImageArtifact(string $artifact)

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

int
getColorspace()

(PECL imagick 0.9.10-0.9.9)
Gets the colorspace

bool
setColorspace(int $COLORSPACE)

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

clampImage($CHANNEL)

No description

smushImages(bool $stack, int $offset)

No description

__construct(mixed $files = null)

(PECL imagick 2.0.0)
The Imagick constructor

string
__toString()

No description

int
count()

Count elements of an object

getPixelIterator()

(PECL imagick 2.0.0)
Returns a MagickPixelIterator

getPixelRegionIterator(int $x, int $y, int $columns, int $rows)

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

bool
readImage(string $filename)

(PECL imagick 0.9.0-0.9.9)
Reads image from filename

readImages($filenames)

No description

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

(PECL imagick 2.0.0)
Reads image from a binary string

bool
setImageFormat(string $format)

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

bool
scaleImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false)

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.

bool
writeImage(string $filename = null)

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

bool
writeImages(string $filename, bool $adjoin)

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

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

(PECL imagick 2.0.0)
Adds blur filter to image

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

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.

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

Creates a cropped thumbnail at the requested size.

string
getImageFilename()

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

bool
setImageFilename(string $filename)

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

string
getImageFormat()

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

string
getImageMimeType()

No description

bool
removeImage()

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

bool
destroy()

(PECL imagick 2.0.0)
Destroys the Imagick object

bool
clear()

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

int
getImageSize()

(PECL imagick 2.0.0)
Returns the image length in bytes

string
getImageBlob()

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

string
getImagesBlob()

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

bool
setFirstIterator()

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

bool
setLastIterator()

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

resetIterator()

No description

bool
previousImage()

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

bool
nextImage()

(PECL imagick 2.0.0)
Moves to the next image

bool
hasPreviousImage()

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

bool
hasNextImage()

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

bool
setImageIndex(int $index)

(PECL imagick 2.0.0)
Set the iterator position

int
getImageIndex()

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

bool
commentImage(string $comment)

(PECL imagick 2.0.0)
Adds a comment to your image

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

(PECL imagick 2.0.0)
Extracts a region of the image

bool
labelImage(string $label)

(PECL imagick 2.0.0)
Adds a label to an image

int[]
getImageGeometry()

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

bool
drawImage(ImagickDraw $draw)

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

bool
setImageCompressionQuality(int $quality)

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

int
getImageCompressionQuality()

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

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

(PECL imagick 2.0.0)
Annotates an image with text

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

(PECL imagick 2.0.0)
Composite one image onto another

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

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

int
getImageColors()

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

montageImage(ImagickDraw $draw, string $tile_geometry, string $thumbnail_geometry, int $mode, string $frame)

(PECL imagick 2.0.0)
Creates a composite image

array
identifyImage(bool $appendRawOutput = false)

(PECL imagick 2.0.0)
Identifies an image and fetches attributes

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

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

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

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

bool
blackThresholdImage(mixed $threshold)

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

bool
whiteThresholdImage(mixed $threshold)

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

appendImages(bool $stack = false)

(PECL imagick 2.0.0)
Append a set of images

bool
charcoalImage(float $radius, float $sigma)

(PECL imagick 2.0.0)
Simulates a charcoal drawing

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

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

bool
oilPaintImage(float $radius)

(PECL imagick 2.0.0)
Simulates an oil painting

bool
posterizeImage(int $levels, bool $dither)

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

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

(PECL imagick 2.0.0)
Radial blurs an image

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

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

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

(PECL imagick 2.0.0)
Resample image to desired resolution

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

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.

bool
rollImage(int $x, int $y)

(PECL imagick 2.0.0)
Offsets an image

bool
rotateImage(mixed $background, float $degrees)

(PECL imagick 2.0.0)
Rotates an image

bool
sampleImage(int $columns, int $rows)

(PECL imagick 2.0.0)
Scales an image with pixel sampling

bool
solarizeImage(int $threshold)

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

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

(PECL imagick 2.0.0)
Simulates an image shadow

bool
setImageAttribute(string $key, string $value)

No description

bool
setImageBackgroundColor(mixed $background)

(PECL imagick 2.0.0)
Sets the image background color

bool
setImageCompose(int $compose)

(PECL imagick 2.0.0)
Sets the image composite operator

bool
setImageCompression(int $compression)

(PECL imagick 2.0.0)
Sets the image compression

bool
setImageDelay(int $delay)

(PECL imagick 2.0.0)
Sets the image delay

bool
setImageDepth(int $depth)

(PECL imagick 2.0.0)
Sets the image depth

bool
setImageGamma(float $gamma)

(PECL imagick 2.0.0)
Sets the image gamma

bool
setImageIterations(int $iterations)

(PECL imagick 2.0.0)
Sets the image iterations

bool
setImageMatteColor(mixed $matte)

(PECL imagick 2.0.0)
Sets the image matte color

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

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

setImageProgressMonitor($filename)

No description

bool
setImageResolution(float $x_resolution, float $y_resolution)

(PECL imagick 2.0.0)
Sets the image resolution

bool
setImageScene(int $scene)

(PECL imagick 2.0.0)
Sets the image scene

bool
setImageTicksPerSecond(int $ticks_per_second)

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

bool
setImageType(int $image_type)

(PECL imagick 2.0.0)
Sets the image type

bool
setImageUnits(int $units)

(PECL imagick 2.0.0)
Sets the image units of resolution

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

(PECL imagick 2.0.0)
Sharpens an image

bool
shaveImage(int $columns, int $rows)

(PECL imagick 2.0.0)
Shaves pixels from the image edges

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

(PECL imagick 2.0.0)
Creating a parallelogram

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

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

bool
pingImage(string $filename)

(PECL imagick 2.0.0)
Fetch basic attributes about the image

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

(PECL imagick 2.0.0)
Reads image from open filehandle

bool
displayImage(string $servername)

(PECL imagick 2.0.0)
Displays an image

bool
displayImages(string $servername)

(PECL imagick 2.0.0)
Displays an image or image sequence

bool
spreadImage(float $radius)

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

bool
swirlImage(float $degrees)

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

bool
stripImage()

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

static array
queryFormats(string $pattern = "*")

(PECL imagick 2.0.0)
Returns formats supported by Imagick

static array
queryFonts(string $pattern = "*")

(PECL imagick 2.0.0)
Returns the configured fonts

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

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

steganoImage(Imagick $watermark_wand, int $offset)

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

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

(PECL imagick 2.0.0)
Adds random noise to the image

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

(PECL imagick 2.0.0)
Simulates motion blur

mosaicImages()

(PECL imagick 2.0.0)
Forms a mosaic from images

morphImages(int $number_frames)

(PECL imagick 2.0.0)
Method morphs a set of images

bool
minifyImage()

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

bool
affineTransformImage(ImagickDraw $matrix)

(PECL imagick 2.0.0)
Transforms an image

averageImages()

(PECL imagick 2.0.0)
Average a set of images

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

(PECL imagick 2.0.0)
Surrounds the image with a border

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

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

bool
clipImage()

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

bool
clipPathImage(string $pathname, bool $inside)

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

clipImagePath(string $pathname, string $inside)

Alias to {Imagick::clipPathImage}

coalesceImages()

(PECL imagick 2.0.0)
Composites a set of images

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

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

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

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

array
compareImageChannels(Imagick $image, int $channelType, int $metricType)

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

array
compareImages(Imagick $compare, int $metric)

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

bool
contrastImage(bool $sharpen)

(PECL imagick 2.0.0)
Change the contrast of the image

combineImages(int $channelType)

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

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

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

bool
cycleColormapImage(int $displace)

(PECL imagick 2.0.0)
Displaces an image's colormap

deconstructImages()

(PECL imagick 2.0.0)
Returns certain pixel differences between images

bool
despeckleImage()

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

bool
edgeImage(float $radius)

(PECL imagick 2.0.0)
Enhance edges within the image

bool
embossImage(float $radius, float $sigma)

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

bool
enhanceImage()

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

bool
equalizeImage()

(PECL imagick 2.0.0)
Equalizes the image histogram

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

(PECL imagick 2.0.0)
Applies an expression to an image

flattenImages()

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

bool
flipImage()

(PECL imagick 2.0.0)
Creates a vertical mirror image

bool
flopImage()

(PECL imagick 2.0.0)
Creates a horizontal mirror image

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

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

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

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

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

(PECL imagick 2.0.0)
Gamma-corrects an image

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

(PECL imagick 2.0.0)
Blurs an image

string
getImageAttribute(string $key)

No description

getImageBackgroundColor()

(PECL imagick 2.0.0)
Returns the image background color

float[]
getImageBluePrimary()

(PECL imagick 2.0.0)
Returns the chromaticy blue primary point

getImageBorderColor()

(PECL imagick 2.0.0)
Returns the image border color

int
getImageChannelDepth(int $channel)

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

float
getImageChannelDistortion(Imagick $reference, int $channel, int $metric)

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

int[]
getImageChannelExtrema(int $channel)

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

float[]
getImageChannelMean(int $channel)

(PECL imagick 2.0.0)
Gets the mean and standard deviation

array
getImageChannelStatistics()

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

getImageColormapColor(int $index)

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

int
getImageColorspace()

(PECL imagick 2.0.0)
Gets the image colorspace

int
getImageCompose()

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

int
getImageDelay()

(PECL imagick 2.0.0)
Gets the image delay

int
getImageDepth()

(PECL imagick 0.9.1-0.9.9)
Gets the image depth

float
getImageDistortion(Imagick $reference, int $metric)

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

int[]
getImageExtrema()

(PECL imagick 2.0.0)
Gets the extrema for the image

int
getImageDispose()

(PECL imagick 2.0.0)
Gets the image disposal method

float
getImageGamma()

(PECL imagick 2.0.0)
Gets the image gamma

float[]
getImageGreenPrimary()

(PECL imagick 2.0.0)
Returns the chromaticy green primary point

int
getImageHeight()

(PECL imagick 2.0.0)
Returns the image height

array
getImageHistogram()

(PECL imagick 2.0.0)
Gets the image histogram

int
getImageInterlaceScheme()

(PECL imagick 2.0.0)
Gets the image interlace scheme

int
getImageIterations()

(PECL imagick 2.0.0)
Gets the image iterations

getImageMatteColor()

(PECL imagick 2.0.0)
Returns the image matte color

int[]
getImagePage()

(PECL imagick 2.0.0)
Returns the page geometry

getImagePixelColor(int $x, int $y)

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

string
getImageProfile(string $name)

(PECL imagick 2.0.0)
Returns the named image profile

float[]
getImageRedPrimary()

(PECL imagick 2.0.0)
Returns the chromaticity red primary point

int
getImageRenderingIntent()

(PECL imagick 2.0.0)
Gets the image rendering intent

float[]
getImageResolution()

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

int
getImageScene()

(PECL imagick 2.0.0)
Gets the image scene

string
getImageSignature()

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

int
getImageTicksPerSecond()

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

int
getImageType()

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

int
getImageUnits()

(PECL imagick 2.0.0)
Gets the image units of resolution

int
getImageVirtualPixelMethod()

(PECL imagick 2.0.0)
Returns the virtual pixel method

float[]
getImageWhitePoint()

(PECL imagick 2.0.0)
Returns the chromaticity white point

int
getImageWidth()

(PECL imagick 2.0.0)
Returns the image width

int
getNumberImages()

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

float
getImageTotalInkDensity()

(PECL imagick 2.0.0)
Gets the image total ink density

getImageRegion(int $width, int $height, int $x, int $y)

(PECL imagick 2.0.0)
Extracts a region of the image

bool
implodeImage(float $radius)

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

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

(PECL imagick 2.0.0)
Adjusts the levels of an image

bool
magnifyImage()

(PECL imagick 2.0.0)
Scales an image proportionally 2x

bool
mapImage(Imagick $map, bool $dither)

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

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

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

bool
medianFilterImage(float $radius)

(PECL imagick 2.0.0)
Applies a digital filter

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

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

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

(PECL imagick 2.0.0)
Change any pixel that matches color

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

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

bool
previewImages(int $preview)

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

bool
profileImage(string $name, string $profile)

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

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

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

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

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

bool
reduceNoiseImage(float $radius)

(PECL imagick 2.0.0)
Smooths the contours of an image

string
removeImageProfile(string $name)

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

bool
separateImageChannel(int $channel)

(PECL imagick 2.0.0)
Separates a channel from the image

bool
sepiaToneImage(float $threshold)

(PECL imagick 2.0.0)
Sepia tones an image

bool
setImageBias(float $bias)

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

bool
setImageBluePrimary(float $x, float $y)

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

bool
setImageBorderColor(mixed $border)

(PECL imagick 2.0.0)
Sets the image border color

bool
setImageChannelDepth(int $channel, int $depth)

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

bool
setImageColormapColor(int $index, ImagickPixel $color)

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

bool
setImageColorspace(int $colorspace)

(PECL imagick 2.0.0)
Sets the image colorspace

bool
setImageDispose(int $dispose)

(PECL imagick 2.0.0)
Sets the image disposal method

bool
setImageExtent(int $columns, int $rows)

(PECL imagick 2.0.0)
Sets the image size

bool
setImageGreenPrimary(float $x, float $y)

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

bool
setImageInterlaceScheme(int $interlace_scheme)

(PECL imagick 2.0.0)
Sets the image compression

bool
setImageProfile(string $name, string $profile)

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

bool
setImageRedPrimary(float $x, float $y)

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

bool
setImageRenderingIntent(int $rendering_intent)

(PECL imagick 2.0.0)
Sets the image rendering intent

bool
setImageVirtualPixelMethod(int $method)

(PECL imagick 2.0.0)
Sets the image virtual pixel method

bool
setImageWhitePoint(float $x, float $y)

(PECL imagick 2.0.0)
Sets the image chromaticity white point

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

(PECL imagick 2.0.0)
Adjusts the contrast of an image

bool
stereoImage(Imagick $offset_wand)

(PECL imagick 2.0.0)
Composites two images

textureImage(Imagick $texture_wand)

(PECL imagick 2.0.0)
Repeatedly tiles the texture image

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

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.

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

(PECL imagick 2.0.0)
Sharpens an image

getImage()

(PECL imagick 2.0.0)
Returns a new Imagick object

bool
addImage(Imagick $source)

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

bool
setImage(Imagick $replace)

(PECL imagick 2.0.0)
Replaces image in the object

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

(PECL imagick 2.0.0)
Creates a new image

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

(PECL imagick 2.0.0)
Creates a new image

int
getCompression()

(PECL imagick 2.0.0)
Gets the object compression type

int
getCompressionQuality()

(PECL imagick 2.0.0)
Gets the object compression quality

static string
getCopyright()

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

string
getFilename()

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

string
getFormat()

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

static string
getHomeURL()

(PECL imagick 2.0.0)
Returns the ImageMagick home URL

int
getInterlaceScheme()

(PECL imagick 2.0.0)
Gets the object interlace scheme

string
getOption(string $key)

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

static string
getPackageName()

(PECL imagick 2.0.0)
Returns the ImageMagick package name

int[]
getPage()

(PECL imagick 2.0.0)
Returns the page geometry

static array
getQuantumDepth()

(PECL imagick 2.0.0)
Gets the quantum depth

static array
getQuantumRange()

(PECL imagick 2.0.0)
Returns the Imagick quantum range

static string
getReleaseDate()

(PECL imagick 2.0.0)
Returns the ImageMagick release date

static int
getResource(int $type)

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

static int
getResourceLimit(int $type)

(PECL imagick 2.0.0)
Returns the specified resource limit

array
getSamplingFactors()

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

int[]
getSize()

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

static array
getVersion()

(PECL imagick 2.0.0)
Returns the ImageMagick API version

bool
setBackgroundColor(mixed $background)

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

bool
setCompression(int $compression)

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

bool
setCompressionQuality(int $quality)

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

bool
setFilename(string $filename)

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

bool
setFormat(string $format)

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

bool
setInterlaceScheme(int $interlace_scheme)

(PECL imagick 2.0.0)
Sets the image compression

bool
setOption(string $key, string $value)

(PECL imagick 2.0.0)
Set an option

bool
setPage(int $width, int $height, int $x, int $y)

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

static bool
setResourceLimit(int $type, int $limit)

(PECL imagick 2.0.0)
Sets the limit for a particular resource in megabytes

bool
setResolution(float $x_resolution, float $y_resolution)

(PECL imagick 2.0.0)
Sets the image resolution

bool
setSamplingFactors(array $factors)

(PECL imagick 2.0.0)
Sets the image sampling factors

bool
setSize(int $columns, int $rows)

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

bool
setType(int $image_type)

(PECL imagick 2.0.0)
Sets the image type attribute

mixed
key()

Return the key of the current element

void
next()

Move forward to next element

void
rewind()

Rewind the Iterator to the first element

bool
valid()

(PECL imagick 2.0.0)
Checks if the current item is valid

mixed
current()

(PECL imagick 2.0.0)
Returns a reference to the current Imagick object

void
brightnessContrastImage(float $brightness, float $contrast, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

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.

void
morphology(int $morphologyMethod, int $iterations, ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Applies a user supplied kernel to the image according to the given morphology method.

void
filter(ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Applies a custom convolution kernel to the image.

void
colorMatrixImage(array $color_matrix = Imagick::CHANNEL_DEFAULT)

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).

void
deleteImageProperty(string $name)

Deletes an image property.

void
forwardFourierTransformimage(bool $magnitude)

Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

int
getImageCompression()

Gets the current image's compression type.

static string|false
getRegistry(string $key)

Get the StringRegistry entry for the named key or false if not set.

static int
getQuantum()

Returns the ImageMagick quantum range as an integer.

bool
identifyFormat(string $embedText)

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.

void
inverseFourierTransformImage(Imagick $complement, bool $magnitude)

Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

static array
listRegistry()

List all the registry settings. Returns an array of all the key/value pairs in the registry

void
rotationalBlurImage(float $angle, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Rotational blurs an image.

void
selectiveBlurImage(float $radius, float $sigma, float $threshold, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

int
setAntiAlias(bool $antialias)

Set whether antialiasing should be used for operations. On by default.

void
setImageBiasQuantum(string $bias)

No description

void
setProgressMonitor(callable $callback)

Set a callback that will be called during the processing of the Imagick image.

static void
setRegistry(string $key, string $value)

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.

void
statisticImage(int $type, int $width, int $height, int $channel = Imagick::CHANNEL_DEFAULT)

Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

subImageMatch(Imagick $imagick, array $bestMatch, float $similarity, float $similarity_threshold, int $metric)

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.

similarityImage(Imagick $imagick, array $bestMatch, float $similarity, float $similarity_threshold, int $metric)

Is an alias of Imagick::subImageMatch

static array<string,string>
getConfigureOptions()

Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.

string
getFeatures()

GetFeatures() returns the ImageMagick features that have been compiled into the runtime.

int
getHDRIEnabled()

No description

setImageChannelMask(int $channel)

Sets the image channel mask. Returns the previous set channel mask.

bool
evaluateImages(int $EVALUATE_CONSTANT)

Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence

bool
autoGammaImage(int $channel = Imagick::CHANNEL_ALL)

Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately.

bool
autoOrient()

Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation).

bool
compositeImageGravity(Imagick $imagick, int $COMPOSITE_CONSTANT, int $GRAVITY_CONSTANT)

Composite one image onto another using the specified gravity.

bool
localContrastImage(float $radius, float $strength)

Attempts to increase the appearance of large-scale light-dark transitions.

int
identifyImageType()

Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants

bool
setImageAlpha(float $alpha)

Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity()

clone() $PECL imagick 2.0.0)


Makes an exact copy of the Imagick object

Details

bool optimizeImageLayers()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick compareImageLayers(int $method)

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

Parameters

int $method

One of the layer method constants.

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

bool pingImageBlob(string $image)

(PECL imagick 2.0.0)
Quickly fetch attributes

Parameters

string $image

A string containing the image.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

resource $filehandle

An open filehandle to the image.

string $fileName

[optional]

Optional filename for this image.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool transposeImage()

(PECL imagick 2.0.0)
Creates a vertical mirror image

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool transverseImage()

(PECL imagick 2.0.0)
Creates a horizontal mirror image

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool trimImage(float $fuzz)

(PECL imagick 2.0.0)
Remove edges from the image

Parameters

float $fuzz

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool waveImage(float $amplitude, float $length)

(PECL imagick 2.0.0)
Applies wave filter to the image

Parameters

float $amplitude

The amplitude of the wave.

float $length

The length of the wave.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adds vignette filter to the image

Parameters

float $blackPoint

The black point.

float $whitePoint

The white point

int $x

X offset of the ellipse

int $y

Y offset of the ellipse

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool uniqueImageColors()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool getImageMatte()

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

Return Value

bool

TRUE on success or FALSE on failure.

Exceptions

ImagickException

bool setImageMatte(bool $matte)

(PECL imagick 2.0.0)
Sets the image matte channel

Parameters

bool $matte

True activates the matte channel and false disables it.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

Adaptively resize image with data dependent triangulation

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

int $columns

The number of columns in the scaled image.

int $rows

The number of rows in the scaled image.

bool $bestfit

[optional] Whether to fit the image inside a bounding box.
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.

bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on success

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Simulates a pencil sketch

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel

float $sigma

The standard deviation of the Gaussian, in pixels.

float $angle

Apply the effect along this angle.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Creates a 3D effect

Parameters

bool $gray

A value other than zero shades the intensity of each pixel.

float $azimuth

Defines the light source direction.

float $elevation

Defines the light source direction.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getSizeOffset()

(PECL imagick 2.0.0)
Returns the size offset

Return Value

int

the size offset associated with the Imagick object.

Exceptions

ImagickException

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

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

Parameters

int $columns

The width in pixels.

int $rows

The height in pixels.

int $offset

The image offset.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adds adaptive blur filter to image

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel. Provide a value of 0 and the radius will be chosen automagically.

float $sigma

The standard deviation of the Gaussian, in pixels.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

float $black_point

The black point.

float $white_point

The white point.

int $channel

[optional]

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Imagick::CHANNEL_ALL. Refer to this list of channel constants.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adaptively sharpen the image

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.

float $sigma

The standard deviation of the Gaussian, in pixels.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

float $low

The low point

float $high

The high point

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

roundCornersImage($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection)

No description

Parameters

$xRounding
$yRounding
$strokeWidth [optional]
$displace [optional]
$sizeCorrection [optional]

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Rounds image corners Alias to {Imagick::roundCornersImage}

Parameters

float $x_rounding

x rounding

float $y_rounding

y rounding

float $stroke_width

[optional]

stroke width

float $displace

[optional]

image displace

float $size_correction

[optional]

size correction

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setIteratorIndex(int $index)

(PECL imagick 2.0.0)
Set the iterator position

Parameters

int $index

The position to set the iterator to

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getIteratorIndex()

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

Return Value

int

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

Imagick transformImage(string $crop, string $geometry)

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

Parameters

string $crop

A crop geometry string. This geometry defines a subregion of the image to crop.

string $geometry

An image geometry string. This geometry defines the final size of the image.

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

bool setImageOpacity(float $opacity)

(PECL imagick 2.0.0)
Sets the image opacity level

Parameters

float $opacity

The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.2.2)
Performs an ordered dither

Parameters

string $threshold_map

A string containing the name of the threshold dither map to use

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool polaroidImage(ImagickDraw $properties, float $angle)

(PECL imagick 2.0.0)
Simulates a Polaroid picture

Parameters

ImagickDraw $properties

The polaroid properties

float $angle

The polaroid angle

Return Value

bool

TRUE on success.

Exceptions

ImagickException

string|false getImageProperty(string $name)

(PECL imagick 2.0.0)
Returns the named image property

Parameters

string $name

name of the property (for example Exif:DateTime)

Return Value

string|false

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

Exceptions

ImagickException

bool setImageProperty(string $name, string $value)

(PECL imagick 2.0.0)
Sets an image property

Parameters

string $name
string $value

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageInterpolateMethod(int $method)

(PECL imagick 2.0.0)
Sets the image interpolate pixel method

Parameters

int $method

The method is one of the Imagick::INTERPOLATE_* constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageInterpolateMethod()

(PECL imagick 2.0.0)
Returns the interpolation method

Return Value

int

the interpolate method on success.

Exceptions

ImagickException

bool linearStretchImage(float $blackPoint, float $whitePoint)

(PECL imagick 2.0.0)
Stretches with saturation the image intensity

Parameters

float $blackPoint

The image black point

float $whitePoint

The image white point

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageLength()

(PECL imagick 2.0.0)
Returns the image length in bytes

Return Value

int

an int containing the current image size.

Exceptions

ImagickException

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

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

Parameters

int $width

The new width

int $height

The new height

int $x

X position for the new size

int $y

Y position for the new size

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageOrientation()

(PECL imagick 2.0.0)
Gets the image orientation

Return Value

int

an int on success.

Exceptions

ImagickException

bool setImageOrientation(int $orientation)

(PECL imagick 2.0.0)
Sets the image orientation

Parameters

int $orientation

One of the orientation constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $fill

ImagickPixel object or a string containing the fill color

float $fuzz

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.

mixed $bordercolor

ImagickPixel object or a string containing the border color

int $x

X start position of the floodfill

int $y

Y start position of the floodfill

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

(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.

Parameters

Imagick $lookup_table

Imagick object containing the color lookup table

int $channel

[optional]

The Channeltype constant. When not supplied, default channels are replaced.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

array getImageProperties(string $pattern = "*", bool $only_names = true)

(PECL imagick 2.0.0)
Returns the image properties

Parameters

string $pattern

[optional]

The pattern for property names.

bool $only_names

[optional]

Whether to return only property names. If FALSE then also the values are returned

Return Value

array

an array containing the image properties or property names.

Exceptions

ImagickException

array getImageProfiles(string $pattern = "*", bool $include_values = true)

(PECL imagick 2.2.0)
Returns the image profiles

Parameters

string $pattern

[optional]

The pattern for profile names.

bool $include_values

[optional]

Whether to return only profile names. If FALSE then only profile names will be returned.

Return Value

array

an array containing the image profiles or profile names.

Exceptions

ImagickException

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

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

Parameters

int $method

The method of image distortion. See distortion constants

array $arguments

The arguments for this distortion method

bool $bestfit

Attempt to resize destination to fit distorted source

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool writeImageFile(resource $filehandle, string|null $format = null)

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

Parameters

resource $filehandle

Filehandle where to write the image

string|null $format

The image format. The list of valid format specifiers depends on the compiled feature set of ImageMagick, and can be queried at runtime via Imagick::queryFormats().

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool writeImagesFile(resource $filehandle, string|null $format = null)

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

Parameters

resource $filehandle

Filehandle where to write the images

string|null $format

The image format. The list of valid format specifiers depends on the compiled feature set of ImageMagick, and can be queried at runtime via Imagick::queryFormats().

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool resetImagePage(string $page)

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

Parameters

string $page

The page definition. For example 7168x5147+0+0

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageClipMask(Imagick $clip_mask)

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

Parameters

Imagick $clip_mask

The Imagick object containing the clip mask

Return Value

bool

TRUE on success.

Imagick getImageClipMask()

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

Return Value

Imagick

an Imagick object containing the clip mask.

Exceptions

ImagickException

bool animateImages(string $x_server)

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

Parameters

string $x_server

X server address

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool recolorImage(array $matrix)

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

Parameters

array $matrix

The matrix containing the color values

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setFont(string $font)

(PECL imagick 2.1.0)
Sets font

Parameters

string $font

Font name or a filename

Return Value

bool

TRUE on success.

Exceptions

ImagickException

string|false getFont()

(PECL imagick 2.1.0)
Gets font

Return Value

string|false

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

bool setPointSize(float $point_size)

(PECL imagick 2.1.0)
Sets point size

Parameters

float $point_size

Point size

Return Value

bool

TRUE on success.

Exceptions

ImagickException

float getPointSize()

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

Return Value

float

a float containing the point size.

Imagick mergeImageLayers(int $layer_method)

(PECL imagick 2.1.0)
Merges image layers

Parameters

int $layer_method

One of the Imagick::LAYERMETHOD_* constants

Return Value

Imagick

Returns an Imagick object containing the merged image.

Exceptions

ImagickException

bool setImageAlphaChannel(int $mode)

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

Parameters

int $mode

One of the Imagick::ALPHACHANNEL_* constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $fill

ImagickPixel object or a string containing the fill color

float $fuzz

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.

mixed $target

ImagickPixel object or a string containing the target color to paint

int $x

X start position of the floodfill

int $y

Y start position of the floodfill

bool $invert

If TRUE paints any pixel that does not match the target color.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $target

ImagickPixel object or a string containing the color to change

mixed $fill

The replacement color

float $fuzz

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.

bool $invert

If TRUE paints any pixel that does not match the target color.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $target

The target color to paint

float $alpha

The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

float $fuzz

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.

bool $invert

If TRUE paints any pixel that does not match the target color.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width

The width of the target size

int $height

The height of the target size

float $delta_x

How much the seam can traverse on x-axis. Passing 0 causes the seams to be straight.

float $rigidity

Introduces a bias for non-straight seams. This parameter is typically 0.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool encipherImage(string $passphrase)

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

Parameters

string $passphrase

The passphrase

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool decipherImage(string $passphrase)

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

Parameters

string $passphrase

The passphrase

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setGravity(int $gravity)

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

Parameters

int $gravity

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

Return Value

bool

No value is returned.

Exceptions

ImagickException

int getGravity()

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

Return Value

int

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

float[] getImageChannelRange(int $channel)

(PECL imagick 2.2.1)
Gets channel range

Parameters

int $channel

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

Return Value

float[]

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

Exceptions

ImagickException

bool getImageAlphaChannel()

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

Return Value

bool

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

Exceptions

ImagickException

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

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

Parameters

Imagick $reference

Imagick object containing the reference image

int $metric

Refer to this list of metric type constants.

int $channel

[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

Return Value

float

a float describing the channel distortion.

Exceptions

ImagickException

bool setImageGravity(int $gravity)

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

Parameters

int $gravity

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

Return Value

bool

No value is returned.

Exceptions

ImagickException

int getImageGravity()

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

Return Value

int

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

Exceptions

ImagickException

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

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

Parameters

int $x

The image x position

int $y

The image y position

int $width

The image width

int $height

The image height

string $map

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.

int $storage

The pixel storage method. Refer to this list of pixel constants.

array $pixels

The array of pixels

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool deskewImage(float $threshold)

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

Parameters

float $threshold

Deskew threshold

Return Value

bool

Exceptions

ImagickException

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

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

Parameters

int $COLORSPACE

One of the COLORSPACE constants.

float $cluster_threshold

A percentage describing minimum number of pixels contained in hexedra before it is considered valid.

float $smooth_threshold

Eliminates noise from the histogram.

bool $verbose

[optional]

Whether to output detailed information about recognised classes.

Return Value

bool

Exceptions

ImagickException

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

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

Parameters

int $SPARSE_METHOD

Refer to this list of sparse method constants

array $arguments

An array containing the coordinates. The array is in format array(1,1, 2,45)

int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool remapImage(Imagick $replacement, int $DITHER)

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

Parameters

Imagick $replacement

An Imagick object containing the replacement colors

int $DITHER

Refer to this list of dither method constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int[] exportImagePixels(int $x, int $y, int $width, int $height, string $map, int $STORAGE)

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

Parameters

int $x

X-coordinate of the exported area

int $y

Y-coordinate of the exported area

int $width

Width of the exported aread

int $height

Height of the exported area

string $map

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.

int $STORAGE

Refer to this list of pixel type constants

Return Value

int[]

an array containing the pixels values.

Exceptions

ImagickException

float[] getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT)

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

Parameters

int $channel

[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

Return Value

float[]

an array with kurtosis and skewness members.

Exceptions

ImagickException

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

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

Parameters

int $function

Refer to this list of function constants

array $arguments

Array of arguments to pass to this function.

int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool transformImageColorspace($COLORSPACE)

Transform image colorspace

Parameters

$COLORSPACE

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

Imagick $clut

Imagick object containing the Hald lookup image.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool autoLevelImage($CHANNEL)

Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

Parameters

$CHANNEL [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool blueShiftImage(float $factor)

No description

Parameters

float $factor [optional]

Return Value

bool

Exceptions

ImagickException

string getImageArtifact(string $artifact)

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

Parameters

string $artifact

The name of the artifact

Return Value

string

the artifact value on success.

Exceptions

ImagickException

bool setImageArtifact(string $artifact, string $value)

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

Parameters

string $artifact

The name of the artifact

string $value

The value of the artifact

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool deleteImageArtifact(string $artifact)

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

Parameters

string $artifact

The name of the artifact to delete

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getColorspace()

(PECL imagick 0.9.10-0.9.9)
Gets the colorspace

Return Value

int

an integer which can be compared against COLORSPACE constants.

bool setColorspace(int $COLORSPACE)

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

Parameters

int $COLORSPACE

One of the COLORSPACE constants

Return Value

bool

TRUE on success.

clampImage($CHANNEL)

No description

Parameters

$CHANNEL [optional]

Exceptions

ImagickException

Imagick smushImages(bool $stack, int $offset)

No description

Parameters

bool $stack
int $offset

Return Value

Imagick

Exceptions

ImagickException

__construct(mixed $files = null)

(PECL imagick 2.0.0)
The Imagick constructor

Parameters

mixed $files

The path to an image to load or an array of paths. Paths can include wildcards for file names, or can be URLs.

Exceptions

ImagickException

string __toString()

No description

Return Value

string

int count()

Count elements of an object

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

ImagickPixelIterator getPixelIterator()

(PECL imagick 2.0.0)
Returns a MagickPixelIterator

Return Value

ImagickPixelIterator

an ImagickPixelIterator on success.

Exceptions

ImagickException
ImagickPixelIteratorException

ImagickPixelIterator getPixelRegionIterator(int $x, int $y, int $columns, int $rows)

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

Parameters

int $x

The x-coordinate of the region.

int $y

The y-coordinate of the region.

int $columns

The width of the region.

int $rows

The height of the region.

Return Value

ImagickPixelIterator

an ImagickPixelIterator for an image section.

Exceptions

ImagickException
ImagickPixelIteratorException

bool readImage(string $filename)

(PECL imagick 0.9.0-0.9.9)
Reads image from filename

Parameters

string $filename

Return Value

bool

TRUE on success.

Exceptions

ImagickException

readImages($filenames)

No description

Parameters

$filenames

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Reads image from a binary string

Parameters

string $image
string $filename [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageFormat(string $format)

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

Parameters

string $format

String presentation of the image format. Format support depends on the ImageMagick installation.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool scaleImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false)

Since: 2.0.0

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.

Parameters

int $columns
int $rows
bool $bestfit

[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.

bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool writeImage(string $filename = null)

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

Parameters

string $filename

[optional]

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".

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool writeImages(string $filename, bool $adjoin)

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

Parameters

string $filename
bool $adjoin

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adds blur filter to image

Parameters

float $radius

Blur radius

float $sigma

Standard deviation

int $channel

[optional]

The Channeltype constant. When not supplied, all channels are blurred.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

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.

Parameters

int $columns

Image width

int $rows

Image height

bool $bestfit

[optional]

Whether to force maximum values

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.

bool $fill [optional]
bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

Creates a cropped thumbnail at the requested size.

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

Parameters

int $width

The width of the thumbnail

int $height

The Height of the thumbnail

bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on succes

Exceptions

ImagickException

string getImageFilename()

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

Return Value

string

a string with the filename of the image.

Exceptions

ImagickException

bool setImageFilename(string $filename)

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

Parameters

string $filename

Return Value

bool

TRUE on success.

Exceptions

ImagickException

string getImageFormat()

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

Return Value

string

a string containing the image format on success.

Exceptions

ImagickException

string getImageMimeType()

No description

Return Value

string

Returns the image mime-type.

Exceptions

ImagickException

bool removeImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool destroy()

(PECL imagick 2.0.0)
Destroys the Imagick object

Return Value

bool

TRUE on success.

bool clear()

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

Return Value

bool

TRUE on success.

int getImageSize()

(PECL imagick 2.0.0)
Returns the image length in bytes

Return Value

int

an int containing the current image size.

Exceptions

ImagickException

string getImageBlob()

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

Return Value

string

a string containing the image.

Exceptions

ImagickException

string getImagesBlob()

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

Return Value

string

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

Exceptions

ImagickException

bool setFirstIterator()

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

Return Value

bool

TRUE on success.

bool setLastIterator()

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

Return Value

bool

TRUE on success.

resetIterator()

No description

bool previousImage()

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

Return Value

bool

TRUE on success.

bool nextImage()

(PECL imagick 2.0.0)
Moves to the next image

Return Value

bool

TRUE on success.

bool hasPreviousImage()

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

Return Value

bool

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

bool hasNextImage()

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

Return Value

bool

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

bool setImageIndex(int $index)

(PECL imagick 2.0.0)
Set the iterator position

Parameters

int $index

The position to set the iterator to

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageIndex()

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

Return Value

int

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

bool commentImage(string $comment)

(PECL imagick 2.0.0)
Adds a comment to your image

Parameters

string $comment

The comment to add

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Extracts a region of the image

Parameters

int $width

The width of the crop

int $height

The height of the crop

int $x

The X coordinate of the cropped region's top left corner

int $y

The Y coordinate of the cropped region's top left corner

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool labelImage(string $label)

(PECL imagick 2.0.0)
Adds a label to an image

Parameters

string $label

The label to add

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int[] getImageGeometry()

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

Return Value

int[]

an array with the width/height of the image.

Exceptions

ImagickException

bool drawImage(ImagickDraw $draw)

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

Parameters

ImagickDraw $draw

The drawing operations to render on the image.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageCompressionQuality(int $quality)

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

Parameters

int $quality

The image compression quality as an integer

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageCompressionQuality()

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

Return Value

int

integer describing the images compression quality

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

(PECL imagick 2.0.0)
Annotates an image with text

Parameters

ImagickDraw $draw_settings

The ImagickDraw object that contains settings for drawing the text

float $x

Horizontal offset in pixels to the left of text

float $y

Vertical offset in pixels to the baseline of text

float $angle

The angle at which to write the text

string $text

The string to draw

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Composite one image onto another

Parameters

Imagick $composite_object

Imagick object which holds the composite image

int $composite

Composite operator

int $x

The column offset of the composited image

int $y

The row offset of the composited image

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

float $brightness
float $saturation
float $hue

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getImageColors()

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

Return Value

int

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Creates a composite image

Parameters

ImagickDraw $draw

The font name, size, and color are obtained from this object.

string $tile_geometry

The number of tiles per row and page (e.g. 6x4+0+0).

string $thumbnail_geometry

Preferred image size and border size of each thumbnail (e.g. 120x120+4+3>).

int $mode

Thumbnail framing mode, see Montage Mode constants.

string $frame

Surround the image with an ornamental border (e.g. 15x15+3+3). The frame color is that of the thumbnail's matte color.

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

array identifyImage(bool $appendRawOutput = false)

(PECL imagick 2.0.0)
Identifies an image and fetches attributes

Parameters

bool $appendRawOutput [optional]

Return Value

array

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

Exceptions

ImagickException

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

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

Parameters

float $threshold
int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width

Width of the local neighborhood.

int $height

Height of the local neighborhood.

int $offset

The mean offset

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool blackThresholdImage(mixed $threshold)

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

Parameters

mixed $threshold

The threshold below which everything turns black

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool whiteThresholdImage(mixed $threshold)

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

Parameters

mixed $threshold

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick appendImages(bool $stack = false)

(PECL imagick 2.0.0)
Append a set of images

Parameters

bool $stack

[optional]

Whether to stack the images vertically. By default (or if FALSE is specified) images are stacked left-to-right. If stack is TRUE, images are stacked top-to-bottom.

Return Value

Imagick

Imagick instance on success.

Exceptions

ImagickException

bool charcoalImage(float $radius, float $sigma)

(PECL imagick 2.0.0)
Simulates a charcoal drawing

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel

float $sigma

The standard deviation of the Gaussian, in pixels

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool oilPaintImage(float $radius)

(PECL imagick 2.0.0)
Simulates an oil painting

Parameters

float $radius

The radius of the circular neighborhood.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool posterizeImage(int $levels, bool $dither)

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

Parameters

int $levels
bool $dither

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Radial blurs an image

Parameters

float $angle
int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width
int $height
int $x
int $y
bool $raise

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Resample image to desired resolution

Parameters

float $x_resolution
float $y_resolution
int $filter
float $blur

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

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.

Parameters

int $columns

Width of the image

int $rows

Height of the image

int $filter

Refer to the list of filter constants.

float $blur

The blur factor where > 1 is blurry, < 1 is sharp.

bool $bestfit

[optional] Added since 2.1.0. Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling

bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on success

Exceptions

ImagickException

bool rollImage(int $x, int $y)

(PECL imagick 2.0.0)
Offsets an image

Parameters

int $x

The X offset.

int $y

The Y offset.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool rotateImage(mixed $background, float $degrees)

(PECL imagick 2.0.0)
Rotates an image

Parameters

mixed $background

The background color

float $degrees

The number of degrees to rotate the image

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool sampleImage(int $columns, int $rows)

(PECL imagick 2.0.0)
Scales an image with pixel sampling

Parameters

int $columns
int $rows

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool solarizeImage(int $threshold)

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

Parameters

int $threshold

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Simulates an image shadow

Parameters

float $opacity
float $sigma
int $x
int $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageAttribute(string $key, string $value)

No description

Parameters

string $key
string $value

Return Value

bool

Exceptions

ImagickException

bool setImageBackgroundColor(mixed $background)

(PECL imagick 2.0.0)
Sets the image background color

Parameters

mixed $background

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageCompose(int $compose)

(PECL imagick 2.0.0)
Sets the image composite operator

Parameters

int $compose

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageCompression(int $compression)

(PECL imagick 2.0.0)
Sets the image compression

Parameters

int $compression

One of the COMPRESSION constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageDelay(int $delay)

(PECL imagick 2.0.0)
Sets the image delay

Parameters

int $delay

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageDepth(int $depth)

(PECL imagick 2.0.0)
Sets the image depth

Parameters

int $depth

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageGamma(float $gamma)

(PECL imagick 2.0.0)
Sets the image gamma

Parameters

float $gamma

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageIterations(int $iterations)

(PECL imagick 2.0.0)
Sets the image iterations

Parameters

int $iterations

The number of iterations the image should loop over. Set to '0' to loop continuously.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageMatteColor(mixed $matte)

(PECL imagick 2.0.0)
Sets the image matte color

Parameters

mixed $matte

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width
int $height
int $x
int $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

setImageProgressMonitor($filename)

No description

Parameters

$filename

Exceptions

ImagickException

bool setImageResolution(float $x_resolution, float $y_resolution)

(PECL imagick 2.0.0)
Sets the image resolution

Parameters

float $x_resolution
float $y_resolution

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageScene(int $scene)

(PECL imagick 2.0.0)
Sets the image scene

Parameters

int $scene

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageTicksPerSecond(int $ticks_per_second)

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

Parameters

int $ticks_per_second

The duration for which an image should be displayed expressed in ticks per second.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageType(int $image_type)

(PECL imagick 2.0.0)
Sets the image type

Parameters

int $image_type

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageUnits(int $units)

(PECL imagick 2.0.0)
Sets the image units of resolution

Parameters

int $units

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Sharpens an image

Parameters

float $radius
float $sigma
int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool shaveImage(int $columns, int $rows)

(PECL imagick 2.0.0)
Shaves pixels from the image edges

Parameters

int $columns
int $rows

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Creating a parallelogram

Parameters

mixed $background

The background color

float $x_shear

The number of degrees to shear on the x axis

float $y_shear

The number of degrees to shear on the y axis

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width
int $height
int $x
int $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool pingImage(string $filename)

(PECL imagick 2.0.0)
Fetch basic attributes about the image

Parameters

string $filename

The filename to read the information from.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Reads image from open filehandle

Parameters

resource $filehandle
string $fileName [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool displayImage(string $servername)

(PECL imagick 2.0.0)
Displays an image

Parameters

string $servername

The X server name

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool displayImages(string $servername)

(PECL imagick 2.0.0)
Displays an image or image sequence

Parameters

string $servername

The X server name

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool spreadImage(float $radius)

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

Parameters

float $radius

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool swirlImage(float $degrees)

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

Parameters

float $degrees

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool stripImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

static array queryFormats(string $pattern = "*")

(PECL imagick 2.0.0)
Returns formats supported by Imagick

Parameters

string $pattern [optional]

Return Value

array

an array containing the formats supported by Imagick.

static array queryFonts(string $pattern = "*")

(PECL imagick 2.0.0)
Returns the configured fonts

Parameters

string $pattern

[optional]

The query pattern

Return Value

array

an array containing the configured fonts.

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

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

Parameters

ImagickDraw $properties

ImagickDraw object containing font properties

string $text

The text

bool $multiline

[optional]

Multiline parameter. If left empty it is autodetected

Return Value

array

a multi-dimensional array representing the font metrics.

Exceptions

ImagickException

Imagick steganoImage(Imagick $watermark_wand, int $offset)

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

Parameters

Imagick $watermark_wand
int $offset

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adds random noise to the image

Parameters

int $noise_type

The type of the noise. Refer to this list of noise constants.

int $channel

[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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Simulates motion blur

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel.

float $sigma

The standard deviation of the Gaussian, in pixels.

float $angle

Apply the effect along this angle.

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick mosaicImages()

(PECL imagick 2.0.0)
Forms a mosaic from images

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

Imagick morphImages(int $number_frames)

(PECL imagick 2.0.0)
Method morphs a set of images

Parameters

int $number_frames

The number of in-between images to generate.

Return Value

Imagick

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

Exceptions

ImagickException
ImagickException

bool minifyImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool affineTransformImage(ImagickDraw $matrix)

(PECL imagick 2.0.0)
Transforms an image

Parameters

ImagickDraw $matrix

The affine matrix

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick averageImages()

(PECL imagick 2.0.0)
Average a set of images

Return Value

Imagick

a new Imagick object on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Surrounds the image with a border

Parameters

mixed $bordercolor

ImagickPixel object or a string containing the border color

int $width

Border width

int $height

Border height

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $width

Width of the chopped area

int $height

Height of the chopped area

int $x

X origo of the chopped area

int $y

Y origo of the chopped area

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool clipImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool clipPathImage(string $pathname, bool $inside)

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

Parameters

string $pathname

The name of the path

bool $inside

If TRUE later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

clipImagePath(string $pathname, string $inside)

Parameters

string $pathname
string $inside

Exceptions

ImagickException

Imagick coalesceImages()

(PECL imagick 2.0.0)
Composites a set of images

Return Value

Imagick

a new Imagick object on success.

Exceptions

ImagickException

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

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

Parameters

mixed $fill

ImagickPixel object containing the fill color

float $fuzz

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.

mixed $bordercolor

ImagickPixel object containing the border color

int $x

X start position of the floodfill

int $y

Y start position of the floodfill

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

Since: 2.0.0

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

Parameters

mixed $colorize

ImagickPixel object or a string containing the colorize color

mixed $opacity

ImagickPixel object or an float containing the opacity value. 1.0 is fully opaque and 0.0 is fully transparent.

bool $legacy

[optional] Added since 3.4.0. Default value FALSE

Return Value

bool

TRUE on success.

Exceptions

ImagickException

array compareImageChannels(Imagick $image, int $channelType, int $metricType)

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

Parameters

Imagick $image

Imagick object containing the image to compare.

int $channelType

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.

int $metricType

One of the metric type constants.

Return Value

array

Array consisting of new_wand and distortion.

Exceptions

ImagickException

array compareImages(Imagick $compare, int $metric)

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

Parameters

Imagick $compare

An image to compare to.

int $metric

Provide a valid metric type constant. Refer to this list of metric constants.

Return Value

array

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

Exceptions

ImagickException

bool contrastImage(bool $sharpen)

(PECL imagick 2.0.0)
Change the contrast of the image

Parameters

bool $sharpen

The sharpen value

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick combineImages(int $channelType)

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

Parameters

int $channelType

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.

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

array $kernel

The convolution kernel

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool cycleColormapImage(int $displace)

(PECL imagick 2.0.0)
Displaces an image's colormap

Parameters

int $displace

The amount to displace the colormap.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick deconstructImages()

(PECL imagick 2.0.0)
Returns certain pixel differences between images

Return Value

Imagick

a new Imagick object on success.

Exceptions

ImagickException

bool despeckleImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool edgeImage(float $radius)

(PECL imagick 2.0.0)
Enhance edges within the image

Parameters

float $radius

The radius of the operation.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool embossImage(float $radius, float $sigma)

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

Parameters

float $radius

The radius of the effect

float $sigma

The sigma of the effect

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool enhanceImage()

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

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool equalizeImage()

(PECL imagick 2.0.0)
Equalizes the image histogram

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Applies an expression to an image

Parameters

int $op

The evaluation operator

float $constant

The value of the operator

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick flattenImages()

Since: 2.0.0

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

This is replaced by:

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

Return Value

Imagick

Returns an Imagick object containing the merged image.

Exceptions

ImagickException

bool flipImage()

(PECL imagick 2.0.0)
Creates a vertical mirror image

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool flopImage()

(PECL imagick 2.0.0)
Creates a horizontal mirror image

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $matte_color

ImagickPixel object or a string representing the matte color

int $width

The width of the border

int $height

The height of the border

int $inner_bevel

The inner bevel width

int $outer_bevel

The outer bevel width

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

string $expression

The expression.

int $channel

[optional]

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.

Return Value

Imagick

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Gamma-corrects an image

Parameters

float $gamma

The amount of gamma-correction.

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Blurs an image

Parameters

float $radius

The radius of the Gaussian, in pixels, not counting the center pixel.

float $sigma

The standard deviation of the Gaussian, in pixels.

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

string getImageAttribute(string $key)

No description

Parameters

string $key

The key of the attribute to get.

Return Value

string

ImagickPixel getImageBackgroundColor()

(PECL imagick 2.0.0)
Returns the image background color

Return Value

ImagickPixel

an ImagickPixel set to the background color of the image.

Exceptions

ImagickException

float[] getImageBluePrimary()

(PECL imagick 2.0.0)
Returns the chromaticy blue primary point

Return Value

float[]

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

Exceptions

ImagickException

ImagickPixel getImageBorderColor()

(PECL imagick 2.0.0)
Returns the image border color

Return Value

ImagickPixel

TRUE on success.

Exceptions

ImagickException

int getImageChannelDepth(int $channel)

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

Parameters

int $channel

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

Return Value

int

TRUE on success.

Exceptions

ImagickException

float getImageChannelDistortion(Imagick $reference, int $channel, int $metric)

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

Parameters

Imagick $reference

Imagick object to compare to.

int $channel

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.

int $metric

One of the metric type constants.

Return Value

float

TRUE on success.

Exceptions

ImagickException

int[] getImageChannelExtrema(int $channel)

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

Parameters

int $channel

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.

Return Value

int[]

Exceptions

ImagickException

float[] getImageChannelMean(int $channel)

(PECL imagick 2.0.0)
Gets the mean and standard deviation

Parameters

int $channel

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.

Return Value

float[]

Exceptions

ImagickException

array getImageChannelStatistics()

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

Return Value

array

Exceptions

ImagickException

ImagickPixel getImageColormapColor(int $index)

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

Parameters

int $index

The offset into the image colormap.

Return Value

ImagickPixel

TRUE on success.

Exceptions

ImagickException

int getImageColorspace()

(PECL imagick 2.0.0)
Gets the image colorspace

Return Value

int

TRUE on success.

Exceptions

ImagickException

int getImageCompose()

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

Return Value

int

TRUE on success.

Exceptions

ImagickException

int getImageDelay()

(PECL imagick 2.0.0)
Gets the image delay

Return Value

int

the image delay.

Exceptions

ImagickException

int getImageDepth()

(PECL imagick 0.9.1-0.9.9)
Gets the image depth

Return Value

int

The image depth.

Exceptions

ImagickException

float getImageDistortion(Imagick $reference, int $metric)

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

Parameters

Imagick $reference

Imagick object to compare to.

int $metric

One of the metric type constants.

Return Value

float

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

Exceptions

ImagickException

int[] getImageExtrema()

(PECL imagick 2.0.0)
Gets the extrema for the image

Return Value

int[]

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

Exceptions

ImagickException

int getImageDispose()

(PECL imagick 2.0.0)
Gets the image disposal method

Return Value

int

the dispose method on success.

Exceptions

ImagickException

float getImageGamma()

(PECL imagick 2.0.0)
Gets the image gamma

Return Value

float

the image gamma on success.

Exceptions

ImagickException

float[] getImageGreenPrimary()

(PECL imagick 2.0.0)
Returns the chromaticy green primary point

Return Value

float[]

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

Exceptions

ImagickException
ImagickException

int getImageHeight()

(PECL imagick 2.0.0)
Returns the image height

Return Value

int

the image height in pixels.

Exceptions

ImagickException

array getImageHistogram()

(PECL imagick 2.0.0)
Gets the image histogram

Return Value

array

the image histogram as an array of ImagickPixel objects.

Exceptions

ImagickException

int getImageInterlaceScheme()

(PECL imagick 2.0.0)
Gets the image interlace scheme

Return Value

int

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

Exceptions

ImagickException

int getImageIterations()

(PECL imagick 2.0.0)
Gets the image iterations

Return Value

int

the image iterations as an integer.

Exceptions

ImagickException

ImagickPixel getImageMatteColor()

(PECL imagick 2.0.0)
Returns the image matte color

Return Value

ImagickPixel

ImagickPixel object on success.

Exceptions

ImagickException

int[] getImagePage()

(PECL imagick 2.0.0)
Returns the page geometry

Return Value

int[]

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

Exceptions

ImagickException

ImagickPixel getImagePixelColor(int $x, int $y)

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

Parameters

int $x

The x-coordinate of the pixel

int $y

The y-coordinate of the pixel

Return Value

ImagickPixel

an ImagickPixel instance for the color at the coordinates given.

Exceptions

ImagickException

string getImageProfile(string $name)

(PECL imagick 2.0.0)
Returns the named image profile

Parameters

string $name

The name of the profile to return.

Return Value

string

a string containing the image profile.

Exceptions

ImagickException

float[] getImageRedPrimary()

(PECL imagick 2.0.0)
Returns the chromaticity red primary point

Return Value

float[]

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

Exceptions

ImagickException

int getImageRenderingIntent()

(PECL imagick 2.0.0)
Gets the image rendering intent

Return Value

int

the image rendering intent.

Exceptions

ImagickException

float[] getImageResolution()

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

Return Value

float[]

the resolution as an array.

Exceptions

ImagickException

int getImageScene()

(PECL imagick 2.0.0)
Gets the image scene

Return Value

int

the image scene.

Exceptions

ImagickException

string getImageSignature()

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

Return Value

string

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

Exceptions

ImagickException

int getImageTicksPerSecond()

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

Return Value

int

the image ticks-per-second.

Exceptions

ImagickException

int getImageType()

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

Return Value

int

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

Exceptions

ImagickException

int getImageUnits()

(PECL imagick 2.0.0)
Gets the image units of resolution

Return Value

int

the image units of resolution.

Exceptions

ImagickException

int getImageVirtualPixelMethod()

(PECL imagick 2.0.0)
Returns the virtual pixel method

Return Value

int

the virtual pixel method on success.

Exceptions

ImagickException

float[] getImageWhitePoint()

(PECL imagick 2.0.0)
Returns the chromaticity white point

Return Value

float[]

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

Exceptions

ImagickException

int getImageWidth()

(PECL imagick 2.0.0)
Returns the image width

Return Value

int

the image width.

Exceptions

ImagickException

int getNumberImages()

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

Return Value

int

the number of images associated with Imagick object.

float getImageTotalInkDensity()

(PECL imagick 2.0.0)
Gets the image total ink density

Return Value

float

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

Exceptions

ImagickException
ImagickException

Imagick getImageRegion(int $width, int $height, int $x, int $y)

(PECL imagick 2.0.0)
Extracts a region of the image

Parameters

int $width

The width of the extracted region.

int $height

The height of the extracted region.

int $x

X-coordinate of the top-left corner of the extracted region.

int $y

Y-coordinate of the top-left corner of the extracted region.

Return Value

Imagick

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

Exceptions

ImagickException

bool implodeImage(float $radius)

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

Parameters

float $radius

The radius of the implode

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adjusts the levels of an image

Parameters

float $blackPoint

The image black point

float $gamma

The gamma value

float $whitePoint

The image white point

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool magnifyImage()

(PECL imagick 2.0.0)
Scales an image proportionally 2x

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool mapImage(Imagick $map, bool $dither)

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

Parameters

Imagick $map
bool $dither

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

float $alpha

The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

float $fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

mixed $bordercolor

An ImagickPixel object or string representing the border color.

int $x

The starting x coordinate of the operation.

int $y

The starting y coordinate of the operation.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool medianFilterImage(float $radius)

(PECL imagick 2.0.0)
Applies a digital filter

Parameters

float $radius

The radius of the pixel neighborhood.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

bool $gray

Whether to only negate grayscale pixels within the image.

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Change any pixel that matches color

Parameters

mixed $target

Change this target color to the fill color within the image. An ImagickPixel object or a string representing the target color.

mixed $fill

An ImagickPixel object or a string representing the fill color.

float $fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

int $channel

[optional]

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.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

mixed $target

Change this target color to specified opacity value within the image.

float $alpha

The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

float $fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool previewImages(int $preview)

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

Parameters

int $preview

Preview type. See Preview type constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool profileImage(string $name, string $profile)

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

Parameters

string $name
string $profile

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $numberColors
int $colorspace
int $treedepth
bool $dither
bool $measureError

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

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

Parameters

int $numberColors
int $colorspace
int $treedepth
bool $dither
bool $measureError

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool reduceNoiseImage(float $radius)

(PECL imagick 2.0.0)
Smooths the contours of an image

Parameters

float $radius

Return Value

bool

TRUE on success.

Exceptions

ImagickException

string removeImageProfile(string $name)

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

Parameters

string $name

Return Value

string

a string containing the profile of the image.

Exceptions

ImagickException

bool separateImageChannel(int $channel)

(PECL imagick 2.0.0)
Separates a channel from the image

Parameters

int $channel

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool sepiaToneImage(float $threshold)

(PECL imagick 2.0.0)
Sepia tones an image

Parameters

float $threshold

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageBias(float $bias)

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

Parameters

float $bias

Return Value

bool

TRUE on success.

bool setImageBluePrimary(float $x, float $y)

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

Parameters

float $x
float $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageBorderColor(mixed $border)

(PECL imagick 2.0.0)
Sets the image border color

Parameters

mixed $border

The border color

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageChannelDepth(int $channel, int $depth)

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

Parameters

int $channel
int $depth

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageColormapColor(int $index, ImagickPixel $color)

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

Parameters

int $index
ImagickPixel $color

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageColorspace(int $colorspace)

(PECL imagick 2.0.0)
Sets the image colorspace

Parameters

int $colorspace

One of the COLORSPACE constants

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageDispose(int $dispose)

(PECL imagick 2.0.0)
Sets the image disposal method

Parameters

int $dispose

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageExtent(int $columns, int $rows)

(PECL imagick 2.0.0)
Sets the image size

Parameters

int $columns
int $rows

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageGreenPrimary(float $x, float $y)

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

Parameters

float $x
float $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageInterlaceScheme(int $interlace_scheme)

(PECL imagick 2.0.0)
Sets the image compression

Parameters

int $interlace_scheme

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageProfile(string $name, string $profile)

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

Parameters

string $name
string $profile

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageRedPrimary(float $x, float $y)

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

Parameters

float $x
float $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageRenderingIntent(int $rendering_intent)

(PECL imagick 2.0.0)
Sets the image rendering intent

Parameters

int $rendering_intent

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageVirtualPixelMethod(int $method)

(PECL imagick 2.0.0)
Sets the image virtual pixel method

Parameters

int $method

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImageWhitePoint(float $x, float $y)

(PECL imagick 2.0.0)
Sets the image chromaticity white point

Parameters

float $x
float $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Adjusts the contrast of an image

Parameters

bool $sharpen
float $alpha
float $beta
int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool stereoImage(Imagick $offset_wand)

(PECL imagick 2.0.0)
Composites two images

Parameters

Imagick $offset_wand

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick textureImage(Imagick $texture_wand)

(PECL imagick 2.0.0)
Repeatedly tiles the texture image

Parameters

Imagick $texture_wand

Return Value

Imagick

a new Imagick object that has the repeated texture applied.

Exceptions

ImagickException

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

Since: 2.0.0

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.

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

Parameters

mixed $tint
mixed $opacity
bool $legacy [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Sharpens an image

Parameters

float $radius
float $sigma
float $amount
float $threshold
int $channel [optional]

Return Value

bool

TRUE on success.

Exceptions

ImagickException

Imagick getImage()

(PECL imagick 2.0.0)
Returns a new Imagick object

Return Value

Imagick

a new Imagick object with the current image sequence.

Exceptions

ImagickException

bool addImage(Imagick $source)

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

Parameters

Imagick $source

The source Imagick object

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setImage(Imagick $replace)

(PECL imagick 2.0.0)
Replaces image in the object

Parameters

Imagick $replace

The replace Imagick object

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Creates a new image

Parameters

int $cols

Columns in the new image

int $rows

Rows in the new image

mixed $background

The background color used for this image

string $format

[optional]

Image format. This parameter was added in Imagick version 2.0.1.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

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

(PECL imagick 2.0.0)
Creates a new image

Parameters

int $columns

columns in the new image

int $rows

rows in the new image

string $pseudoString

string containing pseudo image definition.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

int getCompression()

(PECL imagick 2.0.0)
Gets the object compression type

Return Value

int

the compression constant

int getCompressionQuality()

(PECL imagick 2.0.0)
Gets the object compression quality

Return Value

int

integer describing the compression quality

static string getCopyright()

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

Return Value

string

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

string getFilename()

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

Return Value

string

a string on success.

string getFormat()

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

Return Value

string

the format of the image.

static string getHomeURL()

(PECL imagick 2.0.0)
Returns the ImageMagick home URL

Return Value

string

a link to the imagemagick homepage.

int getInterlaceScheme()

(PECL imagick 2.0.0)
Gets the object interlace scheme

Return Value

int

Gets the wand interlace scheme.

string getOption(string $key)

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

Parameters

string $key

The name of the option

Return Value

string

a value associated with a wand and the specified key.

static string getPackageName()

(PECL imagick 2.0.0)
Returns the ImageMagick package name

Return Value

string

the ImageMagick package name as a string.

int[] getPage()

(PECL imagick 2.0.0)
Returns the page geometry

Return Value

int[]

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

Exceptions

ImagickException

static array getQuantumDepth()

(PECL imagick 2.0.0)
Gets the quantum depth

Return Value

array

the Imagick quantum depth as a string.

static array getQuantumRange()

(PECL imagick 2.0.0)
Returns the Imagick quantum range

Return Value

array

the Imagick quantum range as a string.

static string getReleaseDate()

(PECL imagick 2.0.0)
Returns the ImageMagick release date

Return Value

string

the ImageMagick release date as a string.

static int getResource(int $type)

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

Parameters

int $type

Refer to the list of resourcetype constants.

Return Value

int

the specified resource's memory usage in megabytes.

static int getResourceLimit(int $type)

(PECL imagick 2.0.0)
Returns the specified resource limit

Parameters

int $type

Refer to the list of resourcetype constants.

Return Value

int

the specified resource limit in megabytes.

array getSamplingFactors()

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

Return Value

array

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

int[] getSize()

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

Return Value

int[]

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

Exceptions

ImagickException

static array getVersion()

(PECL imagick 2.0.0)
Returns the ImageMagick API version

Return Value

array

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

bool setBackgroundColor(mixed $background)

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

Parameters

mixed $background

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setCompression(int $compression)

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

Parameters

int $compression

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setCompressionQuality(int $quality)

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

Parameters

int $quality

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setFilename(string $filename)

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

Parameters

string $filename

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setFormat(string $format)

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

Parameters

string $format

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setInterlaceScheme(int $interlace_scheme)

(PECL imagick 2.0.0)
Sets the image compression

Parameters

int $interlace_scheme

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setOption(string $key, string $value)

(PECL imagick 2.0.0)
Set an option

Parameters

string $key
string $value

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setPage(int $width, int $height, int $x, int $y)

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

Parameters

int $width
int $height
int $x
int $y

Return Value

bool

TRUE on success.

Exceptions

ImagickException

static bool setResourceLimit(int $type, int $limit)

(PECL imagick 2.0.0)
Sets the limit for a particular resource in megabytes

Parameters

int $type

Refer to the list of resourcetype constants.

int $limit

The resource limit. The unit depends on the type of the resource being limited.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setResolution(float $x_resolution, float $y_resolution)

(PECL imagick 2.0.0)
Sets the image resolution

Parameters

float $x_resolution

The horizontal resolution.

float $y_resolution

The vertical resolution.

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setSamplingFactors(array $factors)

(PECL imagick 2.0.0)
Sets the image sampling factors

Parameters

array $factors

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setSize(int $columns, int $rows)

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

Parameters

int $columns
int $rows

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool setType(int $image_type)

(PECL imagick 2.0.0)
Sets the image type attribute

Parameters

int $image_type

Return Value

bool

TRUE on success.

Exceptions

ImagickException

mixed key()

Return the key of the current element

Return Value

mixed

TKey on success, or null on failure.

void next()

Move forward to next element

Return Value

void

Any returned value is ignored.

void rewind()

Rewind the Iterator to the first element

Return Value

void

Any returned value is ignored.

bool valid()

(PECL imagick 2.0.0)
Checks if the current item is valid

Return Value

bool

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

Exceptions

ImagickException

mixed current()

(PECL imagick 2.0.0)
Returns a reference to the current Imagick object

Return Value

mixed

Can return any type.

void brightnessContrastImage(float $brightness, float $contrast, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

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.

Parameters

float $brightness
float $contrast
int $CHANNEL [optional]

Return Value

void

Exceptions

ImagickException

void morphology(int $morphologyMethod, int $iterations, ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

Applies a user supplied kernel to the image according to the given morphology method.

Parameters

int $morphologyMethod

Which morphology method to use one of the \Imagick::MORPHOLOGY_* constants.

int $iterations

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
int $CHANNEL [optional]

Return Value

void

Exceptions

ImagickException
ImagickKernelException

void filter(ImagickKernel $ImagickKernel, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

Applies a custom convolution kernel to the image.

Parameters

ImagickKernel $ImagickKernel

An instance of ImagickKernel that represents either a single kernel or a linked series of kernels.

int $CHANNEL

[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

Return Value

void

Exceptions

ImagickException

void colorMatrixImage(array $color_matrix = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

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).

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

array $color_matrix

Return Value

void

Exceptions

ImagickException

void deleteImageProperty(string $name)

Since: 3.3.0

Deletes an image property.

Parameters

string $name

The name of the property to delete.

Return Value

void

Exceptions

ImagickException

void forwardFourierTransformimage(bool $magnitude)

Since: 3.3.0

Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

Parameters

bool $magnitude

If true, return as magnitude / phase pair otherwise a real / imaginary image pair.

Return Value

void

Exceptions

ImagickException

int getImageCompression()

Since: 3.3.0

Gets the current image's compression type.

Return Value

int

static string|false getRegistry(string $key)

Since: 3.3.0

Get the StringRegistry entry for the named key or false if not set.

Parameters

string $key

Return Value

string|false

Exceptions

ImagickException

static int getQuantum()

Since: 3.3.0

Returns the ImageMagick quantum range as an integer.

Return Value

int

bool identifyFormat(string $embedText)

Since: 3.3.0

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.

Parameters

string $embedText

A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k".

Return Value

bool

Exceptions

ImagickException

See also

https://www.imagemagick.org/script/escape.php

void inverseFourierTransformImage(Imagick $complement, bool $magnitude)

Since: 3.3.0

Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

Parameters

Imagick $complement

The second image to combine with this one to form either the magnitude / phase or real / imaginary image pair.

bool $magnitude

If true, combine as magnitude / phase pair otherwise a real / imaginary image pair.

Return Value

void

Exceptions

ImagickException

static array listRegistry()

Since: 3.3.0

List all the registry settings. Returns an array of all the key/value pairs in the registry

Return Value

array

An array containing the key/values from the registry.

void rotationalBlurImage(float $angle, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

Rotational blurs an image.

Parameters

float $angle
int $CHANNEL

Return Value

void

Exceptions

ImagickException

void selectiveBlurImage(float $radius, float $sigma, float $threshold, int $CHANNEL = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

Parameters

float $radius
float $sigma
float $threshold
int $CHANNEL

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

Return Value

void

Exceptions

ImagickException

int setAntiAlias(bool $antialias)

Since: 3.3.0

Set whether antialiasing should be used for operations. On by default.

Parameters

bool $antialias

Return Value

int

Exceptions

ImagickException

void setImageBiasQuantum(string $bias)

Since: 3.3.0

No description

Parameters

string $bias

Return Value

void

void setProgressMonitor(callable $callback)

Since: 3.3.0

Set a callback that will be called during the processing of the Imagick image.

Parameters

callable $callback

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.

 bool callback ( mixed $offset , mixed $span ) 

Caution 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.

Return Value

void

Exceptions

ImagickException

static void setRegistry(string $key, string $value)

Since: 3.3.0

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.

Parameters

string $key
string $value

Return Value

void

void statisticImage(int $type, int $width, int $height, int $channel = Imagick::CHANNEL_DEFAULT)

Since: 3.3.0

Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

Parameters

int $type
int $width
int $height
int $channel [optional]

Return Value

void

Exceptions

ImagickException

Imagick subImageMatch(Imagick $imagick, array $bestMatch, float $similarity, float $similarity_threshold, int $metric)

Since: 3.3.0

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.

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

Imagick $imagick
array $bestMatch [optional]
float $similarity

[optional] A new image that displays the amount of similarity at each pixel.

float $similarity_threshold

[optional] Only used if compiled with ImageMagick (library) > 7

int $metric

[optional] Only used if compiled with ImageMagick (library) > 7

Return Value

Imagick

Exceptions

ImagickException

Imagick similarityImage(Imagick $imagick, array $bestMatch, float $similarity, float $similarity_threshold, int $metric)

Since: 3.4.0

Is an alias of Imagick::subImageMatch

Parameters

Imagick $imagick
array $bestMatch [optional]
float $similarity

[optional] A new image that displays the amount of similarity at each pixel.

float $similarity_threshold [optional]
int $metric [optional]

Return Value

Imagick

Exceptions

ImagickException

See also

Imagick::subImageMatch This function is an alias of subImageMatch()

static array<string,string> getConfigureOptions()

Since: 3.4.0

Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.

Return Value

array<string,string>

string getFeatures()

Since: 3.4.0

GetFeatures() returns the ImageMagick features that have been compiled into the runtime.

Return Value

string

int getHDRIEnabled()

Since: 3.4.0

No description

Return Value

int

setImageChannelMask(int $channel)

Since: 3.4.0

Sets the image channel mask. Returns the previous set channel mask.

Only works with Imagick >= 7

Parameters

int $channel

Exceptions

ImagickException

bool evaluateImages(int $EVALUATE_CONSTANT)

Since: 3.4.0

Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence

Parameters

int $EVALUATE_CONSTANT

Return Value

bool

Exceptions

ImagickException

See also

https://www.imagemagick.org/Usage/layers/#evaluate-sequence

bool autoGammaImage(int $channel = Imagick::CHANNEL_ALL)

Since: 3.4.1

Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately.

Parameters

int $channel

[optional] Default value Imagick::CHANNEL_ALL

Return Value

bool

Exceptions

ImagickException

bool autoOrient()

Since: 3.4.1

Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation).

Return Value

bool

Exceptions

ImagickException

bool compositeImageGravity(Imagick $imagick, int $COMPOSITE_CONSTANT, int $GRAVITY_CONSTANT)

Since: 3.4.1

Composite one image onto another using the specified gravity.

Parameters

Imagick $imagick
int $COMPOSITE_CONSTANT
int $GRAVITY_CONSTANT

Return Value

bool

Exceptions

ImagickException

bool localContrastImage(float $radius, float $strength)

Since: 3.4.1

Attempts to increase the appearance of large-scale light-dark transitions.

Parameters

float $radius
float $strength

Return Value

bool

Exceptions

ImagickException

int identifyImageType()

Since: 3.4.3

Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants

Return Value

int

Exceptions

ImagickException

bool setImageAlpha(float $alpha)

Since: 3.4.3

Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity()

Parameters

float $alpha

Return Value

bool

Exceptions

ImagickException

Imagick clone() $PECL imagick 2.0.0)


Makes an exact copy of the Imagick object

Parameters

) $PECL imagick 2.0.0

Return Value

Imagick