Created
October 2, 2013 23:19
-
-
Save Greg-Boggs/6801988 to your computer and use it in GitHub Desktop.
gd test script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Report all errors | |
ini_set("display_errors", "1"); | |
error_reporting(E_ALL); | |
$image = 'cat.jpg'; | |
//Load image from source provided | |
$image = imagecreatefromjpeg($image); | |
//Set content type | |
header('content-type: image/jpeg'); | |
//Save image with 90 percent quality | |
imagejpeg($image, '', 90); | |
//clear up memory | |
imagedestroy($image); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment