Function: exif-parse-buffer
exif-parse-buffer is a byte-compiled function defined in exif.el.gz.
Signature
(exif-parse-buffer &optional BUFFER)
Documentation
Parse BUFFER (which should be a JPEG file) and return the Exif data, if any.
The return value is a list of Exif items.
If the data is invalid, an exif-error is signaled.
Probably introduced at or before Emacs version 27.1.
Source Code
;; Defined in /usr/src/emacs/lisp/image/exif.el.gz
(defun exif-parse-buffer (&optional buffer)
"Parse BUFFER (which should be a JPEG file) and return the Exif data, if any.
The return value is a list of Exif items.
If the data is invalid, an `exif-error' is signaled."
(setq buffer (or buffer (current-buffer)))
(with-current-buffer buffer
(if enable-multibyte-characters
(with-temp-buffer
(set-buffer-multibyte nil)
(let ((dest (current-buffer)))
(with-current-buffer buffer
(encode-coding-region (point-min) (point-max)
buffer-file-coding-system
dest))
(when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
(exif--parse-exif-chunk app1))))
(save-excursion
(when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
(exif--parse-exif-chunk app1))))))