标题说 JPEG。但我尝试了PNG。它没有用。GD 支持 imagerotate 功能。
if (function_exists('imagerotate')) {
echo "test";
}
它输出单词test。所以我假设我有 imagerotate 功能。
$im = imagecreatetruecolor($width + 10, $height + 10);
...
我做了一些图像处理。我可以毫无问题地看到处理后的图像。但我想旋转最终图像。所以我做了以下。
imagerotate($im,180,0);
imagepng($im,$png,9);
imagedestroy($im);
但我仍然得到没有旋转的图像。我什至只是尝试在不做任何处理的情况下旋转图像。它也没有用。