|
|
@ -12,7 +12,7 @@ from .commons import ( |
|
|
|
|
|
|
|
|
|
|
|
def open_as_array(tif_image): |
|
|
|
def open_as_array(tif_image): |
|
|
|
with tif_image.path.open("rb") as filehandle: |
|
|
|
with tif_image.path.open("rb") as filehandle: |
|
|
|
image = Image.open(filehandle) |
|
|
|
image = Image.open(filehandle).convert(mode="I") |
|
|
|
image_array = numpy.array(image, dtype=numpy.int32) |
|
|
|
image_array = numpy.array(image, dtype=numpy.int32) |
|
|
|
return TifArray( |
|
|
|
return TifArray( |
|
|
|
path=tif_image.path, frame=tif_image.frame, data=image_array |
|
|
|
path=tif_image.path, frame=tif_image.frame, data=image_array |
|
|
|