GNU bug report logs -
#10747
ImageMagick does not return much metadata
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Tue, 7 Feb 2012 04:37:01 UTC
Severity: minor
Found in version 24.0.93
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10747 in the body.
You can then email your comments to 10747 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
joakim <at> verona.se, bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Tue, 07 Feb 2012 04:37:02 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Fri, 24 Feb 2012 01:24:02 GMT)
Full text and
rfc822 format available.
Message #6 received at 10747 <at> debbugs.gnu.org (full text, mbox):
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)))
Added tag(s) patch.
Request was from
Juri Linkov <juri <at> jurta.org>
to
control <at> debbugs.gnu.org
.
(Fri, 24 Feb 2012 01:24:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Tue, 17 Apr 2012 02:02:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 10747 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Sat, 29 Sep 2012 19:48:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 10747 <at> debbugs.gnu.org (full text, mbox):
>> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Thu, 18 Sep 2014 21:04:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 10747 <at> debbugs.gnu.org (full text, mbox):
>> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10747
; Package
emacs
.
(Tue, 24 Sep 2019 17:54:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 10747 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> 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
bug closed, send any further explanations to
10747 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 24 Sep 2019 17:54:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 23 Oct 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.