|--==> "JA" == Jani Averbach <jaa(a)cc.jyu.fi> writes:
JA> Hi!
JA> I just compiling XEmacs 21.4.8, and found following:
JA> When i type
JA> C-x C-f foobar.jpg RET
JA> XEmacs allways open picture in raw mode (?). There is image in
JA> modeline. If I try hit 't' (image-toggle-decoding) it won't do
anything.
JA> However there is gif, xpm, png, jpeg and tiff support compiled in XEmacs
JA> (by M-x build-report).
XEmacsen since 21.2.something don't auto-decode images. There are
reasons, I can't remember what they are, but there are reasons.
To get around this, put the following in your '~/.xemacs/init.el' (or
similar):
,----
| ;:*=======================
| ;:* Image formats
| (add-to-list 'format-alist
| '(image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF"
| image-decode-jpeg nil t image-mode))
| (add-to-list 'format-alist
| '(image/gif "GIF image" "GIF8[79]"
| image-decode-gif nil t image-mode))
| (add-to-list 'format-alist
| '(image/png "Portable Network Graphics" "\211PNG"
| image-decode-png nil t image-mode))
| ;; XPM files are C program text, and as such should not
| ;; be autodecoded by default. Uncomment if you like.
| ;(add-to-list 'format-alist
| ; '(image/x-xpm "XPM image" "/\\* XPM \\*/"
| ; image-decode-xpm nil t image-mode))
| (add-to-list 'format-alist
| '(image/tiff "TIFF image" "II\\*\000"
| ;; TIFF 6.0 big-endian
| image-decode-tiff nil t image-mode))
| (add-to-list 'format-alist
| '(image/tiff "TIFF image" "MM\000\\*"
| ;; TIFF 6.0 little-endian
| image-decode-tiff nil t image-mode))
`----
JA> If I open xpm picture (ie. recycle.xpm from xemacs) XEmacs opens it in
JA> (picture:right XPM) mode, and show the logo and somekind colorfull ascii
JA> representation of picture (big one).
See the comment about XPM files in the above code snippet.
JA> I am doing something wrong, am I?
Not really.
JA> If so, it would be nice if there is somewhere few lines how to make this
JA> thing to work. (I tried to look from FAQ and mailing list archives, but
JA> don't found anything).
If it's not there already, maybe this should go into the FAQ?
--
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|