reddit / emacs

Opening webp files in Emacs 28.1 on Windows

[deleted] · 2022-04-14 00:55
I see that version 28.1 does not yet support webp. The current developmental does. Are there some tweaks I can perform to get 28.1 to show webp?
xenodium · 2022-04-14 01:08
https://xenodium.com/emacs-viewing-webp-images/
[deleted] · 2022-04-14 01:11
That solution did not work for me. :/
7890yuiop · 2022-04-14 01:27
You should take a look at the relevant commits to master, and see whether they are applicable to 28.
[deleted] · 2022-04-14 01:39
[deleted]
[deleted] · 2022-04-14 02:10
Are you referring to this: [https://mail.gnu.org/archive/html/emacs-diffs/2022-04/msg00238.html](https://mail.gnu.org/archive/html/emacs-diffs/2022-04/msg00238.html) I cannot apply this patch because I have not installed Emacs from source but used the executable provided here: https://www.gnu.org/software/emacs/download.html
xenodium · 2022-04-14 02:14
Do you have error messages? Anything in *Messages* buffer? Do you have imagemagick installed and working? Try it from the command line first.
[deleted] · 2022-04-14 02:31
The error is "Unknown image type." The image file appears like this as text. I have installed ImageMagick and added it to my path.
7890yuiop · 2022-04-14 02:52
I don't know (I'm not familiar with the feature; I'm only going by your statement that it's been implemented in the development version); but if that C code change *is* what's needed, then you cannot use this in Emacs 28 without (at minimum) compiling it from source. (Are you using MS-Windows? The commit message is "Fix WebP image support on MS-Windows". Although it does suggest that C code changes are going to be involved regardless, so you're probably out of luck if you're not intending to compile Emacs.)
[deleted] · 2022-04-14 03:01
Thank you. I will compile tomorrow.
xenodium · 2022-04-14 03:35
Maybe verify if tool is found from Emacs. Can try opening eshell and running mogrify or convert.
[deleted] · 2022-04-14 05:38
>mogrify I have done so. Both tools are available.
xenodium · 2022-04-14 05:43
What’s the elisp snippet you’re using?
[deleted] · 2022-04-14 05:44
I'm not sure I follow?
xenodium · 2022-04-14 06:04
What’s all the elisp you’re using to set it up?
Soupeeee · 2022-04-14 19:49
Unless you want to compile from scratch, I don't think you will be able to. If you are on Windows 11, just use WSL to compile the master branch, then use its ability to run graphical Linux programs.
[deleted] · 2022-04-14 20:01
Unfortunately, I only have Win 10. Time for an upgrade?