- class imageio.core.Format(name, description, extensions=None, modes=None)[source]#
Represents an implementation to read/write a particular file format
A format instance is responsible for 1) providing information about a format; 2) determining whether a certain file can be read/written with this format; 3) providing a reader/writer class.
Generally, imageio will select the right format and use that to read/write an image. A format can also be explicitly chosen in all read/write functions. Use
help(format_name)to see its documentation.
To implement a specific format, one should create a subclass of Format and the Format.Reader and Format.Writer classes. See
A short name of this format. Users can select a format using its name.
A one-line description of the format.
- extensionsstr | list | None
List of filename extensions that this format supports. If a string is passed it should be space or comma separated. The extensions are used in the documentation and to allow users to select a format by file extension. It is not used to determine what format to use for reading/saving a file.
A string containing the modes that this format can handle (‘iIvV’), “i” for an image, “I” for multiple images, “v” for a volume, “V” for multiple volumes. This attribute is used in the documentation and to select the formats when reading/saving a file.
A short description of this format.
The documentation for this format (name + description + docstring).
A list of file extensions supported by this plugin.
A string specifying the modes that this format can handle.
The name of this format.
Get whether this format can read data from the specified uri.
Get whether this format can write data to the speciefed uri.
Return a reader object that can be used to read data and info from the given file.
Return a writer object that can be used to write data and info to the given file.
Attribute and Method Details
A list of file extensions supported by this plugin. These are all lowercase with a leading dot.
Return a reader object that can be used to read data and info from the given file. Users are encouraged to use imageio.get_reader() instead.