错误:

  imagecreatefromstring(): Empty string or invalid image

  或者

  imagesx() expects parameter 1 to be resource, boolean given

  或者

  imagecopyresized() expects parameter 2 to be resource, boolean given

  或者

  imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable

可能原因是:

  使用图片函数时,传递的图片文件不是正常的图片文件,不能以文件后缀来判断,以mime类型判断更准确。


imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable的更多相关文章

  1. gd-jpeg: JPEG library reports unrecoverable error 解决办法

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecov ...

  2. Call to undefined function imagecreatefromjpeg() 让GD支持JPEG格式的图片扩展

    安装扩展支持jpeg格式: 第一步:首先下载文件: 版本v8: wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz 版本v9: wget http://w ...

  3. php编译GD库 JPEG Support

    Fatal error: Call to undefined function imagecreatefromjpeg() http://chen498402552-163-com.iteye.com ...

  4. 002——keil-Error: L6915E: Library reports error: __use_no_semihosting was requested解决

    ..\OBJ\KEY.axf: Error: L6915E: Library reports error: __use_no_semihosting was requested, but _ttywr ...

  5. php重新编译,gd扩展支持jpeg文件

    晚上写东西的时候,报了一个错误: Call to undefined function imagecreatefromjpeg() 没有开启 jpeg 支持?原来是默认安装的 gd 扩展默认不支持 j ...

  6. PNG和Gif及JPEG图片格式比较

    Gif格式特点 透明性Gif是一种布尔透明类型,既它可以是全透明,也可以是全不透明,但是它并没有半透明(alpha 透明). 动画Gif这种格式支持动画. 无损耗性Gif是一种无损耗的图像格式,这也意 ...

  7. Linux 下V4l2摄像头采集图片,实现yuyv转RGB,RGB转BMP,RGB伸缩,jpeglib 库实现压缩RGB到内存中,JPEG经UDP发送功(转)

    ./configure CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld --host=arm-linux --prefix=/usr/loca ...

  8. GD库使用小结---2

    接着上一篇.GD库可以折腾很多用法出来,当然得跟画图相关,除了前面的验证码.水印外,还可以进行图片的缩放,裁剪.旋转等操作,这在很多应用中可以见到. 1. 加水印 前面已经知道,我们可以使用image ...

  9. 编译安装php5 解决编译安装的php加载不了gd

    1. 编译安装php需要的模块: yum install libxml2-devel libxml2  curl curl-devel  libpng-devel  libpng  openssl o ...

随机推荐

  1. Python之标示符和关键字

    <1>标示符 开发人员在程序中自定义的一些符号和名称 标示符是自己定义的,如变量名 .函数名等 <2>标示符的规则 标示符由字母.下划线和数字组成,且数字不能开头 python ...

  2. Computer Network Homework3’ s hard question

    Computer Network Homework3’ s hard question 1. Which kind of protocol does CSMA belong to? A. Random ...

  3. Interface default method介绍

    一.introduce interface default method Introduce default methodWrite the default method at interfaceTh ...

  4. python3.5 元组

    1.创建元祖 tup1 = ('jenkins','mysql') print(tup1) ssh://root@192.168.0.204:22/usr/bin/python -u /home/pr ...

  5. java:LeakFilling(JSP,servlet,Ajax,Json,Path)

    1. request.setAttribute("test", "测试");       request.getRequestDispatcher(" ...

  6. js移动端滑动效果

    移动端触屏滑动的效果其实就是图片轮播,在PC的页面上很好实现,绑定click和mouseover等事件来完成.但是在移动设备上,要实现这种轮播的效果,就需要用到核心的touch事件.处理touch事件 ...

  7. H3C版本升级

    H3C S5500和S3100都可以通过TFTP方式进行升级,1.设置交换机的vlan1的ip地址,如10.10.10.2/242.设置电脑和交换机连接的ip地址,如10.10.10.1/243.在交 ...

  8. IIS配置安卓下载.apk文件

    前提:你的.apk文件所在路径正确,例如:www.grainnews.com.cn:8002/Attach/Images/201807/20180712091842127.apk 1.打开IIS 2. ...

  9. flask config笔记

    #从flask这个包中导入Flask这个类 #Flask这个类是项目的核心,以后很多操作都是基于这个类的对象 #注册url.注册蓝图等都是基于这个类的对象 from flask import Flas ...

  10. MAS多媒体的整个存储架构是怎样的?

    MAS多媒体的整个存储架构是怎样的?