Function: image-multi-frame-p

image-multi-frame-p is a byte-compiled function defined in image.el.gz.

Signature

(image-multi-frame-p IMAGE)

Documentation

Return non-nil if IMAGE contains more than one frame.

The actual return value is a cons (NIMAGES . DELAY), where NIMAGES is the number of frames (or sub-images) in the image and DELAY is the delay in seconds that the image specifies between each frame. DELAY may be nil, in which case you might want to use image-default-frame-delay.

View in manual

Probably introduced at or before Emacs version 24.4.

Source Code

;; Defined in /usr/src/emacs/lisp/image.el.gz
(defun image-multi-frame-p (image)
  "Return non-nil if IMAGE contains more than one frame.
The actual return value is a cons (NIMAGES . DELAY), where NIMAGES is
the number of frames (or sub-images) in the image and DELAY is the delay
in seconds that the image specifies between each frame.  DELAY may be nil,
in which case you might want to use `image-default-frame-delay'."
  (when (fboundp 'image-metadata)
    (let* ((metadata (image-metadata image))
	   (images (plist-get metadata 'count))
	   (delay (plist-get metadata 'delay)))
      (when (and images (> images 1))
	(and delay (or (not (numberp delay)) (< delay 0))
	     (setq delay image-default-frame-delay))
	(cons images delay)))))