[Top][All Lists]

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

Re: excessively slow image animation

From: Lars Ingebrigtsen
Subject: Re: excessively slow image animation
Date: Wed, 13 Feb 2019 18:03:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Evgeny Zajcev <address@hidden> writes:

> I've got multi frame image at http://lgarc.narod.ru/giphy.mp4
> And run next code on it:
>   (let ((ctime (float-time)))
>     (setq img (create-image "~/tmp/giphy.mp4" 'imagemagick nil :scale 1.0))
>     (insert-image img)
>     (cl-dotimes (index 65)
>       (image-show-frame img index 'nocheck)
>       (sit-for 0.0))
>     (- (float-time) ctime))
>   ==> 18.788017988204956
> 18 seconds to show every frame

Wow, that's slow...


> Now I use method with bmp files.  I would like to use built in `:index' image
> property to animate images, however current animation speed is totally not
> acceptable.  Can this be fixed, or am I doing something wrong?

If I remember correctly, I was the one that added the :index support for
imagemagick images in Emacs.  It's quite likely that I was using
non-optimal ways to do the animation and that imagemagick has better and
faster ways of doing the computation.

Have a look at imagemagick_compute_animated_image in image.c and rewrite
to be faster.  :-)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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