diff --git a/PIL/Image.py b/PIL/Image.py index 4ab40620f..e5543a7eb 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -2478,6 +2478,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.