pep8 work, #67
This commit is contained in:
parent
36ea74a27e
commit
32dcb12823
1 changed files with 11 additions and 11 deletions
|
|
@ -635,7 +635,6 @@ class Jp2k(Jp2kBox):
|
||||||
src = fp.read()
|
src = fp.read()
|
||||||
cio = opj._cio_open(dinfo, src)
|
cio = opj._cio_open(dinfo, src)
|
||||||
|
|
||||||
|
|
||||||
image = opj._decode(dinfo, cio)
|
image = opj._decode(dinfo, cio)
|
||||||
|
|
||||||
stack.callback(opj._image_destroy, image)
|
stack.callback(opj._image_destroy, image)
|
||||||
|
|
@ -680,7 +679,8 @@ class Jp2k(Jp2kBox):
|
||||||
addr = ctypes.addressof(component.data.contents)
|
addr = ctypes.addressof(component.data.contents)
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("ignore")
|
warnings.simplefilter("ignore")
|
||||||
x = np.ctypeslib.as_array( (ctypes.c_int32 * nrows * ncols).from_address(addr))
|
nelts = nrows * ncols
|
||||||
|
x = np.ctypeslib.as_array((ctypes.c_int32 * nelts).from_address(addr))
|
||||||
data[:, :, k] = np.reshape(x.astype(dtype), (nrows, ncols))
|
data[:, :, k] = np.reshape(x.astype(dtype), (nrows, ncols))
|
||||||
|
|
||||||
if data.shape[2] == 1:
|
if data.shape[2] == 1:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue