DJ Mike's Tutorials: PHP

ImageMagick Functions

^

Imagick::getImageProperty

Description:
string Imagick::getImageProperty ( string $name )

Returns the named image property. This method is available if Imagick has been compiled against ImageMagick version 6.3.2 or newer.

Parameters:
name
Name of the property (for example Exif:DateTime)

Example



<?php
/* Create new Imagick object */
$snake "white_ledge_snake_close.jpg";
$im = new imagick("$snake");

/* Add comment to the image */
$im->commentImage("<center><img src=\"$snake\"></center>
<p>This snake was right in the middle of a trail that had lots of poison oak on both sides. 
I poked him but instead of moving he started rattling. I tried to pick him up with some of the 
sticks on the side but they kept breaking and dropping the snake. After a couple of drops he 
was really pissed off at me. Since he was posed so nice I took his picture.</p>"
);

/* Display the comment */
echo $im->getImageProperty("comment");

# This would write a new file with the comment
# $im->writeImage("test.jpg");

# With no file name it overwrites the original file 
$im->writeImage();
?>


This snake was right in the middle of a trail that had lots of poison oak on both sides. I poked him but instead of moving he started rattling. I tried to pick him up with some of the sticks on the side but they kept breaking and dropping the snake. After a couple of drops he was really pissed off at me. Since he was posed so nice I took his picture.



^


Was this webpage useful to you? You can support this website by donating.


Created by DJ Mike from Santa Barbara

DJ Mike


<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>