Functions page: 9

Get image orientation
Gets the image orientation.
None



The return value is one of the orientation constants.
Get image page
Returns the page geometry associated with the image
None



An array with the keys "width", "height", "x", and "y".
Get image pixel color
Returns the color of the specified pixel.
Alpha: 1
Opacity: 0
Red value: 105
Green value: 134
Blue value: 6



ImagickPixel getImagePixelColor ( int $x , int $y )

<?php 
$im 
= new Imagick($input);
$pixel $im->getImagePixelColor7822 );
echo 
'<br>Alpha: '.$pixel->getColorValue(imagick::COLOR_ALPHA);
echo 
'<br>Opacity: '.$pixel->getColorValue(imagick::COLOR_OPACITY);
echo 
'<br>Red value: '.round255 * ($pixel->getColorValue(imagick::COLOR_RED)));
echo 
'<br>Green value: '.round255 * ($pixel->getColorValue(imagick::COLOR_GREEN)));
echo 
'<br>Blue value: '.round255 * ($pixel->getColorValue(imagick::COLOR_BLUE)));
$im->destroy();
 
?>
Get image profile
Returns the named image profile.
None

Get image profiles
Returns all associated profiles that match the pattern.
None



If TRUE is passed as second parameter only the profile names are returned.
Get image properties
Returns all associated properties that match the pattern.
Output below


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

<?php 
$image 
$input
$im = new Imagick();
$im->pingImage$image );
$info $im->getImageProperties();
echo 
"<pre>";
print_r($info);
echo 
"</pre>";
 
?>


If TRUE is passed as second parameter only the property names are returned.
True is default.
Array
(
[create-date] => 2012-06-13T17:43:47+00:00
[jpeg:colorspace] => 2
[jpeg:sampling-factor] => 2x2,1x1,1x1
[modify-date] => 2012-06-13T17:43:47+00:00
)

Get image property
Returns the named image property.
Imagick


string getImageProperty ( string $name )

<?php 
$im 
= new Imagick();
$im->newImage(300200"black");
$im->setImageProperty('Exif:Make''Imagick');
echo 
$im->getImageProperty('Exif:Make');
 
?>
Get image red primary
Returns the chromaticity red primary point as an array with the keys "x" and "y".
None

Get image region
Extracts a region of the image and returns it as a new Imagick object.
None

Get image rendering intent
Gets the image rendering intent.
None

Get image resolution
Gets the image X and Y resolution.
Array ( [x] => 72 [y] => 72 )


array getImageResolution ( void )

<?php 
$im 
= new Imagick($input);
$resolution $im->getImageResolution();
print_r($resolution);
 
?>
Get image scene
Gets the image scene.
None

Get image signature
Generates an SHA-256 message digest for the image pixel stream.
Image signature = 9a3098f2a9f9f5819d67d373266e9fddd749040971d63e59b27730cf56cd2162


string getImageSignature ( void )

<?php 
$im 
= new Imagick($input);
$signature $im->getImageSignature();
echo 
"<br>Image signature = $signature";
 
?>
Get image size
Returns the image length in bytes.
Image size = 16345


int getImageSize ( void )

<?php 
$im 
= new Imagick($input);
$size $im->getImageSize();
echo 
"<br>Image size = $size";
 
?>
Get image ticks per second
Gets the image ticks-per-second.
None