a broken image, cant open it in php, how to resolve it? imagecreatefromjpeg():Unsupported marker type 0x22

754 views Asked by At

maybe a broken image, it cant open in php.

but it is work in web, emm, any browser.

it work in photoshop and image viewer also.

please ask it,

1,how to do can be make it work in php also?

2,if cant resolve it, how to hidden error message?

imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 13 extraneous bytes before marker 0x22
Unsupported marker type 0x22

//my coode, even i wanna try to hidden error message, it is cant.
try {
    error_reporting(0);            
    ini_set("gd.jpeg_ignore_warning", 1);
    imagecreatefromjpeg($filename);
}(\Exception $e) {

}

try to resolve:

  1. rename with different suffix: jpg, jpeg, gif, png.

  2. run on different environment: linux, windows, php5.6, php7.1.

  3. run on different library: gd2, imagick, gmagick.

still cant resolved. please help me.

this is the pic:

enter image description here

0

There are 0 answers