Expose registered file extensions

This adds a new method in Image (registered_extensions) that exposes the
internal EXTENSION dictionary to consumers of the library
This commit is contained in:
Luis G 2016-06-19 21:39:31 -03:00 committed by Andrew Murray
parent 9dddca0be2
commit 67c1258cfc

View File

@ -2512,6 +2512,16 @@ def register_extension(id, extension):
EXTENSION[extension.lower()] = id.upper()
def registered_extensions():
"""
Returns a dictionary containing all file extensions belonging
to registered plugins
"""
if not bool(EXTENSION):
init()
return EXTENSION
# --------------------------------------------------------------------
# Simple display support. User code may override this.