From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: excessively slow image animation Date: Wed, 13 Feb 2019 17:39:38 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008b85d90581c78331" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="46003"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 15:55:56 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtvx2-000BnP-5S for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2019 15:55:52 +0100 Original-Received: from localhost ([127.0.0.1]:58054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtvx1-0005eC-5q for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2019 09:55:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtvtH-0003d6-HO for emacs-devel@gnu.org; Wed, 13 Feb 2019 09:52:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtvhd-0001WL-Sa for emacs-devel@gnu.org; Wed, 13 Feb 2019 09:39:59 -0500 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:46053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtvhd-0001EF-Hq for emacs-devel@gnu.org; Wed, 13 Feb 2019 09:39:57 -0500 Original-Received: by mail-lj1-x22a.google.com with SMTP id s5-v6so2176322ljd.12 for ; Wed, 13 Feb 2019 06:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rJIH1msdw+aoYUcfHqauP95ONfWWQ3r9qkWkss8s3RY=; b=Vgip28ubFnXXHnd4agFookv0GCSqf9qvHyTj0iOaUvpRo/WD6q+SER4Ijx2bMcdaZN RtycllSVv1Dz/NO0Cl0jG8Je1PCPdA9PsXO2zEB8D5A0URq3S/wzixkrsi8Or2Nzi2we 3AmoUSmjbsFaOQTzAMF3pMvi16HL8oOpEB3lB5WHbIUovrUCMh4+aap23RUcqQWTV3FF v2r4tSO1ma5D7Osizcs4LKByxx0HPRseUGKPE5aacAl4+YN60lwIUweR8jPlgYxXV28w V94rOWIxdShuUxgYvAlYerr1AqLv/9j/wCeC+lYvdkAlckKWDL3OmpJZTgbpKlUBc8oM 6Ldg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rJIH1msdw+aoYUcfHqauP95ONfWWQ3r9qkWkss8s3RY=; b=arXFMnnraSY7T2u2wKJ94QRRttQx7AEhEB7qs28QQQy5TTg6IGYHbA2RHR3GLRbvPu 1v36dr8CZXGwJFulJYWJcBp2uB6KUm/HPLc7sHQsgBZ5haNptczUaiwtly2uMBEqwbjJ DXJIZ+YvEHntRvo8ye2ZQnyXBZVmILFo9Y4oB+Kpix6JaIQBMEPKSrkN77k4BEBgpVFK HfiVrlmtgGNXG6T/+SW3krB8GMbDOFC8W/cy/sDMUTaBrYyJJ83eSY+Mf4+M0Hqj8aV9 5WF4Um16NNPZ7nq7wzgWDcL8yOmeK1vBo25NZGQTyJK0yHHVPkFJcTglw3IbSVRQ1Dic KpaA== X-Gm-Message-State: AHQUAuby5UXziWA+y7oC1iu7pAGZ5CSKtAOVSznZpD5QlOlw3mYWv0Oo qHxcomFNwDRCO08mcYnMoa/MjPL9jV710q+dTQUKB+gg X-Google-Smtp-Source: AHgI3IZkSs4KMmgTWSjmhQtcj6/zEGFfwMLSfJuMY44cl+/W3y+nKPhohUs+oz2pw+r6A42m67VenAGD6PhLzyHKxn0= X-Received: by 2002:a2e:9f56:: with SMTP id v22-v6mr556923ljk.114.1550068788985; Wed, 13 Feb 2019 06:39:48 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233272 Archived-At: --0000000000008b85d90581c78331 Content-Type: text/plain; charset="UTF-8" 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 Then I simple converted the file to set of bmp files: $ time convert ~/tmp/giphy.mp4 ~/tmp/anim1/giphy%05d.bmp convert ~/tmp/giphy.mp4 ~/tmp/anim1/giphy%05d.bmp 0,18s user 0,10s system 117% cpu 0,237 total $ And animated on these bmp files: (let ((ctime (float-time))) (setq img (create-image "~/tmp/anim1/giphy00000.bmp" 'imagemagick nil :scale 1.0)) (insert-image img) (cl-dotimes (index 65) (plist-put (cdr img) :file (format "~/tmp/anim1/giphy%05d.bmp" index)) (force-window-update) (sit-for 0.0)) (- (float-time) ctime)) ==> 1.3518333435058594 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? Thanks --Versions-- EMACS: GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-11-13 IM: Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org -- lg --0000000000008b85d90581c78331 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've got multi frame image at=C2=A0http://lgarc.narod.ru/giphy.mp4
<= div>
And run next code on it:

= =C2=A0 (let ((ctime (float-time)))
=C2=A0 =C2=A0 (setq img (creat= e-image "~/tmp/giphy.mp4" 'imagemagick nil :scale 1.0))
=
=C2=A0 =C2=A0 (insert-image img)
=C2=A0 =C2=A0 (cl-dotimes (= index 65)
=C2=A0 =C2=A0 =C2=A0 (image-show-frame img index 'n= ocheck)
=C2=A0 =C2=A0 =C2=A0 (sit-for 0.0))
=C2=A0 =C2= =A0 (- (float-time) ctime))
=C2=A0 =3D=3D>=C2=A018.78801= 7988204956

18 seconds to show every frame

Then I simple converted the file to set of bmp files:

=C2=A0 $ time convert ~/tmp/giphy.mp4 ~/tmp/anim1/giph= y%05d.bmp
=C2=A0 convert ~/tmp/giphy.mp4 ~/tmp/anim1/giphy%05d.bm= p=C2=A0 0,18s user 0,10s system 117% cpu 0,237 total
=C2=A0 $
=C2=A0
And animated on these bmp files:

=C2=A0 (let ((ctime (float-time)))
=C2=A0 =C2=A0 (set= q img (create-image "~/tmp/anim1/giphy00000.bmp" 'imagemagick= nil :scale 1.0))
=C2=A0 =C2=A0 (insert-image img)
=C2= =A0 =C2=A0 (cl-dotimes (index 65)
=C2=A0 =C2=A0 =C2=A0 (plist-put= (cdr img) :file (format "~/tmp/anim1/giphy%05d.bmp" index))
=C2=A0 =C2=A0 =C2=A0 (force-window-update)
=C2=A0 =C2=A0 = =C2=A0 (sit-for 0.0))
=C2=A0 =C2=A0 (- (float-time) ctime))
=
=C2=A0 =3D=3D>=C2=A01.3518333435058594

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

Thanks

--Versions= --
EMACS: GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ V= ersion 3.18.9) of 2018-11-13
IM: Version: ImageMagick 6.8.9-9= Q16 x86_64 2018-09-28 http://www.im= agemagick.org

--
lg
=
--0000000000008b85d90581c78331--