Blame view

www/testgd/testgd.php 503 Bytes
5ead64b0   Administrator   090316
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <?php
  if (extension_loaded('gd') && function_exists('gd_info')) {
      echo "PHP GD library is installed on your web server";
  }
  else {
      echo "PHP GD library is NOT installed on your web server";
  }
  
  echo "<pre>"; var_dump(gd_info()); echo "</pre>";
  
  // Let's target an image, copy it, rotate it, and save it
  $img = imagecreatefromjpeg("testgd.jpg");
  $imgRotated = imagerotate($img, 45, 1);
  imagejpeg($imgRotated, "testgdRotated.jpg", 100);
  
  ?>
  
  <img src="testgd.jpg" />
  <img src="testgdRotated.jpg" />