From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: joakim@verona.se, bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2012 04:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10747@debbugs.gnu.org Cc: Joakim Verona X-Debbugs-Original-To: submit@debbugs.gnu.org X-Debbugs-Original-Xcc: Joakim Verona Received: via spool by submit@debbugs.gnu.org id=B.132858941123286 (code B ref -1); Tue, 07 Feb 2012 04:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Feb 2012 04:36:51 +0000 Received: from localhost ([127.0.0.1]:57980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucnS-00063X-Lr for submit@debbugs.gnu.org; Mon, 06 Feb 2012 23:36:51 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:58920 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucnQ-00063O-3H for submit@debbugs.gnu.org; Mon, 06 Feb 2012 23:36:49 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RucmX-0002j1-Lw; Mon, 06 Feb 2012 23:35:53 -0500 From: Glenn Morris X-Spook: cypherpunk counter terrorism national information X-Ran: 8u@c`nxU90u'p'rBh?GU3i%k3%eo38@1q3TB-sMN\h^wOwixYusuF4KT6IueR4fy9O+01D X-Hue: green X-Attribution: GM Date: Mon, 06 Feb 2012 23:35:53 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Package: emacs Version: 24.0.93 As an example animated gif file, I use: http://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Rotating_earth_%28large%29.gif/200px-Rotating_earth_%28large%29.gif In an Emacs compiled with both libgif and ImageMagick support: emacs -Q file.gif then in the resulting image-mode buffer, (image-metadata (image-get-display-property)) returns: (count 44 delay 0.09 extension-data (0 "control-chars" 255 "NETSCAPE2.0" 254 "File source: http://commons.wikimedia.org/wiki/File:Rotating_earth_(large).gif" 249 "control-chars")) If I repeat the experiment with (I think this is the way to prefer ImageMagick over libgif): emacs -Q --eval "(setq image-type-header-regexps nil)" \ -f imagemagick-register-types then the returned metadata is just: (count 44) From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2012 01:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 10747@debbugs.gnu.org, Joakim Verona Received: via spool by 10747-submit@debbugs.gnu.org id=B10747.133004662114521 (code B ref 10747); Fri, 24 Feb 2012 01:24:02 +0000 Received: (at 10747) by debbugs.gnu.org; 24 Feb 2012 01:23:41 +0000 Received: from localhost ([127.0.0.1]:53131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0jsr-0003m8-Ia for submit@debbugs.gnu.org; Thu, 23 Feb 2012 20:23:41 -0500 Received: from ps18281.dreamhost.com ([69.163.218.105]:37391 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0jso-0003lu-Bp; Thu, 23 Feb 2012 20:23:39 -0500 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 018CA451C81F; Thu, 23 Feb 2012 17:19:29 -0800 (PST) From: Juri Linkov Organization: JURTA References: Date: Fri, 24 Feb 2012 02:43:32 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 06 Feb 2012 23:35:53 -0500") Message-ID: <87pqdodq3v.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10747 patch thanks > If I repeat the experiment with (I think this is the way to prefer > ImageMagick over libgif): > > emacs -Q --eval "(setq image-type-header-regexps nil)" \ > -f imagemagick-register-types > > then the returned metadata is just: (count 44) It is possible to get the value of delay for using in animated images by `MagickGetImageDelay' as demonstrated in the trivial patch below. Good luck implementing SVG animation in 24.2 that is more complicated: http://www.w3.org/TR/SVG/animate.html and even unsupported by some browsers: http://hoffmann.bplaced.net/svgtest/index.php?in=text === modified file 'src/image.c' --- src/image.c 2012-01-25 17:54:01 +0000 +++ src/image.c 2012-02-24 00:38:12 +0000 @@ -7666,6 +7666,12 @@ Fcons (make_number (MagickGetNumberImages (ping_wand)), img->lisp_data)); + if (MagickGetImageDelay (ping_wand) > 1) + img->lisp_data = + Fcons (Qdelay, + Fcons (make_float (MagickGetImageDelay (ping_wand) / 100.0), + img->lisp_data)); + DestroyMagickWand (ping_wand); /* Now we know how many images are inside the file. If it's not a === modified file 'lisp/image.el' --- lisp/image.el 2012-01-25 19:45:29 +0000 +++ lisp/image.el 2012-02-24 00:23:08 +0000 @@ -591,7 +591,7 @@ (defmacro defimage (symbol specs &option ;;; Animated image API -(defconst image-animated-types '(gif) +(defconst image-animated-types '(gif imagemagick) "List of supported animated image types.") (defun image-animated-p (image) @@ -601,7 +601,7 @@ (defun image-animated-p (image) DELAY is the delay in second until the next sub-image shall be displayed." (cond - ((eq (plist-get (cdr image) :type) 'gif) + ((memq (plist-get (cdr image) :type) image-animated-types) (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (delay (plist-get metadata 'delay))) From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Apr 2012 02:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 10747@debbugs.gnu.org, Joakim Verona Received: via spool by 10747-submit@debbugs.gnu.org id=B10747.133462808418017 (code B ref 10747); Tue, 17 Apr 2012 02:02:02 +0000 Received: (at 10747) by debbugs.gnu.org; 17 Apr 2012 02:01:24 +0000 Received: from localhost ([127.0.0.1]:37553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJxjQ-0004gX-5i for submit@debbugs.gnu.org; Mon, 16 Apr 2012 22:01:24 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34697 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJxjN-0004gP-O5 for 10747@debbugs.gnu.org; Mon, 16 Apr 2012 22:01:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SJxjH-0001EA-5k; Mon, 16 Apr 2012 22:01:15 -0400 From: Glenn Morris References: <87pqdodq3v.fsf@mail.jurta.org> X-Spook: spy kibo Compsec DRM ammunition AIEWS Crypto AG Ceridian X-Ran: w!X!&a>"oE16N9j7Pp~SncJ$?2)a@x"mF[QJENs+zcd[@0cs^O_Q*sP2;P;%_}3NC"w'R! X-Hue: cyan X-Attribution: GM Date: Mon, 16 Apr 2012 22:01:15 -0400 In-Reply-To: <87pqdodq3v.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 24 Feb 2012 02:43:32 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Juri Linkov wrote: > It is possible to get the value of delay for using in animated images by > `MagickGetImageDelay' as demonstrated in the trivial patch below. You could install this in the trunk now if you like. I don't consider it a complete solution because there is other metadata besides delay. From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Sep 2012 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 10747@debbugs.gnu.org, Joakim Verona Received: via spool by 10747-submit@debbugs.gnu.org id=B10747.134894805410791 (code B ref 10747); Sat, 29 Sep 2012 19:48:02 +0000 Received: (at 10747) by debbugs.gnu.org; 29 Sep 2012 19:47:34 +0000 Received: from localhost ([127.0.0.1]:33889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TI30f-0002nx-R6 for submit@debbugs.gnu.org; Sat, 29 Sep 2012 15:47:34 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:59637 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TI30d-0002nq-LJ for 10747@debbugs.gnu.org; Sat, 29 Sep 2012 15:47:32 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9E3DE451CB11; Sat, 29 Sep 2012 12:47:11 -0700 (PDT) From: Juri Linkov Organization: JURTA References: <87pqdodq3v.fsf@mail.jurta.org> Date: Sat, 29 Sep 2012 22:39:11 +0300 In-Reply-To: (Glenn Morris's message of "Mon, 16 Apr 2012 22:01:15 -0400") Message-ID: <87wqzc1vco.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> It is possible to get the value of delay for using in animated images by >> `MagickGetImageDelay' as demonstrated in the trivial patch below. > > You could install this in the trunk now if you like. > I don't consider it a complete solution because there is other metadata > besides delay. I have not yet installed this patch because the property `delay' is necessary for animated gifs, but they are still not working with ImageMagick. The same image is displayed for every value of the :index parameter of the animated gif. This bug is reported at bug#7978. Maybe this bug exists only in old ImageMagick libraries. I'll try to get the latest version of ImageMagick to confirm whether it improves that. From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Sep 2014 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 10747@debbugs.gnu.org, Joakim Verona Received: via spool by 10747-submit@debbugs.gnu.org id=B10747.141107421127019 (code B ref 10747); Thu, 18 Sep 2014 21:04:02 +0000 Received: (at 10747) by debbugs.gnu.org; 18 Sep 2014 21:03:31 +0000 Received: from localhost ([127.0.0.1]:44843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUirS-00071h-Gs for submit@debbugs.gnu.org; Thu, 18 Sep 2014 17:03:31 -0400 Received: from ps18281.dreamhost.com ([69.163.222.226]:39437 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUirN-00071Q-Uq for 10747@debbugs.gnu.org; Thu, 18 Sep 2014 17:03:26 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 1371430617FF26; Thu, 18 Sep 2014 14:03:23 -0700 (PDT) From: Juri Linkov Organization: JURTA References: <87pqdodq3v.fsf@mail.jurta.org> Date: Fri, 19 Sep 2014 00:02:53 +0300 In-Reply-To: <87pqdodq3v.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 24 Feb 2012 02:43:32 +0200") Message-ID: <87bnqcvdz6.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> If I repeat the experiment with (I think this is the way to prefer >> ImageMagick over libgif): >> >> emacs -Q --eval "(setq image-type-header-regexps nil)" \ >> -f imagemagick-register-types >> >> then the returned metadata is just: (count 44) > > It is possible to get the value of delay for using in animated images by > `MagickGetImageDelay' as demonstrated in the trivial patch below. This patch was installed for bug#18334. From unknown Mon Aug 18 18:01:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10747: ImageMagick does not return much metadata Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 17:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 10747@debbugs.gnu.org, Joakim Verona Received: via spool by 10747-submit@debbugs.gnu.org id=B10747.156934760925345 (code B ref 10747); Tue, 24 Sep 2019 17:54:02 +0000 Received: (at 10747) by debbugs.gnu.org; 24 Sep 2019 17:53:29 +0000 Received: from localhost ([127.0.0.1]:40107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCp0D-0006aj-FU for submit@debbugs.gnu.org; Tue, 24 Sep 2019 13:53:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:41788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCp0B-0006aZ-Un for 10747@debbugs.gnu.org; Tue, 24 Sep 2019 13:53:28 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCp07-0001zd-Aj; Tue, 24 Sep 2019 19:53:25 +0200 From: Lars Ingebrigtsen References: Date: Tue, 24 Sep 2019 19:53:22 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 06 Feb 2012 23:35:53 -0500") Message-ID: <87tv91wpgt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > then in the resulting image-mode buffer, > (image-metadata (image-get-display-property)) > returns: > > (count 44 delay 0.09 extension-data (0 "control-chars" 255 "NETSCAPE2.0" 254 > "File source: h [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > then in the resulting image-mode buffer, > (image-metadata (image-get-display-property)) > returns: > > (count 44 delay 0.09 extension-data (0 "control-chars" 255 "NETSCAPE2.0" 254 > "File source: http://commons.wikimedia.org/wiki/File:Rotating_earth_(large).gif" > 249 "control-chars")) > > If I repeat the experiment with (I think this is the way to prefer > ImageMagick over libgif): > > emacs -Q --eval "(setq image-type-header-regexps nil)" \ > -f imagemagick-register-types > > then the returned metadata is just: (count 44) ImageMagick does return the delay in the metadata, and I think the rest of the metadata isn't very interesting (especially as we don't recommend compiling Emacs with ImageMagick these days), so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 13:53:34 2019 Received: (at control) by debbugs.gnu.org; 24 Sep 2019 17:53:34 +0000 Received: from localhost ([127.0.0.1]:40110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCp0H-0006b1-Om for submit@debbugs.gnu.org; Tue, 24 Sep 2019 13:53:34 -0400 Received: from quimby.gnus.org ([80.91.231.51]:41802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCp0F-0006ar-PA for control@debbugs.gnu.org; Tue, 24 Sep 2019 13:53:33 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCp0C-0001zl-Vc for control@debbugs.gnu.org; Tue, 24 Sep 2019 19:53:31 +0200 Date: Tue, 24 Sep 2019 19:53:28 +0200 Message-Id: <87sgolwpgn.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10747 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 10747 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 10747 quit