From cabfed913712fac95270ddf679121c9424c95f04 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 16 Sep 2023 09:28:39 +1000 Subject: [PATCH] Describe Image.MIME in register_mime() --- src/PIL/Image.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index e2d460eeb..2a6b4646b 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3409,8 +3409,12 @@ def register_open(id, factory, accept=None): def register_mime(id, mimetype): """ - Registers an image MIME type. This function should not be used - in application code. + Registers an image MIME type by populating ``Image.MIME``. This function + should not be used in application code. + + ``Image.MIME`` provides a mapping from image format identifiers to mime + formats, but :py:meth:`~PIL.ImageFile.ImageFile.get_format_mimetype` can + provide a different result for specific images. :param id: An image format identifier. :param mimetype: The image MIME type for this format.