emacs-diffs
[Top][All Lists]
Advanced

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

master 7ec31d3222: image-dired: Fix thumbnail options for gm


From: Stefan Kangas
Subject: master 7ec31d3222: image-dired: Fix thumbnail options for gm
Date: Thu, 15 Sep 2022 20:24:12 -0400 (EDT)

branch: master
commit 7ec31d32222cdad695bc8324414880be5ca20201
Author: Peter Münster <pm@a16n.net>
Commit: Stefan Kangas <stefankangas@gmail.com>

    image-dired: Fix thumbnail options for gm
    
    * lisp/image/image-dired-external.el
    (image-dired-cmd-create-standard-thumbnail-options): Fix options for
    "gm" (GraphicsMagick).  (Bug#52200)
---
 lisp/image/image-dired-external.el | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/lisp/image/image-dired-external.el 
b/lisp/image/image-dired-external.el
index 223d881bcf..3e3a9a4443 100644
--- a/lisp/image/image-dired-external.el
+++ b/lisp/image/image-dired-external.el
@@ -108,8 +108,8 @@ with the information required by the Thumbnail Managing 
Standard."
     "-text" "b" "Thumb::URI" "file://%f"
     "%q" "%t")
   "Arguments for `image-dired-cmd-pngcrush-program'.
-Available format specifiers are the same as in
-`image-dired-cmd-create-thumbnail-options', with %q for a
+The available %-format specifiers are the same as in
+`image-dired-cmd-create-thumbnail-options', with \"%q\" for a
 temporary file name (typically generated by pnqnq)."
   :version "26.1"
   :type '(repeat (string :tag "Argument")))
@@ -128,20 +128,20 @@ Available format specifiers are described in
   :link '(url-link "man:optipng(1)"))
 
 (defcustom image-dired-cmd-create-standard-thumbnail-options
-  (append '("-size" "%wx%h" "%f[0]")
-          (unless (or image-dired-cmd-pngcrush-program
-                      image-dired-cmd-pngnq-program)
-            (list
-             "-set" "Thumb::MTime" "%m"
-             "-set" "Thumb::URI" "file://%f"
-             "-set" "Description" "Thumbnail of file://%f"
-             "-set" "Software" (emacs-version)))
-          '("-thumbnail" "%wx%h>" "png:%t"))
+  (let ((opts (list
+               "-size" "%wx%h" "%f[0]"
+               "-set" "Thumb::MTime" "%m"
+               "-set" "Thumb::URI" "file://%f"
+               "-set" "Description" "Thumbnail of file://%f"
+               "-set" "Software" (emacs-version)
+               "-thumbnail" "%wx%h>" "png:%t")))
+    (if (executable-find "gm") (cons "convert" opts) opts))
   "Options for creating thumbnails according to the Thumbnail Managing 
Standard.
-Available format specifiers are the same as in
-`image-dired-cmd-create-thumbnail-options', with %m for file modification 
time."
-  :version "26.1"
-  :type '(repeat (string :tag "Argument")))
+The available %-format specifiers are the same as in
+`image-dired-cmd-create-thumbnail-options', with \"%m\" for file
+modification time."
+  :type '(repeat (string :tag "Argument"))
+  :version "29.1")
 
 (defcustom image-dired-cmd-rotate-original-program "jpegtran"
   "Executable used to rotate original image.



reply via email to

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