progress
This commit is contained in:
parent
9691311633
commit
82a9edae62
2 changed files with 3 additions and 3 deletions
|
|
@ -966,7 +966,7 @@ class Jp2k(Jp2kBox):
|
||||||
numrows if rows.stop is None else rows.stop,
|
numrows if rows.stop is None else rows.stop,
|
||||||
numcols if cols.stop is None else cols.stop
|
numcols if cols.stop is None else cols.stop
|
||||||
)
|
)
|
||||||
data = self.read(area=area, rlevel=rlevel)
|
data = self._read(area=area, rlevel=rlevel)
|
||||||
if len(pargs) == 2:
|
if len(pargs) == 2:
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
@ -974,7 +974,7 @@ class Jp2k(Jp2kBox):
|
||||||
return data[:, :, bands]
|
return data[:, :, bands]
|
||||||
|
|
||||||
|
|
||||||
def _read(self):
|
def _read(self, **kwargs):
|
||||||
"""Read a JPEG 2000 image.
|
"""Read a JPEG 2000 image.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
|
|
||||||
|
|
@ -1379,7 +1379,7 @@ class TestJp2kOpjDataRoot(unittest.TestCase):
|
||||||
|
|
||||||
# Should be able to manually reconstruct the RGB image from the palette
|
# Should be able to manually reconstruct the RGB image from the palette
|
||||||
# and indices.
|
# and indices.
|
||||||
palette = j.box[2].box[1].palette
|
palette = jp2.box[2].box[1].palette
|
||||||
rgb_from_idx = np.zeros(rgb.shape, dtype=np.uint8)
|
rgb_from_idx = np.zeros(rgb.shape, dtype=np.uint8)
|
||||||
for r in np.arange(rgb.shape[0]):
|
for r in np.arange(rgb.shape[0]):
|
||||||
for c in np.arange(rgb.shape[1]):
|
for c in np.arange(rgb.shape[1]):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue