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 buffer as a chunk of low-endian bytes.

Advance point to after the read bytes.

Source Code

;; Defined in /usr/src/emacs/lisp/image/exif.el.gz
(defun exif--read-number-le (bytes)
  "Read BYTES octets from the buffer as a chunk of low-endian bytes.
Advance point to after the read bytes."
  (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))