duanlv1366 2012-05-18 05:59
浏览 12
已采纳

间歇性重新调整图像问题

I'm uploading images via stream_copy_to_stream() and then re-sizing them using the class and method below.

This is my resize class: http://pastebin.com/wtbcbfzv

I'm using it like so.

$resizeObj = new resize('image.jpg');
$resizeObj -> resizeImage(960, 800, 'auto');
$resizeObj -> saveImage('image.jpg', 100);

However it sometimes works and sometimes doesn't, it just fails, no errors returned at all. I have the memory limit successfully set at 150M and have gone up to 300M with no such luck. I've also made sure that max_execution_time is set to 0 so there's no worries there.

Any suggestions on what could be causing this intermittent issue?


UPDATE This is being returned with the only image with the issue and I noticed the height is 6600 and when reduced to i.e. 5500 it works..

"imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions"

  • 写回答

1条回答 默认 最新

  • dsvjw20866 2012-05-22 02:44
    关注

    Found out it was an issue with the host, who has a process that kills anything that will use x% of ram as it is a shared server. All resolved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比