Python library for reading and writing image data
Website: https://imageio.readthedocs.io/
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.8+, and is easy to install.
Professional support is available via Tidelift.
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
See the API docs for more information.
Minimal requirements:
Optional Python packages:
If you use imageio for scientific work, we would appreciate a citation. We have a DOI!
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Available as part of the Tidelift Subscription.
The maintainers of imageio and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
The core of ImageIO is a set of user-facing APIs combined with a plugin manager. API calls choose sensible defaults and then call the plugin manager, which deduces the correct plugin/backend to use for the given resource and file format. The plugin manager then adds sensible backend-specific defaults and then calls one of ImageIOs many backends to perform the actual loading. This allows ImageIO to take care of most of the gory details of loading images for you, while still allowing you to customize the behavior when and where you need to. You can find a more detailed explanation of this process in our documentation.
We welcome contributions of any kind. Here are some suggestions on how you are able to contribute
To assist you in getting started with contributing code, take a look at the development section of the docs. You will find instructions on setting up the dev environment as well as examples on how to contribute code.