Open In App
Related Articles

PHP Gmagick Functions Complete Reference

Improve Article
Save Article
Like Article

Gmagick is the PHP extension used to create, modify and obtain meta information of an image using GraphicsMagick API. The Gmagick consists of Gmagick, GmagickDraw, and GmagickPixel class.

Example: Below programs illustrate the Gmagick::getpackagename()Function in PHP:

Original Image:



// Create new Gmagick object
$im = new Gmagick(
// Using getpackagename function
echo $im->getpackagename();



The list of complete Gmagick Functions are given below:



Gmagick::addImage()New image to Gmagick object image list.
Gmagick::addnoiseimage()Add noise in given image.
Gmagick::annotateImage()Annotates an image with text.
Gmagick::blurimage()Add blur filter to the image.
Gmagick::borderImage()Draw the border in an image.
Gmagick::charcoalimage()Rotate an image with given degrees
Gmagick::chopimage()Remove the region of an image and trim it.
Gmagick::clear()Clear all resources associated to Gmagick object
Gmagick::commentImage()Add the comment in an image.
Gmagick::cropimage()Extracts the region of the image
Gmagick::cropthumbnailimage()Creates a fixed size thumbnail image by scaling the image down.
Gmagick::drawimage()Render the GmagickDraw object on the current image.
Gmagick::edgeimage()Enhance the image edges using convolution filter of the given radius.
Gmagick::embossimage()Returns a grayscale image with a three-dimensional effect.
Gmagick::enhanceimage()Applies the digital filter to improve quality.
Gmagick::equalizeimage()Equalizes the histogram of an image.
Gmagick::flipimage()Creates a mirror image by reflecting the pixels along the x-axis.
Gmagick::flopimage()Creates a mirror image along the y-axis.
Gmagick::gammaimage()Corrects the image by providing the Gamma-correction.
Gmagick::getcopyright()Returns a string containing current Gmagick API copyright.
Gmagick::getimagechanneldepth()Return the depth for channel image.
Gmagick::getimagedepth()Gets the depth of the image
Gmagick::getImageDispose()Return the image disposal method.
Gmagick::getimageformat()Returns the format of an image.
Gmagick::getImageMatte()Get the matte channel of an Gmagick object.
Gmagick::getImageRenderingIntent()Get the image rendering intent
Gmagick::getimageresolution()Get the resolution of an image object.
Gmagick::getimagescene()Get the image scene of an image.
Gmagick::getimagesignature()Generate an SHA-256 message digest for an image.
Gmagick::getimageunits()Get the units of resolution of a particular image.
Gmagick::getpackagename()Get the GraphicsMagick package name.
Gmagick::getreleasedate()Return the GraphicsMagick release date as a string.
Gmagick::getversion()Return the Gmagick API version.
Gmagick::implodeimage()Creates a new image that is a copy of existing image
Gmagick::magnifyimage()Scales an image into twice of its original size.
Gmagick::medianfilterimage()Apply a digital filter that improves the quality of a noisy image.
Gmagick::minifyimage()Scale an image proportionally to half of its original size.
Gmagick::modulateimage()Control the brightness, saturation, and hue of an image.
Gmagick::motionblurimage()Simulates motion blur.
Enhances the contrast of a color image by adjusting the color of the pixel to span the entire range of colors
Gmagick::oilpaintimage()Apply a special effect filter that simulates an oil painting.
Gmagick::raiseimage()Creating lightning and darkening the edges of the image.
Gmagick::reducenoiseimage()Set smooth contours of an image while still preserving edge information.
Gmagick::resampleimage()Resample the image to the desired resolution.
Gmagick::resizeimage()Scale an image in given dimensions with a filter.
Gmagick::rollimage()It is used to roll an image.
Gmagick::rotateimage()Rotate an image in the specified number of degrees.
Gmagick::scaleimage()Scale the size of an image to the given dimensions.
Gmagick::setimageblueprimary()Set the depth for a particular image channel.
Gmagick::setimagechanneldepth()Set the depth of a particular channel image.
Gmagick::setimagedepth()Set the depth of a particular image.
Gmagick::setImageDispose()Sets the image disposal method.
Gmagick::setimagerenderingintent()Set the image rendering intent.
Gmagick::setimageresolution()Set the resolution of an image object.
Gmagick::shearimage()Slide one edge of an image along the X or Y axis to create a parallelogram.
Gmagick::solarizeimage()It is used to apply to solarize effect on the image.
Gmagick::spreadimage()Randomly displaces each pixel in a block defined by the variable.
Gmagick::stripimage()Strip an image of all profiles and comments.
Gmagick::swirlimage()Swirl the pixels about the center of the image.


Last Updated : 01 Feb, 2023
Like Article
Save Article
Similar Reads
Related Tutorials