Here is a list of all image formats that Pillow supports. Since I want to check formats in my application without opening the image and the list of formats will probably change in the future, I wonder if there is an option to retrieve a list of supported file extensions/formats programmatically?
I want to do something like this:
>>> <import something from Pillow>
>>> formats = <call something from Pillow>
>>> formats
["jpg", "jpeg", "png", ...]
I am especially interested in reading formats (so writing does not need to be supported).
You can use features:
Sample Output
There is also:
You can also check from outside of your Python interpreter like this: