- Notifications
You must be signed in to change notification settings - Fork308
Python library for reading and writing image data
License
imageio/imageio
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Website:https://imageio.readthedocs.io/
Imageio is a mature Python library that makes it easy to read and write imageand video data. This includes animated images, video, volumetric data, andscientific formats. It is cross-platform, runs on Python 3.9+, and is easy toinstall.
Professional support is available viaTidelift.
Here's a minimal example of how to use imageio. See the docs formoreexamples.
importimageio.v3asiioim=iio.imread('imageio:chelsea.png')# read a standard imageim.shape# im is a NumPy array of shape (300, 451, 3)iio.imwrite('chelsea.jpg',im)# convert to jpg
You just have to remember a handful of functions:
imread()# for readingimwrite()# for writingimiter()# for iterating image series (animations/videos/OME-TIFF/...)improps()# for standardized metadataimmeta()# for format-specific metadataimopen()# for advanced usage
See theAPI docs for more information.
- Simple interface via a concise set of functions
- Easy toinstallusing Conda or pip
- Few core dependencies (only NumPy and Pillow)
- Pure Python, runs on Python 3.9+, and PyPy
- Cross platform, runs on Windows, Linux, macOS
- More than 295 supportedformats
- Read/Write support for variousresources(files, URLs, bytes, FileLike objects, ...)
- High code quality and large test suite including functional, regression, andintegration tests
Minimal requirements:
- Python 3.9+
- NumPy
- Pillow >= 8.3.2
Optional Python packages:
- imageio-ffmpeg (for working with video files)
- pyav (for working with video files)
- tifffile (for working with TIFF files)
- itk or SimpleITK (for ITK plugin)
- astropy (for FITS plugin)
- imageio-flif (for workingwithFLIF image files)
To report a security vulnerability, please use theTidelift securitycontact. Tidelift will coordinate the fix anddisclosure.
Available as part of the Tidelift Subscription.
The maintainers of imageio and thousands of other packages are working withTidelift to deliver commercial support and maintenance for the open sourcedependencies you use to build your applications. Save time, reduce risk, andimprove code health, while paying the maintainers of the exact dependencies youuse. (Learnmore)
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, whichdeduces the correct plugin/backend to use for the given resource and fileformat. The plugin manager adds sensible backend-specific defaults and thencalls one of ImageIOs many backends to perform the actual loading. This allowsImageIO 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 inourdocumentation.
We welcome contributions of any kind. Here are some suggestions on how you areable to contribute
- add missing formats to the format list
- suggest/implement support for new backends
- report/fix any bugs you encounter while using ImageIO
To assist you in getting started with contributing code, take a look at thedevelopmentsection of thedocs. You will find instructions on setting up the dev environment as well asexamples on how to contribute code.
About
Python library for reading and writing image data