ImageMagick
PHP Manual

The Imagick class

Class synopsis

Imagick
Imagick implements Iterator , Traversable {
bool Imagick::adaptiveBlurImage ( float $radius , float $sigma [, int $channel ] )
bool Imagick::adaptiveResizeImage ( int $columns , int $rows [, bool $fit ] )
bool Imagick::adaptiveSharpenImage ( float $radius , float $sigma [, int $channel ] )
bool Imagick::adaptiveThresholdImage ( int $width , int $height , int $offset )
bool Imagick::addImage ( Imagick $source )
bool Imagick::addNoiseImage ( int $noise_type [, int $channel ] )
bool Imagick::annotateImage ( ImagickDraw $draw_settings , float $x , float $y , float $angle , string $text )
Imagick Imagick::appendImages ( bool $stack )
Imagick Imagick::averageImages ( void )
bool Imagick::blackThresholdImage ( mixed $threshold )
bool Imagick::blurImage ( float $radius , float $sigma [, int $channel ] )
bool Imagick::borderImage ( mixed $bordercolor , int $width , int $height )
bool Imagick::charcoalImage ( float $radius , float $sigma )
bool Imagick::chopImage ( int $width , int $height , int $x , int $y )
bool Imagick::clear ( void )
bool Imagick::clipImage ( void )
bool Imagick::clipPathImage ( string $pathname , bool $inside )
Imagick Imagick::clone ( void )
bool Imagick::clutImage ( Imagick $lookup_table [, int $channel ] )
Imagick Imagick::coalesceImages ( void )
bool Imagick::colorFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y )
bool Imagick::colorizeImage ( mixed $colorize , mixed $opacity )
Imagick Imagick::combineImages ( int $channelType )
bool Imagick::commentImage ( string $comment )
Imagick Imagick::compareImageChannels ( Imagick $image , int $channelType , int $metricType )
Imagick Imagick::compareImageLayers ( int $method )
array Imagick::compareImages ( Imagick $compare , int $metric )
bool Imagick::compositeImage ( Imagick $composite_object , int $composite , int $x , int $y [, int $channel ] )
Imagick Imagick::__construct ([ mixed $files ] )
bool Imagick::contrastImage ( bool $sharpen )
bool Imagick::contrastStretchImage ( float $black_point , float $white_point [, int $channel ] )
bool Imagick::convolveImage ( array $kernel [, int $channel ] )
bool Imagick::cropImage ( int $width , int $height , int $x , int $y )
bool Imagick::cropThumbnailImage ( int $width , int $height )
Imagick Imagick::current ( void )
bool Imagick::cycleColormapImage ( int $displace )
bool Imagick::destroy ( void )
bool Imagick::displayImage ( string $servername )
bool Imagick::displayImages ( string $servername )
bool Imagick::distortImage ( int $method , array $arguments , bool $bestfit )
bool Imagick::edgeImage ( float $radius )
bool Imagick::embossImage ( float $radius , float $sigma )
bool Imagick::enhanceImage ( void )
bool Imagick::equalizeImage ( void )
bool Imagick::evaluateImage ( int $op , float $constant [, int $channel ] )
Imagick Imagick::flattenImages ( void )
bool Imagick::flipImage ( void )
bool Imagick::flopImage ( void )
bool Imagick::frameImage ( mixed $matte_color , int $width , int $height , int $inner_bevel , int $outer_bevel )
Imagick Imagick::fxImage ( string $expression [, int $channel ] )
bool Imagick::gammaImage ( float $gamma [, int $channel ] )
bool Imagick::gaussianBlurImage ( float $radius , float $sigma [, int $channel ] )
string Imagick::getCopyright ( void )
string Imagick::getFilename ( void )
string Imagick::getFormat ( void )
string Imagick::getHomeURL ( void )
Imagick Imagick::getImage ( void )
ImagickPixel Imagick::getImageBackgroundColor ( void )
string Imagick::getImageBlob ( void )
ImagickPixel Imagick::getImageBluePrimary ( float $x , float $y )
ImagickPixel Imagick::getImageBorderColor ( void )
int Imagick::getImageChannelDepth ( int $channelType )
float Imagick::getImageChannelDistortion ( Imagick $reference , int $channel , int $metric )
array Imagick::getImageChannelExtrema ( int $channel )
array Imagick::getImageChannelMean ( int $channel )
ImagickPixel Imagick::getImageColormapColor ( int $index )
float Imagick::getImageDistortion ( MagickWand $reference , int $metric )
array Imagick::getImageExtrema ( void )
string Imagick::getImageFilename ( void )
string Imagick::getImageFormat ( void )
float Imagick::getImageGamma ( void )
ImagickPixel Imagick::getImageMatteColor ( void )
array Imagick::getImagePage ( void )
ImagickPixel Imagick::getImagePixelColor ( int $x , int $y )
string Imagick::getImageProfile ( string $name )
array Imagick::getImageProfiles ([ string $pattern [, bool $only_names ]] )
array Imagick::getImageProperties ([ string $pattern [, bool $only_names ]] )
string Imagick::getImageProperty ( string $name )
Imagick Imagick::getImageRegion ( int $width , int $height , int $x , int $y )
int Imagick::getImageSize ( void )
int Imagick::getImageType ( void )
string Imagick::getOption ( string $key )
string Imagick::getPackageName ( void )
array Imagick::getPage ( void )
ImagickPixelIterator Imagick::getPixelIterator ( void )
ImagickPixelIterator Imagick::getPixelRegionIterator ( int $x , int $y , int $columns , int $rows )
array Imagick::getQuantumDepth ( void )
array Imagick::getQuantumRange ( void )
string Imagick::getReleaseDate ( void )
int Imagick::getResource ( int $type )
int Imagick::getResourceLimit ( int $type )
array Imagick::getSize ( void )
array Imagick::getVersion ( void )
bool Imagick::hasNextImage ( void )
array Imagick::identifyImage ([ bool $appendRawOutput ] )
bool Imagick::implodeImage ( float $radius )
bool Imagick::labelImage ( string $label )
bool Imagick::levelImage ( float $blackPoint , float $gamma , float $whitePoint [, int $channel ] )
bool Imagick::linearStretchImage ( float $blackPoint , float $whitePoint )
bool Imagick::magnifyImage ( void )
bool Imagick::mapImage ( Imagick $map , bool $dither )
bool Imagick::matteFloodfillImage ( float $alpha , float $fuzz , mixed $bordercolor , int $x , int $y )
bool Imagick::medianFilterImage ( float $radius )
bool Imagick::minifyImage ( void )
bool Imagick::modulateImage ( float $brightness , float $saturation , float $hue )
Imagick Imagick::montageImage ( ImagickDraw $draw , string $tile_geometry , string $thumbnail_geometry , int $mode , string $frame )
Imagick Imagick::morphImages ( int $number_frames )
Imagick Imagick::mosaicImages ( void )
bool Imagick::motionBlurImage ( float $radius , float $sigma , float $angle )
bool Imagick::negateImage ( bool $gray [, int $channel ] )
bool Imagick::newImage ( int $cols , int $rows , mixed $background [, string $format ] )
bool Imagick::newPseudoImage ( int $columns , int $rows , string $pseudoString )
bool Imagick::nextImage ( void )
bool Imagick::normalizeImage ([ int $channel ] )
bool Imagick::oilPaintImage ( float $radius )
bool Imagick::paintFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y )
bool Imagick::paintOpaqueImage ( mixed $target , mixed $fill , float $fuzz [, int $channel ] )
bool Imagick::paintTransparentImage ( mixed $target , float $alpha , float $fuzz )
bool Imagick::pingImage ( string $filename )
bool Imagick::pingImageBlob ( string $image )
bool Imagick::pingImageFile ( resource $filehandle [, string $fileName ] )
bool Imagick::polaroidImage ( ImagickDraw $properties , float $angle )
bool Imagick::posterizeImage ( int $levels , bool $dither )
bool Imagick::previewImages ( int $preview )
bool Imagick::previousImage ( void )
bool Imagick::profileImage ( string $name , string $profile )
bool Imagick::quantizeImage ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )
bool Imagick::quantizeImages ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )
array Imagick::queryFontMetrics ( ImagickDraw $properties , string $text [, bool $multiline ] )
array Imagick::queryFonts ([ string $pattern ] )
array Imagick::queryFormats ([ string $pattern ] )
bool Imagick::radialBlurImage ( float $angle [, int $channel ] )
bool Imagick::raiseImage ( int $width , int $height , int $x , int $y , bool $raise )
bool Imagick::randomThresholdImage ( float $low , float $high [, int $channel ] )
bool Imagick::readImage ( string $filename )
bool Imagick::readImageBlob ( string $image [, string $filename ] )
bool Imagick::readImageFile ( resource $filehandle [, string $fileName ] )
bool Imagick::reduceNoiseImage ( float $radius )
bool Imagick::removeImage ( void )
string Imagick::removeImageProfile ( string $name )
bool Imagick::render ( void )
bool Imagick::resampleImage ( float $x_resolution , float $y_resolution , int $filter , float $blur )
bool Imagick::resizeImage ( int $columns , int $rows , int $filter , float $blur [, bool $fit ] )
bool Imagick::rollImage ( int $x , int $y )
bool Imagick::rotateImage ( mixed $background , float $degrees )
bool Imagick::roundCorners ( float $x_rounding , float $y_rounding [, float $stroke_width [, float $displace [, float $size_correction ]]] )
bool Imagick::sampleImage ( int $columns , int $rows )
bool Imagick::scaleImage ( int $cols , int $rows [, bool $fit ] )
bool Imagick::separateImageChannel ( int $channel )
bool Imagick::sepiaToneImage ( float $threshold )
bool Imagick::setBackgroundColor ( mixed $background )
bool Imagick::setCompression ( int $compression )
bool Imagick::setCompressionQuality ( int $quality )
bool Imagick::setFilename ( string $filename )
bool Imagick::setFont ( string $font )
bool Imagick::setFormat ( string $format )
bool Imagick::setImage ( Imagick $replace )
bool Imagick::setImageBias ( float $bias )
bool Imagick::setImageBluePrimary ( float $x , float $y )
bool Imagick::setImageChannelDepth ( int $channel , int $depth )
bool Imagick::setImageColormapColor ( int $index , ImagickPixel $color )
bool Imagick::setImageColorspace ( int $colorspace )
bool Imagick::setImageCompose ( int $compose )
bool Imagick::setImageCompression ( int $compression )
bool Imagick::setImageDelay ( int $delay )
bool Imagick::setImageDepth ( int $depth )
bool Imagick::setImageDispose ( int $dispose )
bool Imagick::setImageExtent ( int $columns , int $rows )
bool Imagick::setImageFilename ( string $filename )
bool Imagick::setImageFormat ( string $format )
bool Imagick::setImageGamma ( float $gamma )
bool Imagick::setImageGreenPrimary ( float $x , float $y )
bool Imagick::setImageIndex ( int $index )
bool Imagick::setImageInterlaceScheme ( int $interlace_scheme )
bool Imagick::setImageIterations ( int $iterations )
bool Imagick::setImageMatte ( bool $matte )
bool Imagick::setImageOpacity ( float $opacity )
bool Imagick::setImageOrientation ( int $orientation )
bool Imagick::setImagePage ( int $width , int $height , int $x , int $y )
bool Imagick::setImageProfile ( string $name , string $profile )
bool Imagick::setImageProperty ( string $name , string $value )
bool Imagick::setImageRedPrimary ( float $x , float $y )
bool Imagick::setImageRenderingIntent ( int $rendering_intent )
bool Imagick::setImageResolution ( float $x_resolution , float $y_resolution )
bool Imagick::setImageScene ( int $scene )
bool Imagick::setImageTicksPerSecond ( int $ticks_per-second )
bool Imagick::setImageType ( int $image_type )
bool Imagick::setImageUnits ( int $units )
bool Imagick::setImageWhitePoint ( float $x , float $y )
bool Imagick::setInterlaceScheme ( int $interlace_scheme )
bool Imagick::setIteratorIndex ( int $index )
bool Imagick::setOption ( string $key , string $value )
bool Imagick::setPage ( int $width , int $height , int $x , int $y )
bool Imagick::setResolution ( float $x_resolution , float $y_resolution )
bool Imagick::setResourceLimit ( int $type , int $limit )
bool Imagick::setSamplingFactors ( array $factors )
bool Imagick::setSize ( int $columns , int $rows )
bool Imagick::setSizeOffset ( int $columns , int $rows , int $offset )
bool Imagick::setType ( int $image_type )
bool Imagick::shadeImage ( bool $gray , float $azimuth , float $elevation )
bool Imagick::shadowImage ( float $opacity , float $sigma , int $x , int $y )
bool Imagick::sharpenImage ( float $radius , float $sigma [, int $channel ] )
bool Imagick::shaveImage ( int $columns , int $rows )
bool Imagick::shearImage ( mixed $background , float $x_shear , float $y_shear )
bool Imagick::sigmoidalContrastImage ( bool $sharpen , float $alpha , float $beta [, int $channel ] )
bool Imagick::sketchImage ( float $radius , float $sigma , float $angle )
bool Imagick::solarizeImage ( int $threshold )
bool Imagick::spliceImage ( int $width , int $height , int $x , int $y )
bool Imagick::spreadImage ( float $radius )
Imagick Imagick::steganoImage ( Imagick $watermark_wand , int $offset )
bool Imagick::stereoImage ( Imagick $offset_wand )
bool Imagick::stripImage ( void )
bool Imagick::swirlImage ( float $degrees )
bool Imagick::textureImage ( Imagick $texture_wand )
bool Imagick::thresholdImage ( float $threshold [, int $channel ] )
bool Imagick::thumbnailImage ( int $columns , int $rows [, bool $fit ] )
bool Imagick::tintImage ( mixed $tint , mixed $opacity )
Imagick Imagick::transformImage ( string $crop , string $geometry )
bool Imagick::trimImage ( float $fuzz )
bool Imagick::unsharpMaskImage ( float $radius , float $sigma , float $amount , float $threshold [, int $channel ] )
bool Imagick::valid ( void )
bool Imagick::vignetteImage ( float $blackPoint , float $whitePoint , int $x , int $y )
bool Imagick::waveImage ( float $amplitude , float $length )
bool Imagick::whiteThresholdImage ( mixed $threshold )
bool Imagick::writeImage ([ string $filename ] )
bool Imagick::writeImages ( string $filename , bool $adjoin )
}

