diff --git a/.azure-pipelines/jobs/lint.yml b/.azure-pipelines/jobs/lint.yml
deleted file mode 100644
index d017590f8..000000000
--- a/.azure-pipelines/jobs/lint.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-parameters:
-  name: ''  # defaults for any parameters that aren't specified
-  vmImage: ''
-
-jobs:
-
-- job:  ${{ parameters.name }}
-  pool:
-    vmImage: ${{ parameters.vmImage }}
-
-  strategy:
-    matrix:
-      Python37:
-        python.version: '3.7'
-
-  steps:
-  - task: UsePythonVersion@0
-    inputs:
-      versionSpec: '$(python.version)'
-      architecture: 'x64'
-
-  - script: |
-      python -m pip install --upgrade tox
-    displayName: 'Install dependencies'
-
-  - script: |
-      tox -e lint
-    displayName: 'Lint'
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index e3c7379ba..eef2a30bd 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -34,6 +34,6 @@ The best reproductions are self-contained scripts with minimal dependencies. If
 
 ## Security vulnerabilities
 
-To report sensitive vulnerability information, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+To report sensitive vulnerability information, email security@python-pillow.org.
 
 If your organisation/employer is a distributor of Pillow and would like advance notification of security-related bugs, please let us know your preferred contact method.
diff --git a/MANIFEST.in b/MANIFEST.in
index f11ee174c..809d0d667 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -23,10 +23,9 @@ exclude .codecov.yml
 exclude .editorconfig
 exclude .landscape.yaml
 exclude .readthedocs.yml
