Subject: Re: bug#40127: 27.0.90; image-mode fails on all images with short EXIF tags

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 19 Mar 2020 16:19:35 +0100

Juri Linkov <[email-masked]> writes:

> I realized that the 4th problem reported in bug#39994 is not related to
> image-converter.el, so here is a separate bug report.
>
> The problem is that currently image-mode fails to open all image files
> where one of EXIF tags is shorter than 4 bytes.  So none of the
> images created by a device whose EXIF tag "Manufacturer" is "HTC"
> can not be opened in Emacs 27.

OK, fixed now in Emacs 27.  (Well, I did the fix on the trunk and then
cherry-picked it...  I was slightly unsure whether to also include the
new test cases and files, but I did so anyway -- they won't affect the
release anyway, I think?)

> Here's is the patch that at least allows opening any image
> ignoring errors in EXIF parser implementation:

[...]

> -               (ignore-error exif-error
> +               (ignore-errors
>                   (exif-parse-buffer)))

No, we should never wallpaper over bugs in the code -- we should fix the
bugs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no