Commit 9a9d8a8f authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(image-jpeg-p): Convert DATA to unibyte at first.

parent e53ac718
......@@ -208,6 +208,7 @@ compatibility with versions of Emacs that lack the variable
(defun image-jpeg-p (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."
(setq data (string-to-unibyte data))
(when (string-match "\\`\xff\xd8" data)
(catch 'jfif
(let ((len (length data)) (i 2))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment