Glymur 0.13.6__tar.gz → 0.13.7__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.
- {glymur-0.13.6 → glymur-0.13.7}/CHANGES.txt +8 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/PKG-INFO +4 -3
- {glymur-0.13.6 → glymur-0.13.7}/PKG-INFO +4 -3
- {glymur-0.13.6 → glymur-0.13.7}/glymur/jp2box.py +4 -4
- {glymur-0.13.6 → glymur-0.13.7}/glymur/jp2kr.py +3 -3
- {glymur-0.13.6 → glymur-0.13.7}/glymur/version.py +1 -1
- {glymur-0.13.6 → glymur-0.13.7}/setup.cfg +3 -2
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2box_xml.py +41 -30
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_printing.py +2 -1
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_tiff2jp2.py +27 -27
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/SOURCES.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/dependency_links.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/entry_points.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/not-zip-safe +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/requires.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/Glymur.egg-info/top_level.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/LICENSE.txt +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/MANIFEST.in +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/README.md +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/__init__.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/_iccprofile.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/codestream.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/command_line.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/config.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/core.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/data/__init__.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/data/goodstuff.j2k +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/data/heliov.jpx +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/data/nemo.jp2 +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/jp2k.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/lib/__init__.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/lib/openjp2.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/lib/tiff.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/options.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/glymur/tiff.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/pyproject.toml +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_callbacks.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_cinema.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_codestream.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_colour_specification_box.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_config.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_geo.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2box.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2box_jpx.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2box_uuid.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2k.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2k_writes.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_jp2kr.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_libtiff.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_openjp2.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_set_decoded_components.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_slicing.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_threading.py +0 -0
- {glymur-0.13.6 → glymur-0.13.7}/tests/test_warnings.py +0 -0
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
Jan 15, 2025 - v0.13.7
|
|
2
|
+
Qualify on python 3.13
|
|
3
|
+
Fix test warnings due to scikit-image deprecation.
|
|
4
|
+
Update CI test matrix, tighten 3rd party library requirements.
|
|
5
|
+
Add ability to construct XML box from file-like object.
|
|
6
|
+
Add circle-ci CI.
|
|
7
|
+
Fix test suite for numpy 2.x printing (thanks to Arne Keller).
|
|
8
|
+
|
|
1
9
|
Aug 19, 2024 - v0.13.6
|
|
2
10
|
Fix tiff2jp2 when tile coverage not square.
|
|
3
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: Glymur
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.7
|
|
4
4
|
Home-page: https://github.com/quintusdias/glymur
|
|
5
5
|
Author: 'John Evans'
|
|
6
6
|
Author-email: "John Evans" <jevans667cc@proton.me>
|
|
@@ -9,12 +9,13 @@ Classifier: Programming Language :: Python
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.10
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
13
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
15
|
Classifier: Intended Audience :: Science/Research
|
|
15
16
|
Classifier: Operating System :: OS Independent
|
|
16
17
|
Classifier: Topic :: Scientific/Engineering
|
|
17
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
License-File: LICENSE.txt
|
|
20
21
|
Requires-Dist: numpy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: Glymur
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.7
|
|
4
4
|
Home-page: https://github.com/quintusdias/glymur
|
|
5
5
|
Author: 'John Evans'
|
|
6
6
|
Author-email: "John Evans" <jevans667cc@proton.me>
|
|
@@ -9,12 +9,13 @@ Classifier: Programming Language :: Python
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.10
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
13
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
15
|
Classifier: Intended Audience :: Science/Research
|
|
15
16
|
Classifier: Operating System :: OS Independent
|
|
16
17
|
Classifier: Topic :: Scientific/Engineering
|
|
17
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
License-File: LICENSE.txt
|
|
20
21
|
Requires-Dist: numpy
|
|
@@ -2969,9 +2969,9 @@ class XMLBox(Jp2kBox):
|
|
|
2969
2969
|
----------
|
|
2970
2970
|
xml : ElementTree
|
|
2971
2971
|
An ElementTree object already existing in python.
|
|
2972
|
-
filename : str or
|
|
2973
|
-
File
|
|
2974
|
-
|
|
2972
|
+
filename : file, str, or pathlib.Path
|
|
2973
|
+
File to read. If filename is not None, then the xml keyword
|
|
2974
|
+
argument must be None.
|
|
2975
2975
|
"""
|
|
2976
2976
|
super().__init__()
|
|
2977
2977
|
if filename is not None and xml is not None:
|
|
@@ -2981,7 +2981,7 @@ class XMLBox(Jp2kBox):
|
|
|
2981
2981
|
)
|
|
2982
2982
|
raise RuntimeError(msg)
|
|
2983
2983
|
if filename is not None:
|
|
2984
|
-
self.xml = ET.parse(
|
|
2984
|
+
self.xml = ET.parse(filename)
|
|
2985
2985
|
else:
|
|
2986
2986
|
self.xml = xml
|
|
2987
2987
|
self.length = length
|
|
@@ -886,9 +886,9 @@ class Jp2kr(Jp2kBox):
|
|
|
886
886
|
def get_codestream(self, header_only=True):
|
|
887
887
|
"""Retrieve codestream.
|
|
888
888
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
889
|
+
This differs from the codestream property in that segment
|
|
890
|
+
metadata that lies past the end of the codestream header
|
|
891
|
+
can be retrieved.
|
|
892
892
|
|
|
893
893
|
Parameters
|
|
894
894
|
----------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = Glymur
|
|
3
|
-
version = 0.13.
|
|
3
|
+
version = 0.13.7
|
|
4
4
|
author = 'John Evans'
|
|
5
5
|
author_email = "John Evans" <jevans667cc@proton.me>
|
|
6
6
|
license = 'MIT'
|
|
@@ -14,6 +14,7 @@ classifiers =
|
|
|
14
14
|
Programming Language :: Python :: 3.10
|
|
15
15
|
Programming Language :: Python :: 3.11
|
|
16
16
|
Programming Language :: Python :: 3.12
|
|
17
|
+
Programming Language :: Python :: 3.13
|
|
17
18
|
Programming Language :: Python :: Implementation :: CPython
|
|
18
19
|
License :: OSI Approved :: MIT License
|
|
19
20
|
Intended Audience :: Science/Research
|
|
@@ -26,7 +27,7 @@ install_requires =
|
|
|
26
27
|
numpy
|
|
27
28
|
lxml
|
|
28
29
|
packaging
|
|
29
|
-
python_requires = >=3.
|
|
30
|
+
python_requires = >=3.9
|
|
30
31
|
include_package_data = True
|
|
31
32
|
zip_safe = False
|
|
32
33
|
|
|
@@ -4,8 +4,9 @@ Test suite specifically targeting the JP2 XML box layout.
|
|
|
4
4
|
"""
|
|
5
5
|
# Standard library imports
|
|
6
6
|
import importlib.resources as ir
|
|
7
|
-
from io import BytesIO
|
|
7
|
+
from io import BytesIO, StringIO
|
|
8
8
|
import pathlib
|
|
9
|
+
import shutil
|
|
9
10
|
import struct
|
|
10
11
|
import warnings
|
|
11
12
|
|
|
@@ -30,35 +31,11 @@ class TestXML(fixtures.TestCommon):
|
|
|
30
31
|
def setUp(self):
|
|
31
32
|
super().setUp()
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<gdppc>141100</gdppc>
|
|
39
|
-
<neighbor name="Austria" direction="E"/>
|
|
40
|
-
<neighbor name="Switzerland" direction="W"/>
|
|
41
|
-
</country>
|
|
42
|
-
<country name="Singapore">
|
|
43
|
-
<rank>4</rank>
|
|
44
|
-
<year>2011</year>
|
|
45
|
-
<gdppc>59900</gdppc>
|
|
46
|
-
<neighbor name="Malaysia" direction="N"/>
|
|
47
|
-
</country>
|
|
48
|
-
<country name="Panama">
|
|
49
|
-
<rank>68</rank>
|
|
50
|
-
<year>2011</year>
|
|
51
|
-
<gdppc>13600</gdppc>
|
|
52
|
-
<neighbor name="Costa Rica" direction="W"/>
|
|
53
|
-
<neighbor name="Colombia" direction="E"/>
|
|
54
|
-
</country>
|
|
55
|
-
</data>"""
|
|
56
|
-
path = self.test_dir_path / 'data.xml'
|
|
57
|
-
with path.open(mode='wb') as tfile:
|
|
58
|
-
tfile.write(raw_xml)
|
|
59
|
-
tfile.flush()
|
|
60
|
-
self.xmlfile_path = path
|
|
61
|
-
self.xmlfile = str(path)
|
|
34
|
+
p = ir.files('tests.data').joinpath('countries.xml')
|
|
35
|
+
dest_path = self.test_dir_path / 'data.xml'
|
|
36
|
+
shutil.copyfile(p, dest_path)
|
|
37
|
+
self.xmlfile_path = dest_path
|
|
38
|
+
self.xmlfile = str(dest_path)
|
|
62
39
|
|
|
63
40
|
j2k = Jp2k(self.j2kfile)
|
|
64
41
|
codestream = j2k.get_codestream()
|
|
@@ -134,6 +111,40 @@ class TestXML(fixtures.TestCommon):
|
|
|
134
111
|
self.assertEqual(neighbor.attrib['name'], 'Malaysia')
|
|
135
112
|
self.assertEqual(neighbor.attrib['direction'], 'N')
|
|
136
113
|
|
|
114
|
+
def test_xml_from_bytesio_object(self):
|
|
115
|
+
"""
|
|
116
|
+
SCENARIO: Create an xml box by pointing at a file-like BytesIO object
|
|
117
|
+
|
|
118
|
+
EXPECTED RESULT: The xml box is validated.
|
|
119
|
+
"""
|
|
120
|
+
btext = self.xmlfile_path.read_bytes()
|
|
121
|
+
b = BytesIO(btext)
|
|
122
|
+
box = glymur.jp2box.XMLBox(filename=b)
|
|
123
|
+
|
|
124
|
+
elts = box.xml.findall('country')
|
|
125
|
+
self.assertEqual(len(elts), 3)
|
|
126
|
+
|
|
127
|
+
neighbor = elts[1].find('neighbor')
|
|
128
|
+
self.assertEqual(neighbor.attrib['name'], 'Malaysia')
|
|
129
|
+
self.assertEqual(neighbor.attrib['direction'], 'N')
|
|
130
|
+
|
|
131
|
+
def test_xml_from_stringio_object(self):
|
|
132
|
+
"""
|
|
133
|
+
SCENARIO: Create an xml box by pointing at a file-like StringIO object
|
|
134
|
+
|
|
135
|
+
EXPECTED RESULT: The xml box is validated.
|
|
136
|
+
"""
|
|
137
|
+
text = self.xmlfile_path.read_text()
|
|
138
|
+
sio = StringIO(text)
|
|
139
|
+
box = glymur.jp2box.XMLBox(filename=sio)
|
|
140
|
+
|
|
141
|
+
elts = box.xml.findall('country')
|
|
142
|
+
self.assertEqual(len(elts), 3)
|
|
143
|
+
|
|
144
|
+
neighbor = elts[1].find('neighbor')
|
|
145
|
+
self.assertEqual(neighbor.attrib['name'], 'Malaysia')
|
|
146
|
+
self.assertEqual(neighbor.attrib['direction'], 'N')
|
|
147
|
+
|
|
137
148
|
def test_utf8_xml_from_xml_file(self):
|
|
138
149
|
"""
|
|
139
150
|
XMLBox from an XML file with encoding declaration.
|
|
@@ -1074,7 +1074,8 @@ class TestPrinting(fixtures.TestCommon):
|
|
|
1074
1074
|
"array([ 0, 10, 20, ..., 70, 80, 90], dtype=uint32)),\n"
|
|
1075
1075
|
" ('ExifTag', OrderedDict([('Make', 'HTC')]))])" # noqa : E501
|
|
1076
1076
|
)
|
|
1077
|
-
|
|
1077
|
+
# Numpy 2.x adds shape to string representation
|
|
1078
|
+
self.assertEqual(actual.replace("shape=(10,), ", ""), expected)
|
|
1078
1079
|
|
|
1079
1080
|
def test_crg(self):
|
|
1080
1081
|
"""verify printing of CRG segment"""
|
|
@@ -12,6 +12,7 @@ from uuid import UUID
|
|
|
12
12
|
import warnings
|
|
13
13
|
|
|
14
14
|
# 3rd party library imports
|
|
15
|
+
from PIL import Image
|
|
15
16
|
import numpy as np
|
|
16
17
|
import skimage
|
|
17
18
|
|
|
@@ -193,6 +194,17 @@ class TestSuite(fixtures.TestCommon):
|
|
|
193
194
|
|
|
194
195
|
cls.exif = path
|
|
195
196
|
|
|
197
|
+
def _imread(self, path, mode=None):
|
|
198
|
+
|
|
199
|
+
with Image.open(path) as img:
|
|
200
|
+
|
|
201
|
+
if mode is not None:
|
|
202
|
+
img = img.convert(mode)
|
|
203
|
+
|
|
204
|
+
imagedata = np.array(img)
|
|
205
|
+
|
|
206
|
+
return imagedata
|
|
207
|
+
|
|
196
208
|
def test_smoke(self):
|
|
197
209
|
"""
|
|
198
210
|
SCENARIO: Convert TIFF file to JP2
|
|
@@ -355,7 +367,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
355
367
|
j.layer = layer
|
|
356
368
|
d[layer] = j[:]
|
|
357
369
|
|
|
358
|
-
truth =
|
|
370
|
+
truth = self._imread(self.moon)
|
|
359
371
|
|
|
360
372
|
with warnings.catch_warnings():
|
|
361
373
|
# MSE is zero for that first image, resulting in a divide-by-zero
|
|
@@ -394,7 +406,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
394
406
|
j.layer = layer
|
|
395
407
|
d[layer] = j[:]
|
|
396
408
|
|
|
397
|
-
truth =
|
|
409
|
+
truth = self._imread(self.moon)
|
|
398
410
|
|
|
399
411
|
with warnings.catch_warnings():
|
|
400
412
|
# MSE is zero for that first image, resulting in a divide-by-zero
|
|
@@ -632,9 +644,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
632
644
|
|
|
633
645
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
634
646
|
actual = jp2[:]
|
|
635
|
-
expected =
|
|
636
|
-
self.moon3_partial_last_strip, plugin='pil'
|
|
637
|
-
)
|
|
647
|
+
expected = self._imread(self.moon3_partial_last_strip)
|
|
638
648
|
np.testing.assert_array_equal(actual, expected)
|
|
639
649
|
|
|
640
650
|
c = jp2.get_codestream()
|
|
@@ -660,9 +670,8 @@ class TestSuite(fixtures.TestCommon):
|
|
|
660
670
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
661
671
|
actual = jp2[:]
|
|
662
672
|
|
|
663
|
-
expected =
|
|
664
|
-
|
|
665
|
-
)
|
|
673
|
+
expected = self._imread(self.moon3_partial_last_strip)
|
|
674
|
+
|
|
666
675
|
np.testing.assert_array_equal(actual, expected)
|
|
667
676
|
|
|
668
677
|
c = jp2.get_codestream()
|
|
@@ -813,7 +822,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
813
822
|
|
|
814
823
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
815
824
|
actual = jp2[:]
|
|
816
|
-
expected =
|
|
825
|
+
expected = self._imread(self.ycbcr_stripped)
|
|
817
826
|
np.testing.assert_array_equal(actual, expected)
|
|
818
827
|
|
|
819
828
|
c = jp2.get_codestream()
|
|
@@ -836,7 +845,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
836
845
|
|
|
837
846
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
838
847
|
actual = jp2[:]
|
|
839
|
-
expected =
|
|
848
|
+
expected = self._imread(self.ycbcr_bg)
|
|
840
849
|
np.testing.assert_array_equal(actual, expected)
|
|
841
850
|
|
|
842
851
|
c = jp2.get_codestream()
|
|
@@ -883,9 +892,8 @@ class TestSuite(fixtures.TestCommon):
|
|
|
883
892
|
|
|
884
893
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
885
894
|
actual = jp2[:]
|
|
886
|
-
expected =
|
|
887
|
-
|
|
888
|
-
)
|
|
895
|
+
expected = self._imread(self.astronaut_ycbcr_jpeg_tiled)
|
|
896
|
+
|
|
889
897
|
np.testing.assert_array_equal(actual, expected)
|
|
890
898
|
|
|
891
899
|
c = jp2.get_codestream()
|
|
@@ -909,9 +917,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
909
917
|
|
|
910
918
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
911
919
|
actual = jp2[:]
|
|
912
|
-
expected =
|
|
913
|
-
self.astronaut_ycbcr_jpeg_tiled, plugin='pil'
|
|
914
|
-
)
|
|
920
|
+
expected = self._imread(self.astronaut_ycbcr_jpeg_tiled)
|
|
915
921
|
np.testing.assert_array_equal(actual, expected)
|
|
916
922
|
|
|
917
923
|
c = jp2.get_codestream()
|
|
@@ -934,9 +940,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
934
940
|
|
|
935
941
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
936
942
|
actual = jp2[:]
|
|
937
|
-
expected =
|
|
938
|
-
self.astronaut_ycbcr_jpeg_tiled, plugin='pil'
|
|
939
|
-
)
|
|
943
|
+
expected = self._imread(self.astronaut_ycbcr_jpeg_tiled)
|
|
940
944
|
np.testing.assert_array_equal(actual, expected)
|
|
941
945
|
|
|
942
946
|
c = jp2.get_codestream()
|
|
@@ -1836,9 +1840,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
1836
1840
|
# Read in the image (as expected on little-endian), flip it
|
|
1837
1841
|
# around, prepend an alpha layer, then get rid of the last layer
|
|
1838
1842
|
# to simulate what would have happened on big-endian.
|
|
1839
|
-
expected =
|
|
1840
|
-
self.astronaut_ycbcr_jpeg_tiled, plugin='pil'
|
|
1841
|
-
)
|
|
1843
|
+
expected = self._imread(self.astronaut_ycbcr_jpeg_tiled)
|
|
1842
1844
|
h, w, _ = expected.shape
|
|
1843
1845
|
expected = np.flip(expected, axis=2)
|
|
1844
1846
|
A = np.ones((h, w, 1), dtype=np.uint8) * 255
|
|
@@ -1874,9 +1876,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
1874
1876
|
# Read in the image (as expected on little-endian), flip it
|
|
1875
1877
|
# around, prepend an alpha layer, then get rid of the last layer
|
|
1876
1878
|
# to simulate what would have happened on big-endian.
|
|
1877
|
-
expected =
|
|
1878
|
-
self.astronaut_ycbcr_jpeg_tiled, plugin='pil'
|
|
1879
|
-
)
|
|
1879
|
+
expected = self._imread(self.astronaut_ycbcr_jpeg_tiled)
|
|
1880
1880
|
h, w, _ = expected.shape
|
|
1881
1881
|
expected = np.flip(expected, axis=2)
|
|
1882
1882
|
A = np.ones((h, w, 1), dtype=np.uint8) * 255
|
|
@@ -1912,7 +1912,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
1912
1912
|
# Read in the image (as expected on little-endian), flip it
|
|
1913
1913
|
# around, prepend an alpha layer, then get rid of the last layer
|
|
1914
1914
|
# to simulate what would have happened on big-endian.
|
|
1915
|
-
expected =
|
|
1915
|
+
expected = self._imread(self.ycbcr_stripped)
|
|
1916
1916
|
h, w, _ = expected.shape
|
|
1917
1917
|
expected = np.flip(expected, axis=2)
|
|
1918
1918
|
A = np.ones((h, w, 1), dtype=np.uint8) * 255
|
|
@@ -1935,7 +1935,7 @@ class TestSuite(fixtures.TestCommon):
|
|
|
1935
1935
|
|
|
1936
1936
|
jp2 = Jp2k(self.temp_jp2_filename)
|
|
1937
1937
|
actual = jp2[:]
|
|
1938
|
-
expected =
|
|
1938
|
+
expected = self._imread(self.moon63)
|
|
1939
1939
|
np.testing.assert_array_equal(actual, expected)
|
|
1940
1940
|
|
|
1941
1941
|
c = jp2.get_codestream()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|