我想调整上传的图像。我得到错误PHP图像调整大小错误
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /home/rumdood/lib/photograph.php on line 309
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/home/rumdood/public_html/uploads/13018946005603.jpg' is not a valid JPEG file in /home/rumdood/lib/photograph.php on line 309
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/rumdood/lib/photograph.php on line 410
Warning: Cannot modify header information - headers already sent by (output started at /home/rumdood/lib/photograph.php:309) in /home/rumdood/application.php on line 22
而图像没有被调整大小。最后一个错误是由于标题功能。
管道309是这样
$this->image['render'] = imagecreatefromjpeg($this->s_image);
线410是这样
imagecopyresampled($this->image['composite'], $this->image['render'],
0, 0, 0, 0, $new_width, $new_height,
$this->image['width'], $this->image['height']);
我的PHP版本是PHP Version 5.2.6
我来自的phpinfo
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled
什么是$ this-> s_image? – grc 2011-04-04 06:30:58
沿线的某处$ this-> s_image未获取数据填充,已损坏或不是jpg – 2011-04-04 06:32:28
@grc多数民众赞成的图像的绝对文件路径 – 2011-04-04 06:35:22