Describe Image.MIME in register_mime()

This commit is contained in:
Andrew Murray 2023-09-16 09:28:39 +10:00
parent cee8fd0788
commit cabfed9137

View File

@ -3409,8 +3409,12 @@ def register_open(id, factory, accept=None):
def register_mime(id, mimetype): def register_mime(id, mimetype):
""" """
Registers an image MIME type. This function should not be used Registers an image MIME type by populating ``Image.MIME``. This function
in application code. 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 id: An image format identifier.
:param mimetype: The image MIME type for this format. :param mimetype: The image MIME type for this format.