Function: exif--read-number-le

exif--read-number-le is a byte-compiled function defined in exif.el.gz.

Signature

(exif--read-number-le BYTES)

Documentation

Read BYTES octets from the current buffer as a chunk of little-endian bytes.

Advance point to after the read bytes. This function assumes that the current buffer is unibyte.

Source Code

;; Defined in /usr/src/emacs/lisp/image/exif.el.gz
(defun exif--read-number-le (bytes)
  "Read BYTES octets from the current buffer as a chunk of little-endian bytes.
Advance point to after the read bytes.
This function assumes that the current buffer is unibyte."
  (when (> (+ (point) bytes) (point-max))
    (signal 'exif-error '("Premature end of file")))
  (let ((sum 0))
    (dotimes (i bytes)
      (setq sum (+ (* (following-char) (expt 256 i)) sum))
      (forward-char 1))
    sum))