imagerotate() 不工作

imagerotate() is not working

imagerotate() 函数对我不起作用。见下方代码

    $source = imagecreatefromjpeg($filename);

    // Rotate
    $source = imagerotate($source, 90, 0);

    // Output
    imagejpeg($source);

    // Free the memory
    imagedestroy($source);

这是从 phpinfo 获得的关于 gd 的信息

GD Support enabled GD Version bundled (2.1.0 compatible) FreeType

Support enabled FreeType Linkage with freetype FreeType Version

2.3.11 GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version 6b PNG Support enabled libPNG

Version 1.2.49 WBMP Support enabled XPM Support enabled libXpm

Version 30411 XBM Support enabled

我搜索了很多答案,但没有得到正确答案。

有人可以为此提出解决方案吗?任何帮助将不胜感激

感谢所有回答我问题的人。

它确实有效。它对我不起作用,因为生成了错误,阻止了 imagerotate 函数的执行。

再次感谢。