aboutsummaryrefslogtreecommitdiffstats
path: root/bsie/reader/image/__init__.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-01-16 21:37:09 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-01-16 21:37:09 +0100
commit05a841215c82ef40d4679dfc4d2c26572bd4d349 (patch)
tree9888ae0bd2345816d1ab479dd34b4c6b902c158a /bsie/reader/image/__init__.py
parent057e09d6537bf5c39815661a75819081e3e5fda7 (diff)
parent58aaa864f9747d27c065739256d4c6635ca9b751 (diff)
downloadbsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.gz
bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.bz2
bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.zip
Merge branch 'mb/feature' into develop
Diffstat (limited to 'bsie/reader/image/__init__.py')
-rw-r--r--bsie/reader/image/__init__.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/bsie/reader/image/__init__.py b/bsie/reader/image/__init__.py
new file mode 100644
index 0000000..1f290b5
--- /dev/null
+++ b/bsie/reader/image/__init__.py
@@ -0,0 +1,37 @@
+"""
+
+Part of the bsie module.
+A copy of the license is provided with the project.
+Author: Matthias Baumgartner, 2022
+"""
+# standard imports
+import typing
+
+# external imports
+import PIL.Image
+
+# inner-module imports
+from .. import chain
+
+# constants
+_FILE_FORMAT_READERS: typing.Sequence[str] = (
+ __package__ + '._raw.RawImage',
+ __package__ + '._pillow.PillowImage',
+ )
+
+# exports
+__all__: typing.Sequence[str] = (
+ 'Image',
+ )
+
+
+## code ##
+
+# FIXME: Check if PIL.Image or PIL.Image.Image, or if version-dependent
+class Image(chain.ReaderChain[PIL.Image.Image]): # pylint: disable=too-few-public-methods
+ """Read an image file."""
+
+ def __init__(self, cfg: typing.Optional[typing.Any] = None):
+ super().__init__(_FILE_FORMAT_READERS, cfg)
+
+## EOF ##