Works/PHP
Imagerotate 테스트 소스
Antamis
2015. 11. 9. 16:04
<?php
// File and rotation
$filename = 'IMG_9801.jpg'; // $filename 은 테스트 환경에 맞는 다른 파일로 대체하여 사용
$degrees = 180;
// Content type
header('Content-type: image/jpeg');
// Load
$source = imagecreatefromjpeg($filename);
// Rotate
$rotate = imagerotate($source, $degrees, 0);
// Output
imagejpeg($rotate);
// Free the memory
imagedestroy($source);
imagedestroy($rotate);
?>