Home > Backend Development > PHP Tutorial > php resizeimage partial jpg file analysis and solutions for failure to generate thumbnails, _PHP tutorial

php resizeimage partial jpg file analysis and solutions for failure to generate thumbnails, _PHP tutorial

WBOY
Release: 2016-07-12 08:56:13
Original
933 people have browsed it

php resizeimage Reason analysis and solution for failure to generate thumbnails for some jpg files,

Today I encountered GD’s resizeimage function when processing thumbnails of jpg suffix files, prompting this image It is not a legal jpg image and an error will be reported

<b>Warning</b>: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG 
Copy after login

I searched a lot of information on the domestic Internet but could not find an effective solution. It turns out that the solution can be solved by opening the GD jpeg file

ini_set('gd.jpeg_ignore_warning', true); 
Copy after login

Write the above line of code at the beginning or open this configuration in the php.ini file

The above content is an analysis and solution for the failure to generate thumbnails for some jpg files in php resizeimage. I hope it will be helpful to everyone!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1113711.htmlTechArticlephp resizeimage Reason analysis and solution for failure to generate thumbnails for some jpg files. Today I encountered GD's resizeimage function processing When the thumbnail of a jpg suffix file is displayed, it prompts that the image is not...
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template