Imageio
Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, video, volumetric data, and scientific formats. It is cross-platform, runs on Python 3.5+, and is easy to install.
Example
import imageio.v3 as iio
im = iio.imread('imageio:chelsea.png') # read a standard image
im.shape # im is a NumPy array of shape (300, 451, 3)
iio.imwrite('chelsea.jpg', im) # convert to jpg
API in a nutshell
As a user, you just have to remember a handful of functions:
- imread() - for reading
- imwrite() - for writing
- imiter() - for iterating image series (animations/videos/OME-TIFF/...)
- improps() - for standardized metadata
- immeta() - for format-specific metadata
- imopen() - for advanced usage