From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39994: 27.0.90; Broken image-converter probe for imagemagick Date: Mon, 03 Aug 2020 02:31:39 +0300 Organization: LINKOV.NET Message-ID: <87a6zc4obo.fsf@mail.linkov.net> References: <87d09mpexq.fsf@mail.linkov.net> <877dztopns.fsf@gnus.org> <87mu8p9mjj.fsf@mail.linkov.net> <87fteb16x0.fsf@gnus.org> <87wo7ma3n7.fsf@mail.linkov.net> <87lfo19mgf.fsf@mail.linkov.net> <87a6zdmqfi.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9422"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 39994@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 03 01:50:09 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 1k2Nk1-0002MK-L4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Aug 2020 01:50:09 +0200 Original-Received: from localhost ([::1]:42130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Nk0-0000kQ-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Aug 2020 19:50:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Nju-0000k5-I4 for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 19:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Nju-0006QY-8R for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 19:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k2Nju-0007OL-5F for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 19:50: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: Sun, 02 Aug 2020 23:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39994-submit@debbugs.gnu.org id=B39994.159641214628342 (code B ref 39994); Sun, 02 Aug 2020 23:50:02 +0000 Original-Received: (at 39994) by debbugs.gnu.org; 2 Aug 2020 23:49:06 +0000 Original-Received: from localhost ([127.0.0.1]:43711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2Niz-0007N4-Ry for submit@debbugs.gnu.org; Sun, 02 Aug 2020 19:49:06 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:44211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2Niw-0007MZ-VG for 39994@debbugs.gnu.org; Sun, 02 Aug 2020 19:49:04 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B4F9DE0002; Sun, 2 Aug 2020 23:48:55 +0000 (UTC) In-Reply-To: <87a6zdmqfi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 02 Aug 2020 09:56:33 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:183901 Archived-At: >> 1. AFAIR one of the goals for creating image-converter.el >> was to handle such rare image formats as WEBP, >> but I tried to open a webp file, and image-converter failed >> because it doesn't recognize WEBP. >> >> There is no WEBP mentioned in the output of "identify -list format". >> After installing `apt-get install webp`, another command >> "identify -list delegate" reports its support with: >> >> Delegate Command >> ------------------------------------------------------------------------------- >> webp => "dwebp' -pam '%i' -o '%o" >> png<= webp "cwebp' -quiet %Q '%i' -o '%o" > > My imagemagick says: > > $ identify -list format | grep -i webp > WEBP* WEBP rw- WebP Image Format (libwebp 0.6.1[0208]) > > So I guess that you have a too-old imagemagick installation? I don't > really think this is an image-converter.el bug, though -- it's best > effort, and if you don't have external programs to display these things, > then it fails. I already upgraded to the latest version, and now the output is exactly the same as yours above. Then even without installing the Debian package 'webp', visiting a webp file shows it just fine as an image with "Image[image-convert]" in the mode-line. So there is no problem anymore. >> 2. After adding manually webp to image-converter-regexp, >> there is another problem: image-converter--convert-magick >> calls the command with >> >> (apply #'call-process (car command) >> nil t nil >> >> where the arg 't' means to mix standard error output with ordinary output, >> but ImageMagick outputs some info messages to stderr, e.g.: >> >> Decoded /tmp/magick-20114vaPD-fxUjRW4. Dimensions: 320 x 214 . Format: lossy. Now saving... >> Saved file /tmp/magick-20114h1Jh0D04beDR >> >> thus breaking the image output. > > Yes, it's a pain that we can't direct stderr to its own buffer. Is > there any reason why? We don't want to write this stuff to a file > (which is allowed), because of the problems with clean-up. I can't reproduce this problem anymore since webp opens without an error. >> 3. Visiting an image file from an archive signals the error >> >> Cannot display image: (IMAGE-FORMAT should be a symbol like ‘image/png’) > > Do you have a test case for this? The test case is to zip a png file and a webp file. Then visiting a png file in the archive displays the image, whereas visiting a webp file signals the error: "Unknown image type; consider switching ‘image-use-external-converter’ on" But the value of 'image-use-external-converter' is already 't'. >> 4. Exif fails to visit images with the error: >> >> Cannot display image: (sequencep 122) >> >> Shouldn't exif code be called with ignore-errors, so its errors won't >> affect the image displaying? >> >> Test case: >> >> exif --output=blackz.jpg --tag=Artist --ifd=0 --set-value='z' test/data/image/black.jpg > > I seem to recall fixing this, and this test case doesn't fail for me (in > Emacs 28.1). Yes, you already fixed it. So it looks like everything is fixed here, and the feature request to support image-converter in archives could be moved to a separate bug#. PS: Also 'image-next-file' currently ignores webp files in Dired-mode.