all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#39994: 27.0.90; Broken image-converter probe for imagemagick
@ 2020-03-09  0:09 Juri Linkov
  2020-03-09  9:15 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2020-03-09  0:09 UTC (permalink / raw)
  To: 39994

Tags: patch

I tried to visit an .ico file using graphicsmagick image-converter,
but it failed with the error:

  Cannot display image: (/usr/bin/gm convert: Unexpected end-of-file ().

Probably a bug in graphicsmagick, so we can do nothing to fix this.

Then I tried imagemagick, but image-converter said .ico format is unsupported.
Whereas running `convert -list format` outputs:

   Format  Module    Mode  Description
-------------------------------------------------------------------------------
      ICO* ICON      rw+   Microsoft icon

So this patch adds the support for the 'Module' column to imagemagick probe:

diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 0488a13d41..5843b2a399 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -44,8 +44,8 @@ image-converter-regexp
 
 (defvar image-converter--converters
   '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format"))
-    (ffmpeg :command "ffmpeg" :probe "-decoders")
-    (imagemagick :command "convert" :probe ("-list" "format")))
+    (imagemagick :command "convert" :probe ("-list" "format"))
+    (ffmpeg :command "ffmpeg" :probe "-decoders"))
   "List of supported image converters to try.")
 
 (defun image-convert-p (source &optional data-p)
@@ -150,7 +150,7 @@ image-converter--probe
         (forward-line 1)
         ;; Lines look like
         ;; "      WPG* r--   Word Perfect Graphics".
-        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
+        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
           (push (downcase (match-string 1)) formats)))
       (nreverse formats))))
 





^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-08-03 23:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09  0:09 bug#39994: 27.0.90; Broken image-converter probe for imagemagick Juri Linkov
2020-03-09  9:15 ` Lars Ingebrigtsen
2020-03-09 22:43   ` Juri Linkov
2020-03-14 12:02     ` Lars Ingebrigtsen
2020-03-15  0:00       ` Juri Linkov
2020-03-16  0:04         ` Juri Linkov
2020-03-29 23:16           ` Juri Linkov
2020-03-16  0:23         ` Juri Linkov
2020-08-02  7:56           ` Lars Ingebrigtsen
2020-08-02 23:31             ` Juri Linkov
2020-08-03  7:15               ` Lars Ingebrigtsen
2020-08-03 23:42                 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.