- classmethod ImageFile.load(*args, **kargs)¶
ImageFilefrom file abnd guessing a better subclass if necessary.
filename (string or None) – path to file to load
- Keyword Arguments
(ImageFile) – A a new
ImageFile(or subclass thereof) instance
If filetupe is a string, then it is first tried as an exact match to a subclass name, otherwise it is used as a partial match and the first class in priority order is that matches is used.
Some subclasses can be found in the
Each subclass is scanned in turn for a class attribute
Stoner.ImnageFile.prioritywhich governs the order in which they are tried. Subclasses which can make an early positive determination that a file has the correct format can have higher priority levels. Classes should return a suitable expcetion if they fail to load the file.
If no class can load a file successfully then a RunttimeError exception is raised.