我可以水平/垂直翻转图像,但无法使用 GD2 库旋转它们

发布于 2024-10-16 23:11:34 字数 320 浏览 6 评论 0原文

我正在开发一项功能,允许图像以 90 度的增量旋转或水平或垂直翻转。我的代码在我自己的计算机上运行得很好,但是当上传到实时服务器时,旋转功能停止工作。图像仍然可以翻转,但旋转它们不会导致任何变化。没有错误消息。执行旋转的函数返回与旋转成功相同的值。这不是需要重新加载页面的情况(我已经尝试过)。旋转图像后,我应该能够在服务器上找到图像文件,并发现它确实已旋转,但这种情况没有发生。

令人难以置信的部分是翻转功能仍然有效,只是旋转功能停止工作。有谁知道这种情况是否是由服务器设置中的某些内容引起的?也许是不同版本的 GD2 库?我不认为这是代码问题,而是实时服务器的某些不同之处导致了此问题。任何帮助将不胜感激。

I am developing a feature to allow an image to be rotated in increments of 90 degrees or to be flipped horizontally or vertically. I have the code working just fine on my own computer, but when uploaded to a live server, the rotate functionality stops working. The images can still be flipped, but rotating them results in no change at all. There are no error messages. The function that performs the rotation returns the same value as if the rotation was successful. This isn't a case of needing to reload the page (I've tried that). After rotating the image I should be able to find the image file on the server and find that it has indeed been rotated, but that is not happening.

The mind-boggling part of this is that the flipping functionality still works, it's just the rotation functionality that stopped working. Does anyone know if this sort of thing can be caused by something in the server setup? Maybe a different version of the GD2 library? I don't believe that this is a code problem, rather that there's something different about the live server that causes this. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红衣飘飘貌似仙 2024-10-23 23:11:34

查看演示和教程 http://www.innovativephp.com/online-image-rotator-using-php-gd-library-for-improving-design-tasks/ 了解如何使用 php gd 旋转图像的完整详细信息

Check out the demo and tutorial at http://www.innovativephp.com/online-image-rotator-using-php-gd-library-for-improving-design-tasks/ for complete details on how to rotate an image with php gd

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文