Subject: | Some JPEGs magic numbers not recognized ? |
Date: | Wed, 21 Dec 2011 17:10:29 +0100 |
To: | bug-Image-GD-Thumbnail [...] rt.cpan.org |
From: | B&A Consultants <infos [...] ba-cst.com> |
Hello,
I just love GD::Thumbnail, but today it almost made some troubles.
Some of the JPEGs we were handling have magic number FF D8 FF DB, and
the image_type function (line 146 and followind) do not take this magic
number into account. So the function returns 'undef', and some stuff
above just aborts.
An added line
return 'Jpeg' if $magic eq "\377\330\377\333";
sovled the problem.
Sincerely,
--
B&A Consultants - Sécurité informatique - Conseils et audits
Tél : (0) 563.277.241 - Fax : (0) 567.737.829