Skip to content
Related Articles
Open in App
Not now

Related Articles

PHP Gmagick Functions Complete Reference

Improve Article
Save Article
  • Last Updated : 06 Jan, 2023
Improve Article
Save 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:

 


PHP




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


Output:

GraphicsMagick

The list of complete Gmagick functions are given below:

PHP Gmagick Functions

Description

PHP  Gmagick::addImage() Function This is used to adds new image to Gmagick object image list.
PHP  Gmagick::addnoiseimage() Function This is used to add noise in given image.
PHP  Gmagick::annotateImage() Function This is used to annotates an image with text.
PHP  Gmagick::blurimage() Function The Gmagick::blurimage() function is an inbuilt function in PHP which is used to add blur filter to the image.
PHP  Gmagick::borderImage() Function This is used to draw the border in an image.
PHP  Gmagick::charcoalimage() Function This is used to rotate an image with given degrees
PHP  Gmagick::chopimage() Function This is used to remove the region of an image and trim it.
PHP  Gmagick::clear() Function This is used to clear all resources associated to Gmagick object
PHP  Gmagick::commentImage() Function This is used to add the comment in an image.
PHP  Gmagick::cropimage() Function This is used to extracts the region of the image
PHP  Gmagick::cropthumbnailimage() Function This is used to creates a fixed size thumbnail image by scaling the image down and then cropping a specified area from the center.
PHP  Gmagick::drawimage() Function This  is used to render the GmagickDraw object on the current image.
PHP  Gmagick::edgeimage() Function  This is used to enhance the image edges using convolution filter of the given radius. Radius 0 is used as auto-selected.
PHP  Gmagick::embossimage() Function This is used to enhance the image edges using convolution filter of the given radius. Radius 0 is used as auto-selected.
PHP  Gmagick::enhanceimage() Function This  is used to improve the quality of a noisy image. This function applies the digital filter to improve quality.
PHP  Gmagick::equalizeimage() Function This  is used to equalizes the histogram of an image.
PHP  Gmagick::flipimage() Function This is used to flip the image. This function creates a mirror image by reflecting the pixels along the x-axis.
PHP  Gmagick::flopimage() Function This is used to create a flopped image. This function creates a mirror image along the y-axis.
PHP  Gmagick::gammaimage() Function This is used to corrects the image by providing the Gamma-correction. 
PHP  Gmagick::getcopyright() Function This is used to returns a string containing current Gmagick API copyright.
PHP  Gmagick::getimagechanneldepth() Function This  is used to return the depth for channel image.
PHP  Gmagick::getimagedepth() Function This is used to gets the depth of the image
PHP  Gmagick::getImageDispose() Function This  is used to return the image disposal method.
PHP  Gmagick::getimageformat() Function The Gmagick::getimageformat() function is an inbuilt function in PHP which returns the format of an image.
PHP  Gmagick::getImageMatte() Function This is used to get the matte channel of an Gmagick object.
PHP  Gmagick::getImageRenderingIntent() Function This is used to get the image rendering intent
PHP  Gmagick::getimageresolution() Function This is used to get the resolution of an image object.
PHP  Gmagick::getimagescene() Function This is used to get the image scene of an image.
PHP  Gmagick::getimagesignature() Function This is used to generate an SHA-256 message digest for an image.
PHP  Gmagick::getimageunits() Function This is used to get the units of resolution of a particular image.
PHP  Gmagick::getpackagename() Function This is used to get the GraphicsMagick package name.
PHP  Gmagick::getreleasedate() Function This is used to return the GraphicsMagick release date as a string.
PHP  Gmagick::getversion() Function This is used to return the Gmagick API version.
PHP  Gmagick::implodeimage() Function This is used to creates a new image that is a copy of existing image
PHP  Gmagick::magnifyimage() Function This is used to scale an image proportionally to 2x. This function scales an image into twice of its original size.
PHP  Gmagick::medianfilterimage() Function This is used to apply a digital filter that improves the quality of a noisy image. 
PHP  Gmagick::minifyimage() Function This is used to scale an image proportionally to half of its original size.
PHP  Gmagick::modulateimage() Function This is used to control the brightness, saturation, and hue of an image.
PHP  Gmagick::motionblurimage() Function This is used to simulates motion blur. 
PHP  Gmagick::normalizeimage() Function This is used to enhances the contrast of a color image by adjusting the color of the pixel to span the entire range of colors.
PHP  Gmagick::oilpaintimage() Function This is used to apply a special effect filter that simulates an oil painting. 
PHP  Gmagick::raiseimage() Function This is used to create a simulated three-dimensional button-like effect by creating lightning and darkening the edges of the image.
PHP  Gmagick::reducenoiseimage() Function This is used to set smooth contours of an image while still preserving edge information. 
PHP  Gmagick::resampleimage() Function This is used to resample the image to the desired resolution.
PHP  Gmagick::resizeimage() Function This  is used to scale an image in given dimensions with a filter.
PHP  Gmagick::rollimage() Function The Gmagick::rollimage() function is an inbuilt function in PHP which is used to roll an image.
PHP  Gmagick::rotateimage() Function This  is used to rotate an image in the specified number of degrees.
PHP  Gmagick::scaleimage() Function This is used to scale the size of an image to the given dimensions.
PHP  Gmagick::setimageblueprimary() Function This is used to set the depth for a particular image channel.
PHP  Gmagick::setimagechanneldepth() Function This is used to set the depth of a particular channel image.
PHP  Gmagick::setimagedepth() function This is used to set the depth of a particular image.
PHP  Gmagick::setImageDispose() Function This  is used to sets the image disposal method.
PHP  Gmagick::setimagerenderingintent() Function This is used to set the image rendering intent.
PHP  Gmagick::setimageresolution() Function This is used to set the resolution of an image object.
PHP  Gmagick::shearimage() Function This is used to slide one edge of an image along the X or Y axis to create a parallelogram. 
PHP  Gmagick::solarizeimage() Function This is used to apply to solarize effect on the image.
PHP  Gmagick::spreadimage() Function This  is used to randomly displaces each pixel in a block defined by the variable.
PHP  Gmagick::stripimage() Function This is used to strip an image of all profiles and comments.
PHP  Gmagick::swirlimage() Function This is used to swirl the pixels about the center of the image.
 

  


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!