• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H06-Jul-2020-1,393870

imageio/H06-Jul-2020-24,84919,234

tests/H06-Jul-2020-5,0583,556

LICENSEH A D18-Feb-20201.3 KiB2519

PKG-INFOH A D06-Jul-20202.5 KiB6452

README.mdH A D08-Jun-20205.3 KiB146111

setup.pyH A D18-Feb-20206.4 KiB235168

README.md

1# IMAGEIO
2
3[![PyPI Version](https://img.shields.io/pypi/v/imageio.svg)](https://pypi.python.org/pypi/imageio/)
4[![Supported Python Versions](https://img.shields.io/pypi/pyversions/imageio.svg)](https://pypi.python.org/pypi/imageio/)
5[![Build Status](https://travis-ci.org/imageio/imageio.svg?branch=master)](https://travis-ci.org/imageio/imageio)
6[![Coverage Status](https://coveralls.io/repos/github/imageio/imageio/badge.svg?branch=master)](https://coveralls.io/github/imageio/imageio?branch=master)
7[![Documentation Status](https://readthedocs.org/projects/imageio/badge/?version=latest)](https://imageio.readthedocs.io)
8[![PyPi Download stats](http://pepy.tech/badge/imageio)](http://pepy.tech/project/imageio)
9[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1488561.svg)](https://doi.org/10.5281/zenodo.1488561)
10
11Website: https://imageio.github.io
12
13<!-- From below ends up on the website Keep this ---- DIVIDER ---- -->
14
15<p class='summary'>
16Imageio is a Python library that provides an easy interface to read and
17write a wide range of image data, including animated images, video,
18volumetric data, and scientific formats. It is cross-platform, runs on
19Python 3.5+, and is easy to install.
20</p>
21
22<h2>Example</h2>
23Here's a minimal example of how to use imageio. See the docs for
24<a href='https://imageio.readthedocs.io/en/stable/examples.html'>more examples</a>.
25
26```python
27import imageio
28im = imageio.imread('imageio:chelsea.png')  # read a standard image
29im.shape  # im is a NumPy array
30>> (300, 451, 3)
31imageio.imwrite('~/chelsea-gray.jpg', im[:, :, 0])
32```
33
34<h2>API in a nutshell</h2>
35As a user, you just have to remember a handful of functions:
36
37<ul>
38    <li>imread() and imwrite() - for single images</li>
39    <li>mimread() and mimwrite() - for image series (animations)</li>
40    <li>volread() and volwrite() - for volumetric image data</li>
41    <li>get_reader() and get_writer() - for more control (e.g. streaming or compression)</li>
42    <li>See the <a href='https://imageio.readthedocs.io/en/stable/userapi.html'>user api</a> for more information</li>
43</ul>
44
45
46<h2>Features</h2>
47<ul>
48    <li>Simple interface via a consise set of functions.</li>
49    <li>Easy to <a href='https://imageio.readthedocs.io/en/stable/installation.html'>install</a> using Conda or pip</li>
50    <li>Few dependencies (only NumPy and Pillow)</li>
51    <li>Pure Python, runs on Python 3.5+, and PyPy</li>
52    <li>Cross platform, runs on Windows, Linux, macOS</li>
53    <li>Lots of supported <a href='https://imageio.readthedocs.io/en/stable/formats.html'>formats</a></li>
54    <li>Can read from file names, file objects, zipfiles, http/ftp, and raw bytes</li>
55    <li>Easy to extend using plugins</li>
56    <li>Code quality is maintained with many tests and continuous integration</li>
57</ul>
58
59
60<h2>Dependencies</h2>
61
62Minimal requirements:
63<ul>
64    <li>Python 3.5+</li>
65    <li>NumPy</li>
66    <li>Pillow</li>
67</ul>
68
69Optional Python packages:
70<ul>
71    <li>imageio-ffmpeg (for working with video files)</li>
72    <li>itk or SimpleITK (for ITK formats)</li>
73    <li>astropy (for FITS plugin)</li>
74    <li>osgeo (for GDAL plugin)</li>
75</ul>
76
77Still on an earlier version of Python? Imageio version 2.6.x supports Python 2.7 and 3.4.
78
79
80<h2>Citing imageio</h2>
81<p>
82If you use imageio for scientific work, we would appreciate a citation.
83We have a <a href='https://doi.org/10.5281/zenodo.1488561'>DOI</a>!
84</p>
85
86
87<h2>Security contact information</h2>
88
89To report a security vulnerability, please use the
90<a href='https://tidelift.com/security'>Tidelift security contact</a>.
91Tidelift will coordinate the fix and disclosure.
92
93
94<h2>imageio for enterprise</h2>
95
96Available as part of the Tidelift Subscription.
97
98The 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.
99<a href='https://tidelift.com/subscription/pkg/pypi-imageio?utm_source=pypi-imageio&utm_medium=referral&utm_campaign=readme'>Learn more</a>.
100
101
102<h2>Details</h2>
103<p>
104Imageio has a relatively simple core that provides a common interface
105to different file formats. This core takes care of reading from different
106sources (like http), and exposes a simple API for the plugins to access
107the raw data. All file formats are implemented in plugins. Additional
108plugins can easily be registered.
109</p><p>
110Imageio provides a wide range of image formats, including scientific
111formats. Any help with implementing more formats is very welcome!
112</p><p>
113The codebase adheres to (a subset of) the PEP8 style guides. We strive
114for maximum test coverage (100% for the core, >95% for each plugin).
115</p>
116
117
118<h2>Contributing</h2>
119
120<p>Install a complete development environment:</p>
121
122```bash
123pip install -r requirements.txt
124pip install -e .
125```
126
127<p><i>N.B. this does not include GDAL because it has awkward compiled dependencies</i></p>
128
129<p>You may see failing test(s) due to missing installed components.
130On ubuntu, do <code>sudo apt install libfreeimage3</code></p>
131
132<p>
133Style checks, unit tests and coverage are controlled by <code>invoke</code>.
134Before committing, check these with:</p>
135
136```bash
137# reformat code on python 3.6+
138invoke autoformat
139# check there are no style errors
140invoke test --style
141# check the tests pass
142invoke test --unit
143# check test coverage (re-runs tests)
144invoke test --cover
145```
146