[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a6abb6f5cd: Support display of BMP images on MS-Windows
From: |
Eli Zaretskii |
Subject: |
master a6abb6f5cd: Support display of BMP images on MS-Windows |
Date: |
Sat, 26 Mar 2022 04:33:10 -0400 (EDT) |
branch: master
commit a6abb6f5cdd5a44bce2e42c340a6c6b83579de93
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Support display of BMP images on MS-Windows
* src/w32image.c (w32_can_use_native_image_api): Support BMP
images.
* src/image.c (syms_of_image) <Qbmp>: New symbol.
[HAVE_NTGUI]: Add 'bmp' to list of supported image types.
* doc/lispref/display.texi (Image Formats): Document built-in
support for BMP images.
* etc/NEWS: Announce the change.
---
doc/lispref/display.texi | 6 ++++++
etc/NEWS | 5 +++++
src/image.c | 2 ++
src/w32image.c | 1 +
4 files changed, 14 insertions(+)
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 3aec06e13d..2dc0ef4c0b 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5507,6 +5507,12 @@ symbol}. The symbols for the above formats are,
respectively,
@code{pbm}, @code{xbm}, @code{xpm}, @code{gif}, @code{jpeg},
@code{tiff}, @code{png}, @code{svg}, and @code{webp}.
+ On some platforms, the built-in image support that doesn't require
+any optional libraries includes BMP images.@footnote{
+On MS-Windows, this requires @code{w32-use-native-image-API} to be set
+non-@code{nil}.
+}
+
Furthermore, if you build Emacs with ImageMagick
(@code{libMagickWand}) support, Emacs can display any image format
that ImageMagick can. @xref{ImageMagick Images}. All images
diff --git a/etc/NEWS b/etc/NEWS
index d26c6568b9..f726b0a2e8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1821,6 +1821,11 @@ follow the system's dark mode: GUI frames use the
appropriate light or
dark title bar and scroll bars, based on the user's Windows-wide color
settings.
++++
+*** Emacs now supports display of BMP images using native image APIs.
+When 'w32-use-native-image-API' is non-nil, Emacs on MS-Windows now
+has built-in support for displaying BMP images.
+
----------------------------------------------------------------------
This file is part of GNU Emacs.
diff --git a/src/image.c b/src/image.c
index c412dc9029..d44d689084 100644
--- a/src/image.c
+++ b/src/image.c
@@ -11558,6 +11558,8 @@ non-numeric, there is no explicit limit on the size of
images. */);
# ifdef HAVE_NTGUI
DEFSYM (Qgdiplus, "gdiplus");
DEFSYM (Qshlwapi, "shlwapi");
+ DEFSYM (Qbmp, "bmp");
+ add_image_type (Qbmp);
# endif
#endif
diff --git a/src/w32image.c b/src/w32image.c
index f3374dcfd3..1f7c4921b3 100644
--- a/src/w32image.c
+++ b/src/w32image.c
@@ -253,6 +253,7 @@ w32_can_use_native_image_api (Lisp_Object type)
|| EQ (type, Qpng)
|| EQ (type, Qgif)
|| EQ (type, Qtiff)
+ || EQ (type, Qbmp)
|| EQ (type, Qnative_image)))
{
/* GDI+ can also display BMP, Exif, ICON, WMF, and EMF images.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a6abb6f5cd: Support display of BMP images on MS-Windows,
Eli Zaretskii <=