Home > Backend Development > PHP Tutorial > php resizeimage failed to generate thumbnails for some jpg files, _PHP Tutorial

php resizeimage failed to generate thumbnails for some jpg files, _PHP Tutorial

WBOY
Release: 2016-07-12 08:56:36
Original
858 people have browsed it

php resizeimage failed to generate thumbnails for some jpg files.

Today I encountered GD’s resizeimage function when processing thumbnails of jpg suffix files. It prompted that the image was not a legal jpg image and Report an error

<span>1</span> <b>Warning</b>:  imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters <span>for</span> 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

<span>1</span> <span>ini_set</span>('gd.jpeg_ignore_warning', <span>true</span>);
Copy after login

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1111694.htmlTechArticlephp resizeimage failed to generate thumbnails for some jpg files. Today I encountered GD's resizeimage function to process the thumbnails of jpg suffix files. When prompted, the image is not a legal jpg image and an error is reported...
Related labels:
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