changeset 46810:65ad7b458435

(image-jpeg-p): Accept "Exif" marker.
author Richard M. Stallman <rms@gnu.org>
date Mon, 05 Aug 2002 16:26:03 +0000
parents a7c081b4fc3c
children 98f32ab61c61
files lisp/image.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))))))))