bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juri Linkov
Subject: bug#40127: 27.0.90; image-mode fails on all images with short EXIF tags
Date: Thu, 19 Mar 2020 01:57:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

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.

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

diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 22d7d91314..10900be33f 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -769,7 +769,7 @@ image-toggle-display-image
     ;; Get the rotation data from the file, if any.
     (setq image-transform-rotation
           (or (exif-orientation
-               (ignore-error exif-error
+               (ignore-errors
                  (exif-parse-buffer)))
               0.0))
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]