imageio.v3.immeta#

imageio.v3.immeta(uri, *, index: Optional[int] = 0, plugin: Optional[str] = None, exclude_applied: bool = True, **kwargs) Dict[str, Any]#

Read format-specific metadata.

Opens the given URI and reads metadata for an ndimage from it. The contents of the returned metadata dictionary is specific to both the image format and plugin used to open the ImageResource. To learn about the exact behavior, check the documentation of the relevant plugin. Typically, immeta returns a dictionary specific to the image format, where keys match metadata field names and values are a field’s contents.

Parameters
uri{str, pathlib.Path, bytes, file}

The resource to load the image from, e.g. a filename, pathlib.Path, http address or file object, see the docs for more info.

index{int, None}

If the URI contains multiple ndimages, select the index-th ndimage from among them and return it.

plugin{str, None}

The plugin to be used. If None (default), performs a search for a matching plugin.

**kwargs

Additional keyword arguments will be passed to the plugin’s metadata method.

Returns
imagendimage

The ndimage located at the given URI.