Skip to content

Commit

Permalink
Describe Image.MIME in register_mime()
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 15, 2023
1 parent cee8fd0 commit cabfed9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cabfed9

Please sign in to comment.