-exclude azure-pipelines.yml
+exclude .travis
+exclude .travis/*
 exclude tox.ini
 global-exclude .git*
 global-exclude *.pyc
 global-exclude *.so
-prune .azure-pipelines
-prune .travis
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index bef5eeee6..000000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-# Python package
-# Create and test a Python package on multiple Python versions.
-# Add steps that analyze code, save the dist with the build record,
-# publish to a PyPI-compatible index, and more:
-# https://docs.microsoft.com/azure/devops/pipelines/languages/python
-
-jobs:
-
-- template: .azure-pipelines/jobs/lint.yml
-  parameters:
-    name: Lint
-    vmImage: 'Ubuntu-16.04'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'alpine'
-    name:   'alpine'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'arch'
-    name:   'arch'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'ubuntu-trusty-x86'
-    name:   'ubuntu_trusty_x86'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'ubuntu-xenial-amd64'
-    name:   'ubuntu_xenial_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'debian-stretch-x86'
-    name:   'debian_stretch_x86'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'centos-6-amd64'
-    name:   'centos_6_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'centos-7-amd64'
-    name:   'centos_7_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'amazon-1-amd64'
-    name:   'amazon_1_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'amazon-2-amd64'
-    name:   'amazon_2_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'fedora-28-amd64'
-    name:   'fedora_28_amd64'
-
-- template: .azure-pipelines/jobs/test-docker.yml
-  parameters:
-    docker: 'fedora-29-amd64'
-    name:   'fedora_29_amd64'
diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst
index 705438d4a..0fff91bb5 100644
--- a/docs/handbook/image-file-formats.rst
+++ b/docs/handbook/image-file-formats.rst
@@ -21,7 +21,7 @@ Fully supported formats
 BMP
 ^^^
 
-PIL reads and writes Windows and OS/2 BMP files containing ``1``, ``L``, ``P``,
+Pillow reads and writes Windows and OS/2 BMP files containing ``1``, ``L``, ``P``,
 or ``RGB`` data. 16-colour images are read as ``P`` images. Run-length encoding
 is not supported.
 
@@ -31,13 +31,21 @@ The :py:meth:`~PIL.Image.Image.open` method sets the following
 **compression**
     Set to ``bmp_rle`` if the file is run-length encoded.
 
+DIB
+^^^
+
+Pillow reads and writes DIB files. DIB files are similar to BMP files, so see
+above for more information.
+
+    .. versionadded:: 6.0.0
+
 EPS
 ^^^
 
-PIL identifies EPS files containing image data, and can read files that contain
-embedded raster images (ImageData descriptors). If Ghostscript is available,
-other EPS files can be read as well. The EPS driver can also write EPS
-images. The EPS driver can read EPS images in ``L``, ``LAB``, ``RGB`` and
+Pillow identifies EPS files containing image data, and can read files that
+contain embedded raster images (ImageData descriptors). If Ghostscript is
+available, other EPS files can be read as well. The EPS driver can also write
+EPS images. The EPS driver can read EPS images in ``L``, ``LAB``, ``RGB`` and
 ``CMYK`` mode, but Ghostscript may convert the images to ``RGB`` mode rather
 than leaving them in the original color space. The EPS driver can write images
 in ``L``, ``RGB`` and ``CMYK`` modes.
@@ -59,8 +67,8 @@ method with the following parameter to affect how Ghostscript renders the EPS
 GIF
 ^^^
 
-PIL reads GIF87a and GIF89a versions of the GIF file format. The library writes
-run-length encoded files in GIF87a by default, unless GIF89a features
+Pillow reads GIF87a and GIF89a versions of the GIF file format. The library
+writes run-length encoded files in GIF87a by default, unless GIF89a features
 are used or GIF89a is already in use.
 
 Note that GIF files are always read as grayscale (``L``)
@@ -192,7 +200,7 @@ attributes before loading the file::
 ICNS
 ^^^^
 
-PIL reads and (macOS only) writes macOS ``.icns`` files.  By default, the
+Pillow reads and (macOS only) writes macOS ``.icns`` files.  By default, the
 largest available icon is read, though you can override this by setting the
 :py:attr:`~PIL.Image.Image.size` property before calling
 :py:meth:`~PIL.Image.Image.load`.  The :py:meth:`~PIL.Image.Image.open` method
@@ -237,12 +245,12 @@ IM is a format used by LabEye and other applications based on the IFUNC image
 processing library. The library reads and writes most uncompressed interchange
 versions of this format.
 
-IM is the only format that can store all internal PIL formats.
+IM is the only format that can store all internal Pillow formats.
 
 JPEG
 ^^^^
 
-PIL reads JPEG, JFIF, and Adobe JPEG files containing ``L``, ``RGB``, or
+Pillow reads JPEG, JFIF, and Adobe JPEG files containing ``L``, ``RGB``, or
 ``CMYK`` data. It writes standard and progressive JFIF files.
 
 Using the :py:meth:`~PIL.Image.Image.draft` method, you can speed things up by
@@ -354,15 +362,15 @@ JPEG 2000
 
 .. versionadded:: 2.4.0
 
-PIL reads and writes JPEG 2000 files containing ``L``, ``LA``, ``RGB`` or
+Pillow reads and writes JPEG 2000 files containing ``L``, ``LA``, ``RGB`` or
 ``RGBA`` data.  It can also read files containing ``YCbCr`` data, which it
 converts on read into ``RGB`` or ``RGBA`` depending on whether or not there is
-an alpha channel.  PIL supports JPEG 2000 raw codestreams (``.j2k`` files), as
-well as boxed JPEG 2000 files (``.j2p`` or ``.jpx`` files).  PIL does *not*
-support files whose components have different sampling frequencies.
+an alpha channel.  Pillow supports JPEG 2000 raw codestreams (``.j2k`` files),
+as well as boxed JPEG 2000 files (``.j2p`` or ``.jpx`` files).  Pillow does
+*not* support files whose components have different sampling frequencies.
 
 When loading, if you set the ``mode`` on the image prior to the
-:py:meth:`~PIL.Image.Image.load` method being invoked, you can ask PIL to
+:py:meth:`~PIL.Image.Image.load` method being invoked, you can ask Pillow to
 convert the image to either ``RGB`` or ``RGBA`` rather than choosing for
 itself.  It is also possible to set ``reduce`` to the number of resolutions to
 discard (each one reduces the size of the resulting image by a factor of 2),
@@ -433,25 +441,25 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
    Library.
 
    Windows users can install the OpenJPEG binaries available on the
-   OpenJPEG website, but must add them to their PATH in order to use PIL (if
+   OpenJPEG website, but must add them to their PATH in order to use Pillow (if
    you fail to do this, you will get errors about not being able to load the
    ``_imaging`` DLL).
 
 MSP
 ^^^
 
-PIL identifies and reads MSP files from Windows 1 and 2. The library writes
+Pillow identifies and reads MSP files from Windows 1 and 2. The library writes
 uncompressed (Windows 1) versions of this format.
 
 PCX
 ^^^
 
-PIL reads and writes PCX files containing ``1``, ``L``, ``P``, or ``RGB`` data.
+Pillow reads and writes PCX files containing ``1``, ``L``, ``P``, or ``RGB`` data.
 
 PNG
 ^^^
 
-PIL identifies, reads, and writes PNG files containing ``1``, ``L``, ``P``,
+Pillow identifies, reads, and writes PNG files containing ``1``, ``L``, ``P``,
 ``RGB``, or ``RGBA`` data. Interlaced files are supported as of v1.1.7.
 
 The :py:meth:`~PIL.Image.Image.open` method sets the following
@@ -535,8 +543,8 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
 PPM
 ^^^
 
-PIL reads and writes PBM, PGM and PPM files containing ``1``, ``L`` or ``RGB``
-data.
+Pillow reads and writes PBM, PGM and PPM files containing ``1``, ``L`` or
+``RGB`` data.
 
 SGI
 ^^^
@@ -547,10 +555,10 @@ Pillow reads and writes uncompressed ``L``, ``RGB``, and ``RGBA`` files.
 SPIDER
 ^^^^^^
 
-PIL reads and writes SPIDER image files of 32-bit floating point data
+Pillow reads and writes SPIDER image files of 32-bit floating point data
 ("F;32F").
 
-PIL also reads SPIDER stack files containing sequences of SPIDER images. The
+Pillow also reads SPIDER stack files containing sequences of SPIDER images. The
 :py:meth:`~file.seek` and :py:meth:`~file.tell` methods are supported, and
 random access is allowed.
 
@@ -587,8 +595,8 @@ For more information about the SPIDER image processing package, see the
 TGA
 ^^^
 
-PIL reads and writes TGA images containing ``L``, ``LA``, ``P``,
-``RGB``, and ``RGBA`` data. PIL can read and write both uncompressed and
+Pillow reads and writes TGA images containing ``L``, ``LA``, ``P``,
+``RGB``, and ``RGBA`` data. Pillow can read and write both uncompressed and
 run-length encoded TGAs.
 
 TIFF
@@ -596,8 +604,8 @@ TIFF
 
 Pillow reads and writes TIFF files. It can read both striped and tiled
 images, pixel and plane interleaved multi-band images. If you have
-libtiff and its headers installed, PIL can read and write many kinds
-of compressed TIFF files. If not, PIL will only read and write
+libtiff and its headers installed, Pillow can read and write many kinds
+of compressed TIFF files. If not, Pillow will only read and write
 uncompressed files.
 
 .. note::
@@ -734,8 +742,8 @@ using the general tags available through tiffinfo.
 WebP
 ^^^^
 
-PIL reads and writes WebP files. The specifics of PIL's capabilities with this
-format are currently undocumented.
+Pillow reads and writes WebP files. The specifics of Pillow's capabilities with
+this format are currently undocumented.
 
 The :py:meth:`~PIL.Image.Image.save` method supports the following options:
 
@@ -807,7 +815,7 @@ are available when the `save_all` argument is present and true.
 XBM
 ^^^
 
-PIL reads and writes X bitmap files (mode ``1``).
+Pillow reads and writes X bitmap files (mode ``1``).
 
 Read-only formats
 -----------------
@@ -849,7 +857,7 @@ mode.
 FLI, FLC
 ^^^^^^^^
 
-PIL reads Autodesk FLI and FLC animations.
+Pillow reads Autodesk FLI and FLC animations.
 
 The :py:meth:`~PIL.Image.Image.open` method sets the following
 :py:attr:`~PIL.Image.Image.info` properties:
@@ -860,7 +868,7 @@ The :py:meth:`~PIL.Image.Image.open` method sets the following
 FPX
 ^^^
 
-PIL reads Kodak FlashPix files. In the current version, only the highest
+Pillow reads Kodak FlashPix files. In the current version, only the highest
 resolution image is read from the file, and the viewing transform is not taken
 into account.
 
@@ -896,7 +904,7 @@ The :py:meth:`~PIL.Image.Image.open` method sets the following
 GD
 ^^
 
-PIL reads uncompressed GD2 files. Note that you must use
+Pillow reads uncompressed GD2 files. Note that you must use
 :py:func:`PIL.GdImageFile.open` to read such a file.
 
 The :py:meth:`~PIL.Image.Image.open` method sets the following
@@ -909,23 +917,23 @@ The :py:meth:`~PIL.Image.Image.open` method sets the following
 IMT
 ^^^
 
-PIL reads Image Tools images containing ``L`` data.
+Pillow reads Image Tools images containing ``L`` data.
 
 IPTC/NAA
 ^^^^^^^^
 
-PIL provides limited read support for IPTC/NAA newsphoto files.
+Pillow provides limited read support for IPTC/NAA newsphoto files.
 
 MCIDAS
 ^^^^^^
 
-PIL identifies and reads 8-bit McIdas area files.
+Pillow identifies and reads 8-bit McIdas area files.
 
 MIC
 ^^^
 
-PIL identifies and reads Microsoft Image Composer (MIC) files. When opened, the
-first sprite in the file is loaded. You can use :py:meth:`~file.seek` and
+Pillow identifies and reads Microsoft Image Composer (MIC) files. When opened,
+the first sprite in the file is loaded. You can use :py:meth:`~file.seek` and
 :py:meth:`~file.tell` to read other sprites from the file.
 
 Note that there may be an embedded gamma of 2.2 in MIC files.
@@ -941,22 +949,22 @@ zero-indexed and random access is supported.
 PCD
 ^^^
 
-PIL reads PhotoCD files containing ``RGB`` data. This only reads the 768x512
+Pillow reads PhotoCD files containing ``RGB`` data. This only reads the 768x512
 resolution image from the file. Higher resolutions are encoded in a proprietary
 encoding.
 
 PIXAR
 ^^^^^
 
-PIL provides limited support for PIXAR raster files. The library can identify
-and read “dumped” RGB files.
+Pillow provides limited support for PIXAR raster files. The library can
+identify and read “dumped” RGB files.
 
 The format code is ``PIXAR``.
 
 PSD
 ^^^
 
-PIL identifies and reads PSD files written by Adobe Photoshop 2.5 and 3.0.
+Pillow identifies and reads PSD files written by Adobe Photoshop 2.5 and 3.0.
 
 
 WAL
@@ -964,7 +972,7 @@ WAL
 
 .. versionadded:: 1.1.4
 
-PIL reads Quake2 WAL texture files.
+Pillow reads Quake2 WAL texture files.
 
 Note that this file format cannot be automatically identified, so you must use
 the open function in the :py:mod:`~PIL.WalImageFile` module to read files in
@@ -976,7 +984,7 @@ the palette, use the putpalette method.
 XPM
 ^^^
 
-PIL reads X pixmap files (mode ``P``) with 256 colors or less.
+Pillow reads X pixmap files (mode ``P``) with 256 colors or less.
 
 The :py:meth:`~PIL.Image.Image.open` method sets the following
 :py:attr:`~PIL.Image.Image.info` properties:
@@ -991,14 +999,14 @@ Write-only formats
 PALM
 ^^^^
 
-PIL provides write-only support for PALM pixmap files.
+Pillow provides write-only support for PALM pixmap files.
 
 The format code is ``Palm``, the extension is ``.palm``.
 
 PDF
 ^^^
 
-PIL can write PDF (Acrobat) images. Such images are written as binary PDF 1.4
+Pillow can write PDF (Acrobat) images. Such images are written as binary PDF 1.4
 files, using either JPEG or HEX encoding depending on the image mode (and
 whether JPEG support is available or not).
 
@@ -1077,7 +1085,7 @@ The :py:meth:`~PIL.Image.Image.save` method can take the following keyword argum
 XV Thumbnails
 ^^^^^^^^^^^^^
 
-PIL can read XV thumbnail files.
+Pillow can read XV thumbnail files.
 
 Identify-only formats
 ---------------------
@@ -1087,7 +1095,7 @@ BUFR
 
 .. versionadded:: 1.1.3
 
-PIL provides a stub driver for BUFR files.
+Pillow provides a stub driver for BUFR files.
 
 To add read or write support to your application, use
 :py:func:`PIL.BufrStubImagePlugin.register_handler`.
@@ -1097,7 +1105,7 @@ FITS
 
 .. versionadded:: 1.1.5
 
-PIL provides a stub driver for FITS files.
+Pillow provides a stub driver for FITS files.
 
 To add read or write support to your application, use
 :py:func:`PIL.FitsStubImagePlugin.register_handler`.
@@ -1107,11 +1115,11 @@ GRIB
 
 .. versionadded:: 1.1.5
 
-PIL provides a stub driver for GRIB files.
+Pillow provides a stub driver for GRIB files.
 
 The driver requires the file to start with a GRIB header. If you have files
 with embedded GRIB data, or files with multiple GRIB fields, your application
-has to seek to the header before passing the file handle to PIL.
+has to seek to the header before passing the file handle to Pillow.
 
 To add read or write support to your application, use
 :py:func:`PIL.GribStubImagePlugin.register_handler`.
@@ -1121,7 +1129,7 @@ HDF5
 
 .. versionadded:: 1.1.5
 
-PIL provides a stub driver for HDF5 files.
+Pillow provides a stub driver for HDF5 files.
 
 To add read or write support to your application, use
 :py:func:`PIL.Hdf5StubImagePlugin.register_handler`.
@@ -1129,12 +1137,12 @@ To add read or write support to your application, use
 MPEG
 ^^^^
 
-PIL identifies MPEG files.
+Pillow identifies MPEG files.
 
 WMF
 ^^^
 
-PIL can identify playable WMF files.
+Pillow can identify playable WMF files.
 
 In PIL 1.1.4 and earlier, the WMF driver provides some limited rendering
 support, but not enough to be useful for any real application.
diff --git a/docs/releasenotes/6.0.0.rst b/docs/releasenotes/6.0.0.rst
index c9712ed8a..f16c718a1 100644
--- a/docs/releasenotes/6.0.0.rst
+++ b/docs/releasenotes/6.0.0.rst
@@ -102,10 +102,10 @@ Use ``PIL.__version__`` instead.
 API Additions
 =============
 
-TODO
-^^^^
+DIB File Format
+^^^^^^^^^^^^^^^
 
-TODO
+Pillow now supports reading and writing the DIB "Device Independent Bitmap" file format.
 
 Other Changes
 =============
diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py
index f261bf6ef..19aa6db29 100644
--- a/src/PIL/BmpImagePlugin.py
+++ b/src/PIL/BmpImagePlugin.py
@@ -52,6 +52,10 @@ def _accept(prefix):
     return prefix[:2] == b"BM"
 
 
+def _dib_accept(prefix):
+    return i32(prefix[:4]) in [12, 40, 64, 108, 124]
+
+
 # =============================================================================
 # Image plugin for the Windows BMP format.
 # =============================================================================
@@ -291,7 +295,11 @@ SAVE = {
 }
 
 
-def _save(im, fp, filename):
+def _dib_save(im, fp, filename):
+    _save(im, fp, filename, False)
+
+
+def _save(im, fp, filename, bitmap_header=True):
     try:
         rawmode, bits, colors = SAVE[im.mode]
     except KeyError:
@@ -306,14 +314,15 @@ def _save(im, fp, filename):
 
     stride = ((im.size[0]*bits+7)//8+3) & (~3)
     header = 40  # or 64 for OS/2 version 2
-    offset = 14 + header + colors * 4
     image = stride * im.size[1]
 
     # bitmap header
-    fp.write(b"BM" +                      # file type (magic)
-             o32(offset+image) +          # file size
-             o32(0) +                     # reserved
-             o32(offset))                 # image data offset
+    if bitmap_header:
+        offset = 14 + header + colors * 4
+        fp.write(b"BM" +                      # file type (magic)
+                 o32(offset+image) +          # file size
+                 o32(0) +                     # reserved
+                 o32(offset))                 # image data offset
 
     # bitmap info header
     fp.write(o32(header) +                # info header size
@@ -352,3 +361,10 @@ Image.register_save(BmpImageFile.format, _save)
 Image.register_extension(BmpImageFile.format, ".bmp")
 
 Image.register_mime(BmpImageFile.format, "image/bmp")
+
+Image.register_open(DibImageFile.format, DibImageFile, _dib_accept)
+Image.register_save(DibImageFile.format, _dib_save)
+
+Image.register_extension(DibImageFile.format, ".dib")
+
+Image.register_mime(DibImageFile.format, "image/bmp")
diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 0f0d49e82..4e1cff312 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -2021,10 +2021,10 @@ class Image(object):
         debugging purposes.
 
         On Unix platforms, this method saves the image to a temporary
-        PPM file, and calls the **display**, **eog** or **xv**
+        PPM file, and calls either the **xv** utility or the **display**
         utility, depending on which one can be found.
 
-        On macOS, this method saves the image to a temporary PNG file, and
+        On macOS, this method saves the image to a temporary BMP file, and
         opens it with the native Preview application.
 
         On Windows, it saves the image to a temporary BMP file, and uses
diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py
index 2e1f28003..38838996b 100644
--- a/src/PIL/ImageFile.py
+++ b/src/PIL/ImageFile.py
@@ -120,10 +120,9 @@ class ImageFile(Image.Image):
         pass
 
     def get_format_mimetype(self):
-        if self.custom_mimetype:
-            return self.custom_mimetype
-        if self.format is not None:
-            return Image.MIME.get(self.format.upper())
+        if self.format is None:
+            return
+        return self.custom_mimetype or Image.MIME.get(self.format.upper())
 
     def verify(self):
         """Check file integrity"""

Add support for dib images
https://www.imagemagick.org/script/formats.php

> DIB is a BMP file without the BMP header.



diff --git a/.azure-pipelines/jobs/test-docker.yml b/.azure-pipelines/jobs/test-docker.yml
deleted file mode 100644
index 41dc2daec..000000000
--- a/.azure-pipelines/jobs/test-docker.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-parameters:
-  docker: ''  # defaults for any parameters that aren't specified
-  dockerTag: 'master'
-  name: ''
-  vmImage: 'Ubuntu-16.04'
-
-jobs:
-
-- job:  ${{ parameters.name }}
-  pool:
-    vmImage: ${{ parameters.vmImage }}
-
-  steps:
-  - script: |
-      docker pull pythonpillow/${{ parameters.docker }}:${{ parameters.dockerTag }}
-    displayName: 'Docker pull'
-
-  - script: |
-      # The Pillow user in the docker container is UID 1000
-      sudo chown -R 1000 $(Build.SourcesDirectory)
-      docker run -v $(Build.SourcesDirectory):/Pillow pythonpillow/${{ parameters.docker }}:${{ parameters.dockerTag }}
-    displayName: 'Docker build'
diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py
index c51e2bb4e..5fc6d9f36 100644
--- a/Tests/test_file_bmp.py
+++ b/Tests/test_file_bmp.py
@@ -16,6 +16,7 @@ class TestFileBmp(PillowTestCase):
         self.assertEqual(im.mode, reloaded.mode)
         self.assertEqual(im.size, reloaded.size)
         self.assertEqual(reloaded.format, "BMP")
+        self.assertEqual(reloaded.get_format_mimetype(), "image/bmp")
 
     def test_sanity(self):
         self.roundtrip(hopper())
@@ -72,6 +73,20 @@ class TestFileBmp(PillowTestCase):
 
     def test_load_dib(self):
         # test for #1293, Imagegrab returning Unsupported Bitfields Format
-        im = BmpImagePlugin.DibImageFile('Tests/images/clipboard.dib')
+        im = Image.open('Tests/images/clipboard.dib')
+        self.assertEqual(im.format, "DIB")
+        self.assertEqual(im.get_format_mimetype(), "image/bmp")
+
         target = Image.open('Tests/images/clipboard_target.png')
         self.assert_image_equal(im, target)
+
+    def test_save_dib(self):
+        outfile = self.tempfile("temp.dib")
+
+        im = Image.open('Tests/images/clipboard.dib')
+        im.save(outfile)
+
+        reloaded = Image.open(outfile)
+        self.assertEqual(reloaded.format, "DIB")
+        self.assertEqual(reloaded.get_format_mimetype(), "image/bmp")
+        self.assert_image_equal(im, reloaded)

pip install -e .[dev]
parse_log_pytest
requirements.txt
apt-get update apt-get install -y gcc libjpeg-dev zlib1g-dev libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
blessed==1.20.0
build==1.2.2.post1
certifi==2025.1.31
charset-normalizer==3.4.1
check-manifest==0.50
cov-core==1.15.0
coverage==7.8.0
coveralls==4.0.1
docopt==0.6.2
docutils==0.21.2
exceptiongroup==1.2.2
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
jarn.viewdoc==2.7
Jinja2==3.1.6
MarkupSafe==3.0.2
olefile==0.47
packaging==24.2
-e git+https://github.com/python-pillow/Pillow.git@58e60510e65e12d42fb5666bcf6d637041ee76e9#egg=Pillow
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.1
Pygments==2.19.1
pyproject_hooks==1.2.0
pyroma==4.2
pytest==8.3.5
pytest-cov==6.0.0
pytz==2025.2
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
trove-classifiers==2025.3.19.19
urllib3==2.3.0
wcwidth==0.2.13
zipp==3.21.0

name: Pillow
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - blessed==1.20.0
      - build==1.2.2.post1
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - check-manifest==0.50
      - cov-core==1.15.0
      - coverage==7.8.0
      - coveralls==4.0.1
      - docopt==0.6.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jarn-viewdoc==2.7
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - olefile==0.47
      - packaging==24.2
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pygments==2.19.1
      - pyproject-hooks==1.2.0
      - pyroma==4.2
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytz==2025.2
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - trove-classifiers==2025.3.19.19
      - urllib3==2.3.0
      - wcwidth==0.2.13
      - zipp==3.21.0
prefix: /opt/conda/envs/Pillow

Tests/test_file_bmp.py::TestFileBmp::test_load_dib Tests/test_file_bmp.py::TestFileBmp::test_save_dib
Tests/test_file_bmp.py::TestFileBmp::test_dpi Tests/test_file_bmp.py::TestFileBmp::test_invalid_file Tests/test_file_bmp.py::TestFileBmp::test_sanity Tests/test_file_bmp.py::TestFileBmp::test_save_bmp_with_dpi Tests/test_file_bmp.py::TestFileBmp::test_save_to_bytes
.github/CONTRIBUTING.md docs/releasenotes/6.0.0.rst docs/handbook/image-file-formats.rst MANIFEST.in .azure-pipelines/jobs/lint.yml src/PIL/BmpImagePlugin.py azure-pipelines.yml src/PIL/Image.py src/PIL/ImageFile.py
.github/CONTRIBUTING.md docs/releasenotes/6.0.0.rst docs/handbook/image-file-formats.rst MANIFEST.in .azure-pipelines/jobs/lint.yml src/PIL/BmpImagePlugin.py azure-pipelines.yml src/PIL/Image.py src/PIL/ImageFile.py