Function: image-converter--probe
image-converter--probe is a byte-compiled function defined in
image-converter.el.gz.
Signature
(image-converter--probe ARG &rest ARGS)
Implementations
(image-converter--probe (TYPE (eql (quote ffmpeg)))) in `image-converter.el'.
Check whether the system has ffmpeg installed that's a usable converter.
(image-converter--probe (TYPE (eql (quote imagemagick)))) in `image-converter.el'.
Check whether the system has ImageMagick installed that's a usable converter.
(image-converter--probe (TYPE (eql (quote graphicsmagick)))) in `image-converter.el'.
Check whether the system has GraphicsMagick installed that's usable converter.
Source Code
;; Defined in /usr/src/emacs/lisp/image/image-converter.el.gz
(cl-defmethod image-converter--probe ((type (eql 'graphicsmagick)))
"Check whether the system has GraphicsMagick installed that's usable converter."
(with-temp-buffer
(let ((command (image-converter--value type :command))
formats)
(when (and (executable-find (car command))
(zerop (apply #'call-process (car command) nil '(t nil) nil
(append (cdr command)
(image-converter--value type :probe)))))
(goto-char (point-min))
(when (re-search-forward "^-" nil t)
(forward-line 1)
;; Lines look like
;; " 8BIM P rw- Photoshop resource format".
(while (re-search-forward "^ *\\([A-Z0-9]+\\) +. +r" nil t)
(push (downcase (match-string 1)) formats)))
(nreverse formats)))))