doucan4873 2015-05-21 17:45
浏览 1018

Imagecreatefromjpeg在读取一些jpeg文件时遇到问题

When i want to create a thumbnail with php and gd library :

$quelle = imagecreatefromjpeg($bild["pfad"]);
$ziel = imagecreatetruecolor($neuebreite,$neuehoehe);
imagecopyresampled($ziel,$quelle,0,0,0,0,$neuebreite,$neuehoehe,$bild['breite'],$bild['hoehe']);
imagejpeg($ziel,"thumbnail/".$nummer."-".$bildid."-temp.jpg",80);

However these warnings occur:

Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /public_html/swupload.php on line 1
Warning: imagecreatefromjpeg(): 'uploads/sw/s12010-1_s s_Jakob.jpeg' is not a valid JPEG file in /public_html/swupload.php on line 1
Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /public_html/swupload.php on line 3

(the image is there and the path is right)
With other pictures it work fine! It works also with cmyk files.

The only Problem are some jpeg files.

How can I support also these?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
    • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
    • ¥15 onvif+openssl,vs2022编译openssl64