diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-08-09 09:31:56 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-08-09 09:31:56 +0000 |
commit | 3bdbead3dd7391c6198c6be03c4c787ac80dee85 (patch) | |
tree | 727d614b8ab1235ba3653fc708b2f259128e01c7 /lisp/image.el | |
parent | 0ec1f11554a528e81e9fc7eb2164154bedd532a3 (diff) | |
download | emacs-3bdbead3dd7391c6198c6be03c4c787ac80dee85.tar.gz |
(image-type-regexps): Allow whitespace at the start
of the image data for XPM, XBM and Postscript, which are
text files.
(image-jpeg-p): Correct computatino of next field offset.
Diffstat (limited to 'lisp/image.el')
-rw-r--r-- | lisp/image.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/image.el b/lisp/image.el index 9603f1ea95c..3e61b100cee 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -31,13 +31,13 @@ (defconst image-type-regexps - '(("\\`/\\*.*XPM.\\*/" . xpm) + '(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) ("\\`P[1-6]" . pbm) ("\\`GIF8" . gif) ("\\`\211PNG\r\n" . png) - ("\\`#define" . xbm) + ("\\`[\t\n\r ]*#define" . xbm) ("\\`\\(MM\0\\*\\)\\|\\(II\\*\0\\)" . tiff) - ("\\`%!PS" . postscript) + ("\\`[\t\n\r ]*%!PS" . postscript) ("\\`\xff\xd8" . (image-jpeg-p . jpeg))) "Alist of (REGEXP . IMAGE-TYPE) pairs used to auto-detect image types. When the first bytes of an image file match REGEXP, it is assumed to @@ -64,7 +64,7 @@ a non-nil value, TYPE is the image's type ") ;; APP0 LEN1 LEN2 "JFIF\0" (throw 'jfif (string-match "\\`\xe0..JFIF\0" (substring data i (+ i 10))))) - (setq i (+ i nbytes)))))))) + (setq i (+ i 1 nbytes)))))))) ;;;###autoload |