imageio 2.37.2__tar.gz → 2.37.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imageio-2.37.2 → imageio-2.37.4/ImageIO.egg-info}/PKG-INFO +6 -7
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/requires.txt +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/LICENSE +1 -1
- {imageio-2.37.2/ImageIO.egg-info → imageio-2.37.4}/PKG-INFO +6 -7
- {imageio-2.37.2 → imageio-2.37.4}/README.md +3 -3
- {imageio-2.37.2 → imageio-2.37.4}/docs/conf.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/__init__.py +2 -2
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/fetching.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/findlib.py +1 -2
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/format.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/legacy_plugin_wrapper.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/request.py +11 -6
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/util.py +2 -4
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/__init__.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/_bsdf.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/_dicom.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/_freeimage.py +2 -2
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/_swf.py +2 -3
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/_tifffile.py +3 -5
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/bsdf.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/feisem.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/freeimagemulti.py +2 -2
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/lytro.py +2 -2
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/pillow.py +9 -6
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/pillow_legacy.py +9 -6
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/pillowmulti.py +5 -5
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/pyav.py +3 -3
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/spe.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/swf.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/tifffile.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/tifffile_v3.py +17 -1
- {imageio-2.37.2 → imageio-2.37.4}/pyproject.toml +6 -4
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_core.py +1 -1
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_ffmpeg_info.py +2 -4
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_freeimage.py +24 -23
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_lytro.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_pillow.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_spe.py +0 -1
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_tifffile_v3.py +6 -1
- {imageio-2.37.2 → imageio-2.37.4}/CONTRIBUTORS.txt +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/SOURCES.txt +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/dependency_links.txt +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/entry_points.txt +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/not-zip-safe +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/ImageIO.egg-info/top_level.txt +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/MANIFEST.in +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/Makefile +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/_static/imageio_logo.png +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/_templates/better_class.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/_templates/formats.rst.template +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/_templates/plugin.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/development/index.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/development/plugins.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/examples.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/formats/formats_by_plugin.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/formats/index.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/formats/video_formats.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/imageio_ext.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/index.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/make.bat +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/reference/core_v3.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/reference/index.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/reference/userapi.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/cmdlinescripts.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/drop27.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/envvariables.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/freezing.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/index.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/installation.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/overview.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/requests.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/scipy.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/docs/user_guide/standardimages.rst +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/__main__.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/config/__init__.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/config/extensions.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/config/extensions.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/config/plugins.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/config/plugins.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/__init__.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/format.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/imopen.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/imopen.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/legacy_plugin_wrapper.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/request.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/core/v3_plugin_api.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/freeze.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/dicom.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/example.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/ffmpeg.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/fits.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/freeimage.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/gdal.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/grab.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/npz.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/opencv.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/pillow_info.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/rawpy.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/plugins/simpleitk.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/py.typed +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/testing.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/typing.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/v2.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/v2.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/v3.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/imageio/v3.pyi +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/setup.cfg +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/conftest.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_bsdf.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_config.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_dicom.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_fei_tiff.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_ffmpeg.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_fits.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_format.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_gdal.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_grab.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_legacy_plugin_wrapper.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_meta.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_npz.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_opencv.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_pillow_legacy.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_pyav.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_rawpy.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_simpleitk.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_swf.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_tifffile.py +0 -0
- {imageio-2.37.2 → imageio-2.37.4}/tests/test_v2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ImageIO
|
|
3
|
-
Version: 2.37.
|
|
3
|
+
Version: 2.37.4
|
|
4
4
|
Summary: Read and write images and video across all major formats. Supports scientific and volumetric data.
|
|
5
5
|
Author: ImageIO contributors
|
|
6
6
|
Maintainer-email: Sebastian Wallkotter <sebastian@wallkoetter.net>, Almar Klein <almar.klein@gmail.com>
|
|
@@ -23,8 +23,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
-
Requires-Python: >=3.
|
|
27
|
-
Description-Content-Type: text/
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
29
|
Requires-Dist: numpy
|
|
30
30
|
Requires-Dist: pillow>=8.3.2
|
|
@@ -89,7 +89,6 @@ Requires-Dist: fsspec[http]; extra == "all-plugins-pypy"
|
|
|
89
89
|
Requires-Dist: imageio-ffmpeg; extra == "all-plugins-pypy"
|
|
90
90
|
Requires-Dist: pillow-heif; extra == "all-plugins-pypy"
|
|
91
91
|
Requires-Dist: psutil; extra == "all-plugins-pypy"
|
|
92
|
-
Requires-Dist: tifffile; extra == "all-plugins-pypy"
|
|
93
92
|
Provides-Extra: full
|
|
94
93
|
Requires-Dist: astropy; extra == "full"
|
|
95
94
|
Requires-Dist: av; extra == "full"
|
|
@@ -125,7 +124,7 @@ Website: <https://imageio.readthedocs.io/>
|
|
|
125
124
|
|
|
126
125
|
Imageio is a mature Python library that makes it easy to read and write image
|
|
127
126
|
and video data. This includes animated images, video, volumetric data, and
|
|
128
|
-
scientific formats. It is cross-platform, runs on Python 3.
|
|
127
|
+
scientific formats. It is cross-platform, runs on Python 3.10+, and is easy to
|
|
129
128
|
install.
|
|
130
129
|
|
|
131
130
|
Professional support is available via
|
|
@@ -165,7 +164,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
165
164
|
[install](https://imageio.readthedocs.io/en/stable/getting_started/installation.html)
|
|
166
165
|
using Conda or pip
|
|
167
166
|
- Few core dependencies (only NumPy and Pillow)
|
|
168
|
-
- Pure Python, runs on Python 3.
|
|
167
|
+
- Pure Python, runs on Python 3.10+, and PyPy
|
|
169
168
|
- Cross platform, runs on Windows, Linux, macOS
|
|
170
169
|
- More than 295 supported
|
|
171
170
|
[formats](https://imageio.readthedocs.io/en/stable/formats/index.html)
|
|
@@ -179,7 +178,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
179
178
|
|
|
180
179
|
Minimal requirements:
|
|
181
180
|
|
|
182
|
-
- Python 3.
|
|
181
|
+
- Python 3.10+
|
|
183
182
|
- NumPy
|
|
184
183
|
- Pillow >= 8.3.2
|
|
185
184
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ImageIO
|
|
3
|
-
Version: 2.37.
|
|
3
|
+
Version: 2.37.4
|
|
4
4
|
Summary: Read and write images and video across all major formats. Supports scientific and volumetric data.
|
|
5
5
|
Author: ImageIO contributors
|
|
6
6
|
Maintainer-email: Sebastian Wallkotter <sebastian@wallkoetter.net>, Almar Klein <almar.klein@gmail.com>
|
|
@@ -23,8 +23,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
-
Requires-Python: >=3.
|
|
27
|
-
Description-Content-Type: text/
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
29
|
Requires-Dist: numpy
|
|
30
30
|
Requires-Dist: pillow>=8.3.2
|
|
@@ -89,7 +89,6 @@ Requires-Dist: fsspec[http]; extra == "all-plugins-pypy"
|
|
|
89
89
|
Requires-Dist: imageio-ffmpeg; extra == "all-plugins-pypy"
|
|
90
90
|
Requires-Dist: pillow-heif; extra == "all-plugins-pypy"
|
|
91
91
|
Requires-Dist: psutil; extra == "all-plugins-pypy"
|
|
92
|
-
Requires-Dist: tifffile; extra == "all-plugins-pypy"
|
|
93
92
|
Provides-Extra: full
|
|
94
93
|
Requires-Dist: astropy; extra == "full"
|
|
95
94
|
Requires-Dist: av; extra == "full"
|
|
@@ -125,7 +124,7 @@ Website: <https://imageio.readthedocs.io/>
|
|
|
125
124
|
|
|
126
125
|
Imageio is a mature Python library that makes it easy to read and write image
|
|
127
126
|
and video data. This includes animated images, video, volumetric data, and
|
|
128
|
-
scientific formats. It is cross-platform, runs on Python 3.
|
|
127
|
+
scientific formats. It is cross-platform, runs on Python 3.10+, and is easy to
|
|
129
128
|
install.
|
|
130
129
|
|
|
131
130
|
Professional support is available via
|
|
@@ -165,7 +164,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
165
164
|
[install](https://imageio.readthedocs.io/en/stable/getting_started/installation.html)
|
|
166
165
|
using Conda or pip
|
|
167
166
|
- Few core dependencies (only NumPy and Pillow)
|
|
168
|
-
- Pure Python, runs on Python 3.
|
|
167
|
+
- Pure Python, runs on Python 3.10+, and PyPy
|
|
169
168
|
- Cross platform, runs on Windows, Linux, macOS
|
|
170
169
|
- More than 295 supported
|
|
171
170
|
[formats](https://imageio.readthedocs.io/en/stable/formats/index.html)
|
|
@@ -179,7 +178,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
179
178
|
|
|
180
179
|
Minimal requirements:
|
|
181
180
|
|
|
182
|
-
- Python 3.
|
|
181
|
+
- Python 3.10+
|
|
183
182
|
- NumPy
|
|
184
183
|
- Pillow >= 8.3.2
|
|
185
184
|
|
|
@@ -14,7 +14,7 @@ Website: <https://imageio.readthedocs.io/>
|
|
|
14
14
|
|
|
15
15
|
Imageio is a mature Python library that makes it easy to read and write image
|
|
16
16
|
and video data. This includes animated images, video, volumetric data, and
|
|
17
|
-
scientific formats. It is cross-platform, runs on Python 3.
|
|
17
|
+
scientific formats. It is cross-platform, runs on Python 3.10+, and is easy to
|
|
18
18
|
install.
|
|
19
19
|
|
|
20
20
|
Professional support is available via
|
|
@@ -54,7 +54,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
54
54
|
[install](https://imageio.readthedocs.io/en/stable/getting_started/installation.html)
|
|
55
55
|
using Conda or pip
|
|
56
56
|
- Few core dependencies (only NumPy and Pillow)
|
|
57
|
-
- Pure Python, runs on Python 3.
|
|
57
|
+
- Pure Python, runs on Python 3.10+, and PyPy
|
|
58
58
|
- Cross platform, runs on Windows, Linux, macOS
|
|
59
59
|
- More than 295 supported
|
|
60
60
|
[formats](https://imageio.readthedocs.io/en/stable/formats/index.html)
|
|
@@ -68,7 +68,7 @@ See the [API docs](https://imageio.readthedocs.io/en/stable/reference/index.html
|
|
|
68
68
|
|
|
69
69
|
Minimal requirements:
|
|
70
70
|
|
|
71
|
-
- Python 3.
|
|
71
|
+
- Python 3.10+
|
|
72
72
|
- NumPy
|
|
73
73
|
- Pillow >= 8.3.2
|
|
74
74
|
|
|
@@ -74,7 +74,7 @@ master_doc = "index"
|
|
|
74
74
|
|
|
75
75
|
# General information about the project.
|
|
76
76
|
project = "imageio"
|
|
77
|
-
copyright = "2014-
|
|
77
|
+
copyright = "2014-2026, imageio contributors"
|
|
78
78
|
|
|
79
79
|
# The version info for the project you're documenting, acts as replacement for
|
|
80
80
|
# |version| and |release|, also used in various other places throughout the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright (c) 2014-
|
|
2
|
+
# Copyright (c) 2014-2026, imageio contributors
|
|
3
3
|
# imageio is distributed under the terms of the (new) BSD License.
|
|
4
4
|
|
|
5
5
|
# This docstring is used at the index of the documentation pages, and
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"""
|
|
9
9
|
Imageio is a Python library that provides an easy interface to read and
|
|
10
10
|
write a wide range of image data, including animated images, volumetric
|
|
11
|
-
data, and scientific formats. It is cross-platform, runs on Python 3.
|
|
11
|
+
data, and scientific formats. It is cross-platform, runs on Python 3.10+,
|
|
12
12
|
and is easy to install.
|
|
13
13
|
|
|
14
14
|
Main website: https://imageio.readthedocs.io/
|
|
@@ -112,7 +112,7 @@ def get_remote_file(fname, directory=None, force_download=False, auto=True):
|
|
|
112
112
|
if not op.isdir(op.dirname(filename)):
|
|
113
113
|
os.makedirs(op.abspath(op.dirname(filename)))
|
|
114
114
|
# let's go get the file
|
|
115
|
-
if os.getenv("
|
|
115
|
+
if os.getenv("CI"): # pragma: no cover
|
|
116
116
|
# On CI, we retry a few times ...
|
|
117
117
|
for i in range(2):
|
|
118
118
|
try:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright (c) 2015-
|
|
2
|
+
# Copyright (c) 2015-2026, imageio contributors
|
|
3
3
|
# Copyright (C) 2013, Zach Pincus, Almar Klein and others
|
|
4
4
|
|
|
5
5
|
"""This module contains generic code to find and load a dynamic library."""
|
|
@@ -8,7 +8,6 @@ import os
|
|
|
8
8
|
import sys
|
|
9
9
|
import ctypes
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
LOCALDIR = os.path.abspath(os.path.dirname(__file__))
|
|
13
12
|
|
|
14
13
|
# Flag that can be patched / set to True to disable loading non-system libs
|
|
@@ -42,7 +42,6 @@ from ..config import known_plugins, known_extensions, PluginConfig, FileExtensio
|
|
|
42
42
|
from ..config.plugins import _original_order
|
|
43
43
|
from .imopen import imopen
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
# survived for backwards compatibility
|
|
47
46
|
# I don't know if external plugin code depends on it existing
|
|
48
47
|
# We no longer do
|
|
@@ -6,6 +6,7 @@ Definition of the Request object, which acts as a kind of bridge between
|
|
|
6
6
|
what the user wants and what the plugins can.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
import errno
|
|
9
10
|
import os
|
|
10
11
|
from io import BytesIO
|
|
11
12
|
import zipfile
|
|
@@ -52,12 +53,12 @@ class ImageMode(str, enum.Enum):
|
|
|
52
53
|
``Request.ImageMode`` and ``Request.IOMode``. The image mode that tells the
|
|
53
54
|
plugin the desired (and expected) image shape. Available values are
|
|
54
55
|
|
|
55
|
-
- single_image ("i"): Return a single image extending in two
|
|
56
|
+
- single_image ("i"): Return a single image extending in two spatial
|
|
56
57
|
dimensions
|
|
57
|
-
- multi_image ("I"): Return a list of images extending in two
|
|
58
|
+
- multi_image ("I"): Return a list of images extending in two spatial
|
|
58
59
|
dimensions
|
|
59
60
|
- single_volume ("v"): Return an image extending into multiple dimensions.
|
|
60
|
-
E.g. three
|
|
61
|
+
E.g. three spatial dimensions for image stacks, or two spatial and one
|
|
61
62
|
time dimension for videos
|
|
62
63
|
- multi_volume ("V"): Return a list of images extending into multiple
|
|
63
64
|
dimensions.
|
|
@@ -162,7 +163,7 @@ RETURN_BYTES = "<bytes>"
|
|
|
162
163
|
EXAMPLE_IMAGES = {
|
|
163
164
|
"astronaut.png": "Image of the astronaut Eileen Collins",
|
|
164
165
|
"camera.png": "A grayscale image of a photographer",
|
|
165
|
-
"checkerboard.png": "Black and white image of a
|
|
166
|
+
"checkerboard.png": "Black and white image of a checkerboard",
|
|
166
167
|
"wood.jpg": "A (repeatable) texture of wooden planks",
|
|
167
168
|
"bricks.jpg": "A (repeatable) texture of stone bricks",
|
|
168
169
|
"clock.png": "Photo of a clock with motion blur (Stefan van der Walt)",
|
|
@@ -407,12 +408,16 @@ class Request(object):
|
|
|
407
408
|
if is_read_request:
|
|
408
409
|
# Reading: check that the file exists (but is allowed a dir)
|
|
409
410
|
if not os.path.exists(fn):
|
|
410
|
-
raise FileNotFoundError(
|
|
411
|
+
raise FileNotFoundError(
|
|
412
|
+
errno.ENOENT, "No such file or directory", fn
|
|
413
|
+
)
|
|
411
414
|
else:
|
|
412
415
|
# Writing: check that the directory to write to does exist
|
|
413
416
|
dn = os.path.dirname(fn)
|
|
414
417
|
if not os.path.exists(dn):
|
|
415
|
-
raise FileNotFoundError(
|
|
418
|
+
raise FileNotFoundError(
|
|
419
|
+
errno.ENOENT, "The directory does not exist", dn
|
|
420
|
+
)
|
|
416
421
|
|
|
417
422
|
@property
|
|
418
423
|
def filename(self):
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
Various utilities for imageio
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
from collections import OrderedDict
|
|
10
9
|
import numpy as np
|
|
11
10
|
import os
|
|
@@ -15,7 +14,6 @@ import sys
|
|
|
15
14
|
import time
|
|
16
15
|
import logging
|
|
17
16
|
|
|
18
|
-
|
|
19
17
|
logger = logging.getLogger("imageio")
|
|
20
18
|
|
|
21
19
|
IS_PYPY = "__pypy__" in sys.builtin_module_names
|
|
@@ -155,11 +153,11 @@ class Array(np.ndarray):
|
|
|
155
153
|
else:
|
|
156
154
|
self._copy_meta({})
|
|
157
155
|
|
|
158
|
-
def __array_wrap__(self, out, context=None):
|
|
156
|
+
def __array_wrap__(self, out, context=None, return_scalar=False):
|
|
159
157
|
"""So that we return a native numpy array (or scalar) when a
|
|
160
158
|
reducting ufunc is applied (such as sum(), std(), etc.)
|
|
161
159
|
"""
|
|
162
|
-
if not out.shape:
|
|
160
|
+
if return_scalar or not out.shape:
|
|
163
161
|
return out.dtype.type(out) # Scalar
|
|
164
162
|
elif out.shape != self.shape:
|
|
165
163
|
return out.view(type=np.ndarray)
|
|
@@ -1057,13 +1057,13 @@ class FIBitmap(FIBaseBitmap):
|
|
|
1057
1057
|
array = numpy.frombuffer(bb, dtype=dtype).copy()
|
|
1058
1058
|
# Deal with strides
|
|
1059
1059
|
if len(shape) == 3:
|
|
1060
|
-
array
|
|
1060
|
+
array = array.reshape(shape[2], strides[-1] // shape[0], shape[0])
|
|
1061
1061
|
array2 = array[: shape[2], : shape[1], : shape[0]]
|
|
1062
1062
|
array = numpy.zeros(shape, dtype=array.dtype)
|
|
1063
1063
|
for i in range(shape[0]):
|
|
1064
1064
|
array[i] = array2[:, :, i].T
|
|
1065
1065
|
else:
|
|
1066
|
-
array
|
|
1066
|
+
array = array.reshape(shape[1], strides[-1])
|
|
1067
1067
|
array = array[: shape[1], : shape[0]].T
|
|
1068
1068
|
return array
|
|
1069
1069
|
|
|
@@ -42,7 +42,6 @@ import logging
|
|
|
42
42
|
|
|
43
43
|
import numpy as np
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
logger = logging.getLogger(__name__)
|
|
47
46
|
|
|
48
47
|
# todo: use Pillow to support reading JPEG images from SWF?
|
|
@@ -653,13 +652,13 @@ def read_pixels(bb, i, tagType, L1):
|
|
|
653
652
|
if tagType == 20:
|
|
654
653
|
# DefineBitsLossless - RGB data
|
|
655
654
|
try:
|
|
656
|
-
a
|
|
655
|
+
a = a.reshape(height, width, 3)
|
|
657
656
|
except Exception:
|
|
658
657
|
# Byte align stuff might cause troubles
|
|
659
658
|
logger.warning("Cannot read image due to byte alignment")
|
|
660
659
|
if tagType == 36:
|
|
661
660
|
# DefineBitsLossless2 - ARGB data
|
|
662
|
-
a
|
|
661
|
+
a = a.reshape(height, width, 4)
|
|
663
662
|
# Swap alpha channel to make RGBA
|
|
664
663
|
b = a
|
|
665
664
|
a = np.zeros_like(a)
|
|
@@ -4734,8 +4734,7 @@ class TiffSequence(object):
|
|
|
4734
4734
|
|
|
4735
4735
|
"""
|
|
4736
4736
|
|
|
4737
|
-
_patterns = {
|
|
4738
|
-
"axes": r"""
|
|
4737
|
+
_patterns = {"axes": r"""
|
|
4739
4738
|
# matches Olympus OIF and Leica TIFF series
|
|
4740
4739
|
_?(?:(q|l|p|a|c|t|x|y|z|ch|tp)(\d{1,4}))
|
|
4741
4740
|
_?(?:(q|l|p|a|c|t|x|y|z|ch|tp)(\d{1,4}))?
|
|
@@ -4744,8 +4743,7 @@ class TiffSequence(object):
|
|
|
4744
4743
|
_?(?:(q|l|p|a|c|t|x|y|z|ch|tp)(\d{1,4}))?
|
|
4745
4744
|
_?(?:(q|l|p|a|c|t|x|y|z|ch|tp)(\d{1,4}))?
|
|
4746
4745
|
_?(?:(q|l|p|a|c|t|x|y|z|ch|tp)(\d{1,4}))?
|
|
4747
|
-
"""
|
|
4748
|
-
}
|
|
4746
|
+
"""}
|
|
4749
4747
|
|
|
4750
4748
|
class ParseError(Exception):
|
|
4751
4749
|
pass
|
|
@@ -7809,7 +7807,7 @@ def read_lsm_channelcolors(fh):
|
|
|
7809
7807
|
"""Read LSM ChannelColors structure from file and return as dict."""
|
|
7810
7808
|
result = {"Mono": False, "Colors": [], "ColorNames": []}
|
|
7811
7809
|
pos = fh.tell()
|
|
7812
|
-
|
|
7810
|
+
size, ncolors, nnames, coffset, noffset, mono = struct.unpack(
|
|
7813
7811
|
"<IIIIII", fh.read(24)
|
|
7814
7812
|
)
|
|
7815
7813
|
if ncolors != nnames:
|
|
@@ -101,7 +101,7 @@ class Image:
|
|
|
101
101
|
if not isinstance(blob, bytes): # then it's a lazy bsdf.Blob
|
|
102
102
|
blob = blob.get_bytes()
|
|
103
103
|
self.array = np.frombuffer(blob, dtype=v["dtype"])
|
|
104
|
-
self.array
|
|
104
|
+
self.array = self.array.reshape(v["shape"])
|
|
105
105
|
return self.array
|
|
106
106
|
|
|
107
107
|
def get_meta(self):
|
|
@@ -306,8 +306,8 @@ class GifFormat(FreeimageMulti):
|
|
|
306
306
|
Y = np.argwhere(diff.sum(1))
|
|
307
307
|
# Get rect coordinates
|
|
308
308
|
if X.size and Y.size:
|
|
309
|
-
x0, x1 =
|
|
310
|
-
y0, y1 =
|
|
309
|
+
x0, x1 = X[0].item(), X[-1].item() + 1
|
|
310
|
+
y0, y1 = Y[0].item(), Y[-1].item() + 1
|
|
311
311
|
else: # No change ... make it minimal
|
|
312
312
|
x0, x1 = 0, 2
|
|
313
313
|
y0, y1 = 0, 2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright (c) 2018, imageio contributors
|
|
2
|
+
# Copyright (c) 2018-2026, imageio contributors
|
|
3
3
|
# imageio is distributed under the terms of the (new) BSD License.
|
|
4
4
|
#
|
|
5
5
|
|
|
@@ -20,6 +20,7 @@ include_thumbnail : bool
|
|
|
20
20
|
Whether to include an image thumbnail in the metadata.
|
|
21
21
|
|
|
22
22
|
"""
|
|
23
|
+
|
|
23
24
|
#
|
|
24
25
|
#
|
|
25
26
|
# This code is based on work by
|
|
@@ -42,7 +43,6 @@ import numpy as np
|
|
|
42
43
|
from ..core import Format
|
|
43
44
|
from ..v2 import imread
|
|
44
45
|
|
|
45
|
-
|
|
46
46
|
logger = logging.getLogger(__name__)
|
|
47
47
|
|
|
48
48
|
|
|
@@ -126,7 +126,7 @@ class PillowPlugin(PluginV3):
|
|
|
126
126
|
warnings.warn(
|
|
127
127
|
"Can't determine file format to write as. You _must_"
|
|
128
128
|
" set `format` during write or the call will fail. Use "
|
|
129
|
-
"`extension` to
|
|
129
|
+
"`extension` to suppress this warning. ",
|
|
130
130
|
UserWarning,
|
|
131
131
|
)
|
|
132
132
|
return
|
|
@@ -187,7 +187,7 @@ class PillowPlugin(PluginV3):
|
|
|
187
187
|
writable_output : bool
|
|
188
188
|
If True, ensure that the image is writable before returning it to
|
|
189
189
|
the user. This incurs a full copy of the pixel data if the data
|
|
190
|
-
served by pillow is read-only.
|
|
190
|
+
served by pillow is read-only. Consequently, setting this flag to
|
|
191
191
|
False improves performance for some images.
|
|
192
192
|
pilmode : str
|
|
193
193
|
Deprecated, use `mode` instead.
|
|
@@ -205,7 +205,7 @@ class PillowPlugin(PluginV3):
|
|
|
205
205
|
-----
|
|
206
206
|
If you read a paletted image (e.g. GIF) then the plugin will apply the
|
|
207
207
|
palette by default. Should you wish to read the palette indices of each
|
|
208
|
-
pixel use ``mode="P"``. The
|
|
208
|
+
pixel use ``mode="P"``. The corresponding color palette can be found in
|
|
209
209
|
the image's metadata using the ``palette`` key when metadata is
|
|
210
210
|
extracted using the ``exclude_applied=False`` kwarg. The latter is
|
|
211
211
|
needed, as palettes are applied by default and hence excluded by default
|
|
@@ -290,7 +290,7 @@ class PillowPlugin(PluginV3):
|
|
|
290
290
|
writable_output : bool
|
|
291
291
|
If True, ensure that the image is writable before returning it to
|
|
292
292
|
the user. This incurs a full copy of the pixel data if the data
|
|
293
|
-
served by pillow is read-only.
|
|
293
|
+
served by pillow is read-only. Consequently, setting this flag to
|
|
294
294
|
False improves performance for some images.
|
|
295
295
|
"""
|
|
296
296
|
|
|
@@ -321,7 +321,7 @@ class PillowPlugin(PluginV3):
|
|
|
321
321
|
warnings.warn(
|
|
322
322
|
"Loading 16-bit (uint16) PNG as int32 due to limitations "
|
|
323
323
|
"in pillow's PNG decoder. This will be fixed in a future "
|
|
324
|
-
"version of pillow which will make this warning
|
|
324
|
+
"version of pillow which will make this warning disappear.",
|
|
325
325
|
UserWarning,
|
|
326
326
|
)
|
|
327
327
|
elif minor < 1: # pragma: no cover
|
|
@@ -442,7 +442,10 @@ class PillowPlugin(PluginV3):
|
|
|
442
442
|
ndimage = ndimage[None, ...]
|
|
443
443
|
|
|
444
444
|
for frame in ndimage:
|
|
445
|
-
|
|
445
|
+
if mode is None:
|
|
446
|
+
pil_frame = Image.fromarray(frame)
|
|
447
|
+
else:
|
|
448
|
+
pil_frame = Image.fromarray(frame, mode=mode)
|
|
446
449
|
if "bits" in kwargs:
|
|
447
450
|
pil_frame = pil_frame.quantize(colors=2 ** kwargs["bits"])
|
|
448
451
|
self.images_to_write.append(pil_frame)
|
|
@@ -173,7 +173,6 @@ import numpy as np
|
|
|
173
173
|
from ..core import Format, image_as_uint
|
|
174
174
|
from ..core.request import URI_FILE, URI_BYTES
|
|
175
175
|
|
|
176
|
-
|
|
177
176
|
logger = logging.getLogger(__name__)
|
|
178
177
|
|
|
179
178
|
|
|
@@ -336,7 +335,7 @@ class PillowFormat(Format):
|
|
|
336
335
|
self._seek(i)
|
|
337
336
|
if self._im.palette and self._im.palette.dirty:
|
|
338
337
|
self._im.palette.rawmode_saved = self._im.palette.rawmode
|
|
339
|
-
self._im.
|
|
338
|
+
self._im.load()
|
|
340
339
|
im = pil_get_frame(self._im, **self._kwargs)
|
|
341
340
|
return im, self._im.info
|
|
342
341
|
|
|
@@ -643,7 +642,7 @@ def save_pillow_close(im):
|
|
|
643
642
|
def pil_try_read(im):
|
|
644
643
|
try:
|
|
645
644
|
# this will raise an IOError if the file is not readable
|
|
646
|
-
im.
|
|
645
|
+
im.load()
|
|
647
646
|
except IOError as e:
|
|
648
647
|
site = "http://pillow.readthedocs.io/en/latest/installation.html"
|
|
649
648
|
site += "#external-libraries"
|
|
@@ -706,14 +705,18 @@ def pil_get_frame(im, is_gray=None, as_gray=None, mode=None, dtype=None):
|
|
|
706
705
|
# We can do this ourselves. Pillow seems to sometimes screw
|
|
707
706
|
# this up if a multi-gif has a palette for each frame ...
|
|
708
707
|
# Create palette array
|
|
709
|
-
|
|
708
|
+
if hasattr(im.palette, "tobytes"):
|
|
709
|
+
palette_bytes = im.palette.tobytes()
|
|
710
|
+
else: # pragma: no cover
|
|
711
|
+
palette_bytes = im.palette.getdata()[1]
|
|
712
|
+
p = np.frombuffer(palette_bytes, np.uint8)
|
|
710
713
|
# Restore the raw mode that was saved to be used to parse the palette
|
|
711
714
|
if hasattr(im.palette, "rawmode_saved"):
|
|
712
715
|
im.palette.rawmode = im.palette.rawmode_saved
|
|
713
716
|
mode = im.palette.rawmode if im.palette.rawmode else im.palette.mode
|
|
714
717
|
nchannels = len(mode)
|
|
715
718
|
# Shape it.
|
|
716
|
-
p
|
|
719
|
+
p = p.reshape(-1, nchannels)
|
|
717
720
|
if p.shape[1] == 3 or (p.shape[1] == 4 and mode[-1] == "X"):
|
|
718
721
|
p = np.column_stack((p[:, :3], 255 * np.ones(p.shape[0], p.dtype)))
|
|
719
722
|
# Swap the axes if the mode is in BGR and not RGB
|
|
@@ -767,7 +770,7 @@ def pil_get_frame(im, is_gray=None, as_gray=None, mode=None, dtype=None):
|
|
|
767
770
|
if "S" in im.mode:
|
|
768
771
|
dtype = dtype.replace("u", "i")
|
|
769
772
|
frame = np.frombuffer(frame.tobytes(), dtype).copy()
|
|
770
|
-
frame
|
|
773
|
+
frame = frame.reshape(shape[::-1])
|
|
771
774
|
else:
|
|
772
775
|
# Use uint16 for PNG's in mode I
|
|
773
776
|
if im.format == "PNG" and im.mode == "I" and dtype is None:
|
|
@@ -134,7 +134,7 @@ class GifWriter: # pragma: no cover
|
|
|
134
134
|
im_rect, rect = self.getSubRectangle(im)
|
|
135
135
|
im_pil = self.converToPIL(im_rect, self.opt_quantizer, self.opt_palette_size)
|
|
136
136
|
|
|
137
|
-
# Get
|
|
137
|
+
# Get palette - apparently, this is the 3d element of the header
|
|
138
138
|
# (but it has not always been). Best we've got. Its not the same
|
|
139
139
|
# as im_pil.palette.tobytes().
|
|
140
140
|
from PIL.GifImagePlugin import getheader
|
|
@@ -215,7 +215,7 @@ class GifWriter: # pragma: no cover
|
|
|
215
215
|
Modified by Alex Robinson in Janurari 2011 to implement subrectangles.
|
|
216
216
|
"""
|
|
217
217
|
|
|
218
|
-
#
|
|
218
|
+
# Default: use full image and place at upper left
|
|
219
219
|
if xy is None:
|
|
220
220
|
xy = (0, 0)
|
|
221
221
|
|
|
@@ -232,7 +232,7 @@ class GifWriter: # pragma: no cover
|
|
|
232
232
|
# reserved00, lct size111=7=2^(7 + 1)=256.
|
|
233
233
|
bb += b"\x87"
|
|
234
234
|
|
|
235
|
-
# LZW minimum size code now comes later,
|
|
235
|
+
# LZW minimum size code now comes later, beginning of [imagedata] blocks
|
|
236
236
|
return bb
|
|
237
237
|
|
|
238
238
|
def getAppExt(self, loop):
|
|
@@ -254,7 +254,7 @@ class GifWriter: # pragma: no cover
|
|
|
254
254
|
|
|
255
255
|
def getGraphicsControlExt(self, duration=0.1, dispose=2):
|
|
256
256
|
"""Graphics Control Extension. A sort of header at the start of
|
|
257
|
-
each image. Specifies duration and
|
|
257
|
+
each image. Specifies duration and transparency.
|
|
258
258
|
|
|
259
259
|
Dispose
|
|
260
260
|
-------
|
|
@@ -274,7 +274,7 @@ class GifWriter: # pragma: no cover
|
|
|
274
274
|
# 2nd bit 1 == user input , next 3 bits, the low two of which are used,
|
|
275
275
|
# are dispose.
|
|
276
276
|
bb += intToBin(int(duration * 100 + 0.5)) # in 100th of seconds
|
|
277
|
-
bb += b"\x00" # no
|
|
277
|
+
bb += b"\x00" # no transparent color
|
|
278
278
|
bb += b"\x00" # end
|
|
279
279
|
return bb
|
|
280
280
|
|
|
@@ -516,7 +516,7 @@ class PyAVPlugin(PluginV3):
|
|
|
516
516
|
variable_fps = bool(self._container.format.flags & 0x400)
|
|
517
517
|
constant_framerate = not variable_fps
|
|
518
518
|
|
|
519
|
-
# note: cheap for
|
|
519
|
+
# note: cheap for contiguous incremental reads
|
|
520
520
|
self._seek(index, constant_framerate=constant_framerate)
|
|
521
521
|
desired_frame = next(self._decoder)
|
|
522
522
|
self._next_idx += 1
|
|
@@ -1150,7 +1150,7 @@ class PyAVPlugin(PluginV3):
|
|
|
1150
1150
|
planes.append(np_plane)
|
|
1151
1151
|
|
|
1152
1152
|
if len(planes) > 1:
|
|
1153
|
-
# Note: the planes *should* exist inside a
|
|
1153
|
+
# Note: the planes *should* exist inside a contiguous memory block
|
|
1154
1154
|
# somewhere inside av.Frame however pyAV does not appear to expose this,
|
|
1155
1155
|
# so we are forced to copy the planes individually instead of wrapping
|
|
1156
1156
|
# them :(
|
|
@@ -1198,7 +1198,7 @@ class PyAVPlugin(PluginV3):
|
|
|
1198
1198
|
|
|
1199
1199
|
index_pts = int(index * pts_delta)
|
|
1200
1200
|
|
|
1201
|
-
# this only seeks to the
|
|
1201
|
+
# this only seeks to the closest (preceding) keyframe
|
|
1202
1202
|
self._container.seek(index_pts, stream=self._video_stream)
|
|
1203
1203
|
self._decoder = self._container.decode(video=0)
|
|
1204
1204
|
|