bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cannot create image from jpeg file without specify type


From: ARISAWA Akihiro
Subject: cannot create image from jpeg file without specify type
Date: Thu, 07 Mar 2002 00:40:03 +0900
User-agent: Wanderlust/2.9.7 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/21.1 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-10-24 on puyo.nijino.com
configured using `configure  --with-xpm --with-jpeg --with-tiff --with-gif 
--with-png --without-xim'
Important settings:
  value of $LC_ALL: ja_JP.eucJP
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.eucJP
  locale-coding-system: japanese-iso-8bit
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When `create-image' is called with jpeg file without specify type,
it returns nil. Because `image-type-from-file-header' returns nil.

The following patch fixes this problem.

2002-03-06  ARISAWA Akihiro  <ari@mbf.sphere.ne.jp>

        * image.el (image-type-from-file-header): Make temporary buffer
        unibyte.

--- lisp/image.el.orig  Tue Aug 21 17:11:52 2001
+++ lisp/image.el       Thu Mar  7 00:36:32 2002
@@ -97,6 +97,7 @@ (defun image-type-from-file-header (file
     (setq file (expand-file-name file data-directory)))
   (setq file (expand-file-name file))
   (let ((header (with-temp-buffer
+                 (set-buffer-multibyte nil)
                  (insert-file-contents-literally file nil 0 256)
                  (buffer-string))))
     (image-type-from-data header)))
Recent input:
<help-echo> <down-mouse-2> <mouse-2> C-j <escape> x 
r e p o r t - <tab> <return>

Recent messages:
Loading /usr/local/libexec/emacs/21.1/i686-pc-linux-gnu/fns-21.1.1.el 
(source)...done
(emacs -q)
Loading disp-table...done
Loading tool-bar...done
Loading image...done
Loading tooltip...done
Loading advice...done
For information about the GNU Project and its goals, type C-h C-p.
Mark set
Loading emacsbug...done

-- 
ARISAWA Akihiro

reply via email to

[Prev in Thread] Current Thread [Next in Thread]