Image methods and global methods

The Imagick class has the ability to hold and operate on multiple images simultaneously. This is achieved through an internal stack. There is always an internal pointer that points at the current image. Some functions operate on all images in the Imagick class, but most operate only on the current image in the internal stack. As a convention, method names can contain the word Image to denote they affect only the current image in the stack.

Class Methods

Because there are so many methods, here is a handy list of methods, somewhat reduced to their general purpose:

Class methods by purpose
Image effects Get methods Set methods Read/write images Other
adaptiveBlurImage getCompression setBackgroundColor __construct clear
adaptiveResizeImage getFilename setCompressionQuality addImage clone
adaptiveSharpenImage getFormat setCompression appendImages current
adaptiveTresholdImage getImageBackgroundColor setFilename getFilename destroy
addNoiseImage getImageBlob setFormat getFormat getCopyright
affinetransformimage getImageBluePrimary setImageBackgroundColor getImageFilename getHomeURL
annotateImage getImageBorderColor setFirstIterator getImageFormat commentImage
averageImages getImageChannelDepth setImageBias getImage getNumberImages
blackThresholdImage getImageChannelDistortion setImageBluePrimary setImageFilename getReleaseDate
blurImage getImageChannelExtrema setImageBorderColor setImageFormat getVersion
borderImage getImageChannelMean setImageChannelDepth readImageFile hasNextImage
charcoalImage getImageChannelStatistics setImageColormapColor readImage hasPreviousImage
chopImage getImageColormapColor setImageColorSpace writeImages labelImage
clipImage getImageColorspace setImageCompose writeImage newImage
clipPathImage getImageColors setImageCompression   newPseudoImage
coalesceImages getImageCompose setImageDelay   nextImage
colorFloodFillImage getImageDelay setImageDepth   pingImageBlob
colorizeImage getImageDepth setImageDispose   pingImageFile
combineImages getImageDispose setImageDispose   pingImage
compareImageChannels getImageDistortion setImageExtent   previousImage
compareImageLayers getImageExtrema setImageFilename   profileImage
compositeImage getImageFilename setImageFormat   queryFormats
contrastImage getImageFormat setImageGamma   removeImageProfile
constrastStretchImage getImageGamma setImageGreenPrimary   removeImage
convolveImage getImageGeometry setImageIndex   setFirstIterator
cropImage getImageGreenPrimary setImageInterpolateMethod   setImageIndex
cycleColormapImage getImageHeight setImageIterations   valid
deconstructImages getImageHistogram setImageMatteColor    
drawImage getImageIndex setImageMatte    
edgeImage getImageInterlaceScheme setImagePage    
embossImage getImageInterpolateMethod setImageProfile    
enhanceImage getImageIterations setImageProperty    
equalizeImage getImageMatteColor setImageRedPrimary    
evaluateImage getImageMatte setImageRenderingIntent    
flattenImages getImagePage setImageResolution    
flipImage getImagePixelColor setImageScene    
flopImage getImageProfile setImageTicksPerSecond    
imageImage getImageProperty setImageType    
fxImage getImageRedPrimary setImageUnits    
gammaImage getImageRegion setImageVirtualPixelMethod    
gaussianBlurImage getImageRenderingIntent setImageWhitepoint    
implodeImage getImageResolution setInterlaceScheme    
levelImage getImageScene setOption    
linearStretchImage getImageSignature setPage    
magnifyImage getImageTicksPerSecond setResolution    
matteFloodFilleImage getImageTotalInkDensity setResourceLimit    
medianFilterImage getImageType setSamplingFactors    
minifyImage getImageUnits setSizeOffset    
modulateImage getImageVirtualPixelMethod setSize    
montageImage getImageWhitepoint setType    
morphImages getImageWidth      
mosaicImages getImage      
motionBlurImage getInterlaceScheme      
negateImage getNumberImages      
normalizeImage getOption      
oilPaintImage getPackageName      
optimizeImageLayers getPage      
paintOpaqueImage getPixelIterator      
paintTransparentImage getPixelRegionIterator      
posterizeImage getQuantumDepth      
radialBlurImage getQuantumRange      
raiseImage getResourceLimit      
randomThresholdImage getResource      
reduceNoiseImage getSamplingFactors      
render getSizeOffset      
resampleImage getSize      
resizeImage identifyImage      
rollImage getImageSize      
rotateImage        
sampleImage        
scaleImage        
separateImageChannel        
sepiaToneImage        
shadeImage        
shadowImage        
sharpenImage        
shaveImage        
shearImage        
sigmoidalContrastImage        
sketchImage        
solarizeImage        
spliceImage        
spreadImage        
steganoImage        
stereoImage        
stripImage        
swirlImage        
textureImage        
thresholdImage        
thumbnailImage        
tintImage        
transverseImage        
trimImage        
uniqueImageColors        
unsharpMaskImage        
vignetteImage        
waveImage        
whiteThresholdImage        

Table of Contents


ImageMagick
PHP Manual