ImageResources
Reading images isn’t always limited to simply loading a file from a local disk. Maybe you are writing a web application and your want to read images from HTTP, or your images are already in memory as a BytesIO object. Maybe you are doing machine learning and decided that it is smart to compress your images inside a ZIP file to reduce the IO bottleneck. All these are examples of different places where image data is stored (aka. resources).
ImageIO supports reading (and writing where applicable) for all of the above
examples and more. To stay organized, we group all these sources/resources
together and call them ImageResource. Often ImageResources are expressed as
URIs though sometimes (e.g., in the case of byte streams) they can be python
objects, too.
Here, you can find the documentation on what kind of ImageResources ImageIO currently supports together with documentation and an example on how to read/write them.
Files
Arguably the most common type of resource. You specify it using the path to the file, e.g.
img = iio.imread("path/to/my/image.jpg") # relative path
img