顺序JPEG的SOS参数无效 [英] Invalid SOS parameters for sequential JPEG

查看:512
本文介绍了顺序JPEG的SOS参数无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用imagecreatefromjpeg函数时出现此错误.

I' am getting this error when use imagecreatefromjpeg function.

Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG in C:\wamp\www\test\index.php on line 7

我研究了此命令,可以很好地传递错误,效果很好.

I researched, with this commands pass errors fine, works good.

ini_set("gd.jpeg_ignore_warning", 1);
error_reporting(E_ALL & ~E_NOTICE);

但是我想知道这是怎么了?

But I am wondering what is wrong this?

这是我的图像exif数据

here my image exif data

Array
(
    [FileName] => 1.jpg
    [FileDateTime] => 1455186386
    [FileSize] => 1364340
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, COMMENT, EXIF
    [COMPUTED] => Array
        (
            [html] => width="2592" height="1944"
            [Height] => 1944
            [Width] => 2592
            [IsColor] => 1
            [ByteOrderMotorola] => 0
            [ApertureFNumber] => f/1.9
            [UserComment] => 
            [UserCommentEncoding] => UNDEFINED
        )

    [ImageWidth] => 2592
    [ImageLength] => 1944
    [Make] => samsung
    [Model] => SM-G920F
    [Orientation] => 8
    [XResolution] => 72/1
    [YResolution] => 72/1
    [ResolutionUnit] => 2
    [Software] => G920FXXU3COJ1
    [DateTime] => 2016:02:10 18:48:36
    [YCbCrPositioning] => 1
    [Exif_IFD_Pointer] => 226
    [COMMENT] => Array
        (
            [0] => File written by Adobe Photoshop¨ 5.0
        )

    [ExposureTime] => 1/25
    [FNumber] => 19/10
    [ExposureProgram] => 2
    [ISOSpeedRatings] => 200
    [ExifVersion] => 0220
    [DateTimeOriginal] => 2016:02:10 18:48:36
    [DateTimeDigitized] => 2016:02:10 18:48:36
    [ShutterSpeedValue] => 464/100
    [ApertureValue] => 1851/1000
    [BrightnessValue] => 33/100
    [ExposureBiasValue] => 0/10
    [MaxApertureValue] => 1851/1000
    [MeteringMode] => 2
    [Flash] => 0
    [FocalLength] => 220/100
    [MakerNote] => 0100 Z@P
    [UserComment] => 
    [FlashPixVersion] => 0100
    [ColorSpace] => 1
    [ExifImageWidth] => 2592
    [ExifImageLength] => 1944
    [ExposureMode] => 0
    [WhiteBalance] => 0
    [FocalLengthIn35mmFilm] => 22
    [SceneCaptureType] => 0
    [ImageUniqueID] => B05LLHA01PM
)

推荐答案

您可以忽略错误,

ini_set ('gd.jpeg_ignore_warning', 1);

(这是PHP 7.1以来的默认设置,但在较早的版本中不是)

(this is the default since PHP 7.1, but not in older versions)

请参见 http://php.net/manual/en/image.configuration.php

这篇关于顺序JPEG的SOS参数无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