From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87a74d2p4g.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22538"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 40127@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 19 00:59:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEiag-0005lj-FP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Mar 2020 00:59:14 +0100 Original-Received: from localhost ([::1]:59882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEiaf-0007Io-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 19:59:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51413) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEiaW-0007Gh-Al for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:59:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEiaU-0007wF-CT for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:59:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35608) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEiaU-0007vy-9W for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEiaU-0005XO-8G for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2020 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40127 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158457592321247 (code B ref -1); Wed, 18 Mar 2020 23:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Mar 2020 23:58:43 +0000 Original-Received: from localhost ([127.0.0.1]:41581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEiaB-0005Wd-DZ for submit@debbugs.gnu.org; Wed, 18 Mar 2020 19:58:43 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEia7-0005WU-QL for submit@debbugs.gnu.org; Wed, 18 Mar 2020 19:58:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51227) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEia6-0006pT-JS for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:58:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEia5-0007Um-IK for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:58:38 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:52303) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jEia5-0007St-CY for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 19:58:37 -0400 X-Originating-IP: 91.129.96.173 Original-Received: from mail.gandi.net (m91-129-96-173.cust.tele2.ee [91.129.96.173]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0130F40003 for ; Wed, 18 Mar 2020 23:58:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177530 Archived-At: 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))