From: Juri Linkov <juri@jurta.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: 6981@debbugs.gnu.org, Joakim Verona <joakim@verona.se>
Subject: bug#6981: create-animated-image doesn't animate
Date: Mon, 06 Sep 2010 22:32:43 +0100 [thread overview]
Message-ID: <87r5h6immc.fsf@mail.jurta.org> (raw)
In-Reply-To: <87k4mzm06t.fsf@home.jasonrumney.net> (Jason Rumney's message of "Mon, 06 Sep 2010 22:11:22 +0800")
> Note the following limitation mentioned in the comment in image.c:
>
> /* Clear the part of the screen image that are not covered by
> the image from the GIF file. Full animated GIF support
> requires more than can be done here (see the gif89 spec,
> disposal methods). Let's simply assume that the part
> not covered by a sub-image is in the frame's background color. */
So we have two separate problems. The first problem is this limitation.
In Gimp I see animated image frames described as "combine". It seems
this corresponds to the disposal method 1 ("do not dispose, the graphic
is to be left in place") in http://www.w3.org/Graphics/GIF/spec-gif89a.txt
I rememeber there was a function in imagemagick that can do this.
> (setq img (create-animated-image "~/oii.gif"))
> (insert-image img)
> (image-animate-start img)
>
> The last line seems to be neccesary, even though create-animated-image
> starts the animation itself. Other changes to the buffer contents seem
> to stop the animation so that line needs to be evaluated again.
Thanks for the hint. Since animation works (with the limitation above)
when inserted by `insert-image', but doesn't work with `image-mode',
the bug is in `image-mode'. And indeed, removing `append' with
`image-transform-properties' in `image-toggle-display-image' like
@@ -494,10 +494,7 @@ (defun image-toggle-display-image ()
(buffer-substring-no-properties (point-min) (point-max)))
filename))
(type (image-type file-or-data nil data-p))
- (image0 (create-animated-image file-or-data type data-p))
- (image (append image0
- (image-transform-properties image0)
- ))
+ (image (create-animated-image file-or-data type data-p))
(props
`(display ,image
intangible ,image
fixes this bug and restores animation. This means that the Lisp object of
the created image should not be changed.
Joakim, this suggests that the function `image-transform-properties'
you recently added should nconc display properties to the end
of the image spec.
next prev parent reply other threads:[~2010-09-06 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 20:40 bug#6981: create-animated-image doesn't animate Juri Linkov
2010-09-06 12:42 ` Stefan Monnier
2010-09-06 21:31 ` Juri Linkov
2010-09-06 14:11 ` Jason Rumney
2010-09-06 21:32 ` Juri Linkov [this message]
2011-05-29 21:38 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r5h6immc.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=6981@debbugs.gnu.org \
--cc=jasonr@gnu.org \
--cc=joakim@verona.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).