Check GD Library Version and Test Copy Image Rotate

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 by copying an image on the server and rotating it using one of the GD library functions. Script to display your GD library info. <?php $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 we used to copy and rotate an image on the server. <?php // Let's target an image, copy it, rotate it, and save it $img = imagecreatefromjpeg("myPic.jpg"); $imgRotated = imagerotate($img, 45, -1); imagejpeg($imgRotated, "myPicRotated.jpg", 100); ?> <img src="myPic.jpg"/><img src="myPicRotated.jpg">

PHP Videos

Image Processing

Introduction to PHP Image ProcessingImage Processing LibrariesCheck GD Library Version and Test Copy Image RotateBuild an Image Upload Application to Enable Working With Images On the FlyImage Resize Function Tutorial jpg gif png Change SizeCrop Thumbnail Image Function Tutorial jpg gif pngImage Filter Name Rename Upload TutorialImage Convert Type Function Upload TutorialImage Watermark Function How To Add On the Fly Tutorial
Top of Page
Home Page
Table of Contents
Donate / Support
Web Hosting
Terms of Use
© 2015 All Rights Reserved