emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#6258: closed (create-animated-image hangs)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#6258: closed (create-animated-image hangs)
Date: Tue, 25 May 2010 16:12:03 +0000

Your message dated Tue, 25 May 2010 18:57:45 +0300
with message-id <address@hidden>
and subject line Re: bug#6258: create-animated-image hangs
has caused the GNU bug report #6258,
regarding create-animated-image hangs
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
6258: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6258
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: create-animated-image hangs Date: Mon, 24 May 2010 19:03:21 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
When the delay between images in an animated GIF file is 0,
then calls for `run-with-timer' without delay hangs up.
Replacing it with `run-with-idle-timer' doesn't help.
An example of the animated GIF that hangs up is
http://en.wikipedia.org/wiki/File:Animated_glider_emblem.gif

This patch makes a short delay (0.1 sec) in this case.
Visually its speed looks the same as the speed of changing
images in Firefox when an animated GIF has no delay.

=== modified file 'lisp/image.el'
--- lisp/image.el       2010-04-02 23:28:46 +0000
+++ lisp/image.el       2010-05-24 16:01:45 +0000
@@ -684,10 +684,13 @@ (defun image-animated-p (image)
     (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)

-- 
Juri Linkov
http://www.jurta.org/emacs/



--- End Message ---
--- Begin Message --- Subject: Re: bug#6258: create-animated-image hangs Date: Tue, 25 May 2010 18:57:45 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
> This patch makes a short delay (0.1 sec) in this case.

Committed and closed.

-- 
Juri Linkov
http://www.jurta.org/emacs/


--- End Message ---

reply via email to

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