Check GD Library Version and Test Usage : Copy Image and Rotate

Ajax PHP MySQL Tutorial Conversation System For Social Network Websites

Listening Video

Master PHP Image Processing with Adam Khoury in this Video Textbook Series. In this video we learn to write PHP scripts that target GD info array information to see what is installed on our server. We also fire up a few of the functions to test that GD is working.
Lesson Code
<?php// Display your GD library info$gdInfoArray gd_info();$version $gdInfoArray["GD Version"];
echo 
"Your GD version is:".$version;
echo 
"<hr />";
foreach (
$gdInfoArray as $key => $value) {
   echo 
"$key | $value<br />";
}
?>

<!-- This is the code used when we copied and rotated an image -->

<?php// Let's target an image, copy it, rotate it, and save it$img imagecreatefromjpeg("myPic.jpg");$imgRotated imagerotate($img45, -1);imagejpeg($imgRotated"myPicRotated.jpg"100);?><img src="myPic.jpg"/><img src="myPicRotated.jpg"/>

0 Response to "Check GD Library Version and Test Usage : Copy Image and Rotate"

Post a Comment