summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--etc/NEWS5
-rw-r--r--src/image.c2
-rw-r--r--src/w32image.c1
4 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 3aec06e13dd..2dc0ef4c0ba 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 d26c6568b9b..f726b0a2e84 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 c412dc90296..d44d6890846 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 f3374dcfd30..1f7c4921b31 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.