]> git.eshelyaron.com Git - emacs.git/commit
Support built-in thumbnail creation on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Thu, 30 May 2024 14:45:33 +0000 (17:45 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 May 2024 18:14:27 +0000 (20:14 +0200)
commitef84882e06e9e0dd4408a5efa9b3327eff6a8185
tree99f751ff4caa49729b82b31e58c1e2e9ee92debd
parent862d943b125a8110d0d1c1d479a877989f8007af
Support built-in thumbnail creation on MS-Windows

* src/w32image.c (get_encoder_clsid, Fw32image_create_thumbnail)
(globals_of_w32image, syms_of_w32image): New functions.
* src/emacs.c (main): Call 'syms_of_w32image' and
'globals_of_w32image'.
* src/w32term.h (syms_of_w32image, globals_of_w32image): Add
prototypes.

* lisp/image/image-dired.el
(image-dired-thumbnail-display-external): Add a fallback for
MS-Windows.
* lisp/image/image-dired-external.el
(image-dired--probe-thumbnail-cmd): New function.
(image-dired--check-executable-exists): Call it to verify that
"convert" is indeed an Imagemagick program.  New argument FUNC
specifies a function that can be used as an alternative to running
EXECUTABLE.
(image-dired-create-thumb-1): Don't call
'image-dired--check-executable-exists' here, ...
(image-dired-thumb-queue-run): ...call it here, with
'w32image-create-thumbnail' as the alternative function.  If on
MS-Windows and no "convert" command, call
'image-dired-create-thumb-2' instead.
(image-dired-create-thumb-2): New function.

* etc/NEWS: Announce the thumbnail support.

(cherry picked from commit ae7d0e86b37eabc434c48f85f56df0a221e0e7c7)
etc/NEWS
lisp/image/image-dired-external.el
lisp/image/image-dired.el
src/emacs.c
src/w32image.c
src/w32term.h