[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Displaying BMP Images in Emacs 27.1's Image Major Mode.
From: |
Ralph Corderoy |
Subject: |
Displaying BMP Images in Emacs 27.1's Image Major Mode. |
Date: |
Sat, 08 Oct 2022 11:26:35 +0100 |
Hi,
On Debian 11, Bullseye, I've package emacs 1:27.1+1-3.1 installed on a
remote server. If I ‘ssh -Y’ to the machine and run ‘emacs
/tmp/foo.png’ then the X Windows version of Emacs appears on the local X
server with the top-half of the window showing foo.png as pixels in
‘(Image[png])’ mode. All is well.
Note, I have no ~/.emacs file as the remote user.
But if I run ‘emacs /tmp/foo.bmp’ instead then I see the characters of
the file in the top-half buffer and it's in ‘(Fundamental Image)’ mode.
At the bottom of the window it says ‘Cannot display image: (Invalid
image type `bmp')’. ^C ^X switches to the hex-dump and ^C ^C switches
back, as I'd expect in Image mode.
I'm aware BMP needs an external converter. The remote machine has
Debian packages for graphicsmagick and imagemagick-6.q16 installed.
gm(1) works fine, for example.
I used customize to set image-use-external-converter to t but that
didn't improve the above BMP outcome after quitting and re-running.
The setting did appear in a new ~/.emacs.
I've also replaced ~/.emacs with
(auto-image-file-mode 1)
(setq image-use-external-converter t
image-converter 'graphicsmagick)
based on some ’net searching with no improvement.
Using ‘strace -fe execve emacs /tmp/foo.bmp’, I see no attempt to run
gm(1) or similar to learn what formats they support or try a conversion.
Please put me out of my misery or, if you think that's too extreme,
let me know few scant lines in ~/.emacs would display the BMP.
--
Thanks, Ralph.
- Displaying BMP Images in Emacs 27.1's Image Major Mode.,
Ralph Corderoy <=