imageio icon indicating copy to clipboard operation
imageio copied to clipboard

Docs: "Returns" section of imopen missing

Open sausix opened this issue 1 year ago • 1 comments

There's absolutely no hint about the return type of v3.imopen in the documentation.

imageio/core/imopen.py

I already know it depends on the plugin class. It returns imageio.plugins.pillow.PillowPlugin in my case.

Thanks for the great project.

sausix avatar May 20 '23 20:05 sausix

Good catch; we should probably add a sentence or two about this in the docs. Meanwhile, imopen returns an instance of the plugin class. Which one gets chosen depends on the image format, what plugins you have installed, and whether or not you overwrite auto-selection (using the plugin= kwarg).

To get a sense of which plugin is chosen when, check out our list of supported formats: https://imageio.readthedocs.io/en/stable/formats/index.html#all-formats It lists the order in which plugins are tried for each supported format and the first installed plugin (that declares that it can handle the file) will be chosen.

FirefoxMetzger avatar May 20 '23 20:05 FirefoxMetzger