0

When I'm trying to save an image using the native php function imagecreatefromjpeg sometimes I have the following error:

gd-jpeg, libjpeg: recoverable error: Warning: unknown JFIF revision number 2.01

What I understand (I could be wrong) is that the JFIF version is higher than the one supported by the native php function.

How could I process the image or at least fail gracefully? (Today the page is showing a HTTP 500 error)

darkheir
  • 8,844
  • 6
  • 45
  • 66
  • 1
    your system libjpeg needs to be upgraded. this isn't a PHP error - it's the PHP gd module using an outdated jpeg library on your system. – Marc B Mar 03 '14 at 19:29
  • FWIW: The latest revision of JFIF is [1.02](http://www.w3.org/Graphics/JPEG/jfif3.pdf). The version number seems inverted or just completely bogus. – Harald K Mar 04 '14 at 07:44
  • Hum we start to see some 2.xx revision of JFIF : http://fileformats.archiveteam.org/wiki/JFIF => JFIF 2.xx (~2014): Starting with version 9a, the Independent JPG Group's software supports JFIF 2.01 (e.g. using cjpeg -bgycc), which apparently implies that that the image uses big gamut YCC. We have not located any specifications for this JFIF version. – darkheir Mar 04 '14 at 09:07

0 Answers0