Bug #79687 [Nab->ReO]: Sony picture - PHP Warning - Make, Model, MakerNotes

From: Date: Fri, 12 Jun 2020 14:34:42 +0000
Subject: Bug #79687 [Nab->ReO]: Sony picture - PHP Warning - Make, Model, MakerNotes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227452@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79687&edit=1 ID: 79687 Updated by: cmb@php.net Reported by: 7tonin at laposte dot net Summary: Sony picture - PHP Warning - Make, Model, MakerNotes -Status: Not a bug +Status: Re-Opened Type: Bug Package: EXIF related Operating System: linux 5.6.14-desktop-2.mga7 x86 PHP Version: 7.3.18 Assigned To: cmb Block user comment: N Private report: N New Comment: > Previous PHP version did succeed in retrieving thumbnailImage > from Exif. Can we call that a regression ? Indeed. I had solely focused on exif_read_data(), but ignored that extracting the thumbnail fails. Previous Comments: ------------------------------------------------------------------------ [2020-06-12 12:36:34] 7tonin at laposte dot net I understand PHP is not supposed to solve problems potentially dropped by image editors. This picture seems cropped before I had received it. Previous PHP version did succeed in retrieving thumbnailImage from Exif. Can we call that a regression ? On my webserver, with the warning comes the modification of file rights to apache:apache (owner:group). I suspect httpd more than PHP, or maybe a secure layer behaviour. Anyway, the workaround is easy. ------------------------------------------------------------------------ [2020-06-12 07:32:00] cmb@php.net Thanks for sending the image by mail! I can confirm the reported behavior, but I cannot see why that would be a bug. The PHP warning for the unmodified image correlates to exiftool's: Warning : Bad MakerNotes directory ------------------------------------------------------------------------ [2020-06-11 12:53:23] cmb@php.net Could you please make the image file available somewhere else for download? ------------------------------------------------------------------------ [2020-06-11 09:39:24] 7tonin at laposte dot net exif_read_data function is also impacted ------------------------------------------------------------------------ [2020-06-11 09:34:05] 7tonin at laposte dot net Description: ------------ The thumbnail of a SONY picture can not be loaded with exif_thumbnail function. PHP Warning: exif_thumbnail(image.jpg): IFD data too short: 0x000C offset 0x000C IFD0.Make : SONY IFD0.Model : DSC-W55 EXIF.MakerNote (not seen) : SONY DSC But, by changing the Exif:make tag value from SONY to Sony, or to SYNO, or even almost whatever else, the thumbnail is loaded. Switching from "SONY" to "Sony" value for Exif:make tag changes the way PHP see the Exif sections. This topic from exiftool.org forum gives details about struggle around this problem. https://exiftool.org/forum/index.php?topic=11303.0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79687&edit=1

« previous php.bugs (#227452) next »