Function: image-dired-get-exif-data
image-dired-get-exif-data is a byte-compiled function defined in
image-dired.el.gz.
This function is obsolete since 29.1; use exif-parse-file and
exif-field instead.
Signature
(image-dired-get-exif-data FILE TAG-NAME)
Documentation
From FILE, return EXIF tag TAG-NAME.
Probably introduced at or before Emacs version 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/image/image-dired.el.gz
(defun image-dired-get-exif-data (file tag-name)
"From FILE, return EXIF tag TAG-NAME."
(declare (obsolete "use `exif-parse-file' and `exif-field' instead." "29.1"))
(image-dired--check-executable-exists
'image-dired-cmd-read-exif-data-program)
(let ((buf (get-buffer-create "*image-dired-get-exif-data*"))
(spec (list (cons ?f file) (cons ?t tag-name)))
tag-value)
(with-current-buffer buf
(delete-region (point-min) (point-max))
(if (not (eq (apply #'call-process image-dired-cmd-read-exif-data-program
nil t nil
(mapcar
(lambda (arg) (format-spec arg spec))
image-dired-cmd-read-exif-data-options))
0))
(error "Could not get EXIF tag")
(goto-char (point-min))
;; Clean buffer from newlines and carriage returns before
;; getting final info
(while (search-forward-regexp "[\n\r]" nil t)
(replace-match "" nil t))
(setq tag-value (buffer-substring (point-min) (point-max)))))
tag-value))