我想調整上傳的圖像。我得到錯誤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