Functions page: 8

Get image format
Returns the format of a particular image in a sequence.
Image format = JPEG


string getImageFormat ( void )

<?php 
$im 
= new Imagick($input);
$format $im->getImageFormat();
echo 
"Image format = $format<br/>";
 
?>
Get image gamma
Gets the image gamma.
None

Get image geometry
Returns the width and height as an associative array.
None


array getImageGeometry ( void )

<?php 
$im 
= new imagick($input); 

$geometry $im->getImageGeometry(); 
 
$sizex $geometry['width']; 
$sizey $geometry['height']; 
 
?>
Get image gravity
Gets the current gravity value of the image.
None



Unlike getGravity(), this method returns the gravity defined for the current image sequence.
Get image green primary
Returns the chromaticity green primary point. Returns an array with the keys "x" and "y".
None

Get image height
Returns the image height.
The image height is 150


int getImageHeight ( void )

<?php 
$im 
= new Imagick($input);
$height $im->getImageHeight();
echo 
"<br>Image height = $height";
 
?>
Get image histogram
Returns the image histogram as an array of ImagickPixel objects.
R G B A Qty
3 0 0 1 : 2
3 1 0 1 : 3


array getImageHistogram ( void )

<?php 
$im 
= new Imagick();
$im->readImage($input);
$histogram $im->getImageHistogram ();
echo 
" R G B A Qty<br/>";
foreach( 
$histogram as $color ){
  
$colors $color->getColor();
  foreach( 
$colors as $c ){
         print( 
"$c\t" );
  }
  print( 
"\t:\t" $color->getColorCount() . "<br>" );
 }
 
?>


First couple of line only displayed.
Get image index
Returns the index of the current active image within the Imagick object.
None



This method has been deprecated. See getIteratorIndex().
Get image interlace scheme
Gets the image interlace scheme.
The image interlace scheme is 1


int getImageInterlaceScheme ( void )

<?php 
$im 
= new Imagick($input);
$interlace $im->getImageInterlaceScheme();
 
?>
Get image interpolate method
Returns the interpolation method for the specified image.
None



The method is one of the INTERPOLATE_* constants.
Get image iterations
Gets the image iterations.
None

Get image length
Returns the image length in bytes.
The image width is 16345


int getImageLength ( void )

<?php 
$im 
= new Imagick($input);
$width $im->getImageLength();
echo 
"The image width is ".$width;
 
?>


What use is it in bytes!
Get image magick license
Returns a string containing the ImageMagick license
None

Get image matte
Returns TRUE if the image has a matte channel otherwise false.
None

Get image matte color
Returns the image matte color.
None