API Reference#
ImageIO’s API follows the usual idea of choosing sensible defaults for the average user, but giving you fine grained control where you need it. As such the API is split into two parts: The Core API, which covers standard use-cases, and a plugin/backend specific API, which allows you to take full advantage of a backend and its unique features.
Core APIs#
The core API is ImageIOs public frontend. It provides convenient (and powerful) access to the growing number of individual plugins on top of which ImageIO is built. Currently the following APIs exist:
Core API v3
Note
To use this API import it using:
import imageio.v3 as iio
Note
Check the narrative documentation to build intuition for how to use this API. You can find them here: narrative v3 API docs.
|
Read an ndimage from a URI. |
|
Read a sequence of ndimages from a URI. |
|
Read standardized metadata. |
|
Read format-specific metadata. |
|
Write an ndimage to the given URI. |
|
Open an ImageResource. |
Core API v2
Warning
This API exists for backwards compatibility. It is a wrapper around calls to the v3 API and new code should use the v3 API directly.
Note
To use this API import it using:
import imageio.v2 as iio
Note
Check the narrative documentation to build intuition for how to use this API. You can find them here: narrative v2 API docs.
|
Reads an image from the specified file. |
|
Reads multiple images from the specified file. |
|
Reads a volume from the specified file. |
|
Reads multiple volumes from the specified file. |
|
Write an image to the specified file. |
|
Write multiple images to the specified file. |
|
Write a volume to the specified file. |
|
Write multiple volumes to the specified file. |
|
Returns a |
|
Returns a |
Plugins & Backend Libraries#
Sometimes, you need to do more than just “load an image, done”. Sometimes you
need to use a very specific feature of a very specific backend. ImageIO allows
you to do so by allowing its plugins to extend the core API. Typically this is
done in the form of additional keyword arguments (kwarg
) or plugin-specific
methods. Below you can find a list of available plugins and which arguments they
support.
Read/Write BSDF files. |
|
Read DICOM files. |
|
Read TIFF from FEI SEM microscopes. |
|
Read/Write video using FFMPEG |
|
Read FITS files. |
|
Read/Write images using FreeImage. |
|
Read GDAL files. |
|
Read LFR files (Lytro Illum). |
|
Read/Write NPZ files. |
|
Read/Write images using OpenCV. |
|
Read/Write images using Pillow/PIL. |
|
Read/Write images using pillow/PIL (legacy). |
|
Read/Write Videos (and images) using PyAV. |
|
Read/Write images using rawpy. |
|
Read/Write images using SimpleITK. |
|
Read SPE files. |
|
Read/Write SWF files. |
|
Read/Write TIFF files. |
|
Read/Write TIFF files using tifffile. |