]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent creating thumbnails of all gif frames
authorMark Oteiza <mvoteiza@udel.edu>
Thu, 2 Feb 2017 01:51:00 +0000 (20:51 -0500)
committerMark Oteiza <mvoteiza@udel.edu>
Thu, 2 Feb 2017 01:51:00 +0000 (20:51 -0500)
With the previous defaults, doing image-dired on a directory with an
animated foo.gif would cause creation of foo.thumb-N.gif for each of
N frames in foo.gif.  By default image-dired looks for foo.thumb.gif, so
there additionally is no usable thumbnail after all the needless effort.
image-dired never handled animation, regardless.
* lisp/image-dired.el: Mention limitation.
(image-dired-cmd-create-thumbnail-options):
(image-dired-cmd-create-temp-image-options):
(image-dired-cmd-create-standard-thumbnail-options): Append [0] to
filename to indicate only converting the 0th frame.
(image-dired-display-image-mode): Don't show a cursor.

lisp/image-dired.el

index 901225fa2e94b1a4f4d68b61a3c685dbb5dac5ee..2a4064560a7579162e72c2fc7d8447576c7ba99b 100644 (file)
@@ -94,6 +94,7 @@
 ;; * WARNING: The "database" format used might be changed so keep a
 ;; backup of `image-dired-db-file' when testing new versions.
 ;;
+;; * `image-dired-display-image-mode' does not support animation
 ;;
 ;; TODO
 ;; ====
@@ -228,7 +229,7 @@ Used together with `image-dired-cmd-create-thumbnail-options'."
   :group 'image-dired)
 
 (defcustom image-dired-cmd-create-thumbnail-options
-  '("-size" "%wx%h" "%f" "-resize" "%wx%h>" "-strip" "jpeg:%t")
+  '("-size" "%wx%h" "%f[0]" "-resize" "%wx%h>" "-strip" "jpeg:%t")
   "Options of command used to create thumbnail image.
 Used with `image-dired-cmd-create-thumbnail-program'.
 Available format specifiers are: %w which is replaced by
@@ -246,7 +247,7 @@ Used together with `image-dired-cmd-create-temp-image-options'."
   :group 'image-dired)
 
 (defcustom image-dired-cmd-create-temp-image-options
-  '("-size" "%wx%h" "%f" "-resize" "%wx%h>" "-strip" "jpeg:%t")
+  '("-size" "%wx%h" "%f[0]" "-resize" "%wx%h>" "-strip" "jpeg:%t")
   "Options of command used to create temporary image for display window.
 Used together with `image-dired-cmd-create-temp-image-program',
 Available format specifiers are: %w and %h which are replaced by
@@ -316,7 +317,7 @@ Available format specifiers are described in
   :group 'image-dired)
 
 (defcustom image-dired-cmd-create-standard-thumbnail-options
-  (append '("-size" "%wx%h" "%f")
+  (append '("-size" "%wx%h" "%f[0]")
           (unless (or image-dired-cmd-pngcrush-program
                       image-dired-cmd-pngnq-program)
             (list
@@ -1626,6 +1627,7 @@ Resized or in full-size."
   :group 'image-dired
   (buffer-disable-undo)
   (image-mode-setup-winprops)
+  (setq cursor-type nil)
   (add-hook 'file-name-at-point-functions 'image-dired-file-name-at-point nil t))
 
 (defvar image-dired-minor-mode-map