diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-07-13 01:36:54 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-07-13 01:40:58 +0200 |
commit | 3b802f029e89786c17b4bf6af760360f61d14fb9 (patch) | |
tree | 30a60742a7ed1a7b0aa85c53a23563e62eaff871 /doc | |
parent | fe50d914a95e78687e3341b526f19a71de583963 (diff) | |
download | emacs-3b802f029e89786c17b4bf6af760360f61d14fb9.tar.gz |
Add support for viewing "images" such as Krita (.kra) files
* doc/emacs/files.texi (Image Mode): Document it.
* lisp/image/image-converter.el (image-converter-add-handler): New
function (bug#48415).
(image-convert): Use it.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs/files.texi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 7b4e31e5f84..da138204761 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -2355,6 +2355,25 @@ can be used to transform the image in question to @acronym{PNG} before displaying. GraphicsMagick, ImageMagick and @command{ffmpeg} are currently supported for image conversions. +@findex image-converter-add-handler + In addition, you may wish to add special handlers for certain image +formats. These can be added with the +@code{image-converter-add-handler} function. For instance, to allow +viewing Krita files as simple images, you could say something like: + +@lisp +(image-converter-add + "kra" + (lambda (file) + (call-process "unzip" nil t nil + "-qq" "-c" "-x" file "mergedimage.png")))) +@end lisp + +The function takes two parameters, where the first is a file name +suffix, and the second is a function to do the ``conversion''. This +function takes one parameter, the file name, and should output an +image in @code{image-convert-to-format} format in the current buffer. + @findex thumbs-mode @cindex mode, Thumbs The Image-Dired package can also be used to view images as |