# HG changeset patch # User Richard M. Stallman # Date 1028564763 0 # Node ID 65ad7b4584353077969b53e64ccb9d086950df57 # Parent a7c081b4fc3c7bafa7888a09454989c8c3e1c68d (image-jpeg-p): Accept "Exif" marker. diff -r a7c081b4fc3c -r 65ad7b458435 lisp/image.el --- a/lisp/image.el Mon Aug 05 15:15:18 2002 +0000 +++ b/lisp/image.el Mon Aug 05 16:26:03 2002 +0000 @@ -50,7 +50,8 @@ (defun image-jpeg-p (data) - "Value is non-nil if DATA, a string, consists of JFIF image data." + "Value is non-nil if DATA, a string, consists of JFIF image data. +We accept the tag Exif because that is the same format." (when (string-match "\\`\xff\xd8" data) (catch 'jfif (let ((len (length data)) (i 2)) @@ -66,7 +67,7 @@ (when (and (>= code #xe0) (<= code #xef)) ;; APP0 LEN1 LEN2 "JFIF\0" (throw 'jfif - (string-match "JFIF" (substring data i (+ i nbytes))))) + (string-match "JFIF\\|Exif" (substring data i (+ i nbytes))))) (setq i (+ i 1 nbytes))))))))