使用php或convert命令旋转图像的最佳方法是什么?
使用php或convert命令旋转图像的最佳方法是什么?您可以使用。以下命令将旋转图像:使用php或convert命令旋转图像的最佳方法是什么?,php,imagemagick,image-rotation,Php,Imagemagick,Image Rotation,使用php或convert命令旋转图像的最佳方法是什么?您可以使用。以下命令将旋转图像: convert original_file.jpg -rotate 90 new_file.jpg 使用PHP函数imagerotate 例如: <?php // File and rotation $filename = 'test.jpg'; $degrees = 180; // Content type header('Content-type: image/jpeg'); // Loa
convert original_file.jpg -rotate 90 new_file.jpg
使用PHP函数
imagerotate
例如:
<?php
// File and rotation
$filename = 'test.jpg';
$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);
?>
使用Imagick,使用
你好。我们更喜欢这里研究过的问题,所以我投了反对票。IM手册中介绍了如何使用
convert
旋转图像。