summaryrefslogtreecommitdiff
path: root/lisp/image.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2010-05-25 18:54:53 +0300
committerJuri Linkov <juri@jurta.org>2010-05-25 18:54:53 +0300
commitfc93792445a4414df998a6122c0c90ba69029c13 (patch)
treef1d43d3895c57267d9712b47bcb8c06fe9d374ab /lisp/image.el
parentfa9ba953352517801da5b0578bc78f2df6f898aa (diff)
downloademacs-fc93792445a4414df998a6122c0c90ba69029c13.tar.gz
* image.el (image-animated-p): When delay between animated images is 0,
set it to 10 (0.1 sec). (Bug#6258)
Diffstat (limited to 'lisp/image.el')
-rw-r--r--lisp/image.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/image.el b/lisp/image.el
index b3a0f1a8a7d..287cca81570 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -685,10 +685,13 @@ shall be displayed."
(let* ((metadata (image-metadata image))
(images (plist-get metadata 'count))
(extdata (plist-get metadata 'extension-data))
- (anim (plist-get extdata #xF9)))
- (and (integerp images) (> images 1)
- (stringp anim) (>= (length anim) 4)
- (cons images (+ (aref anim 1) (* (aref anim 2) 256))))))))
+ (anim (plist-get extdata #xF9))
+ (tmo (and (integerp images) (> images 1)
+ (stringp anim) (>= (length anim) 4)
+ (+ (aref anim 1) (* (aref anim 2) 256)))))
+ (when tmo
+ (if (eq tmo 0) (setq tmo 10))
+ (cons images tmo))))))
(provide 'image)