|
|
@ -57,7 +57,7 @@ def safe_cut(tif_array, parameters): |
|
|
|
with cut_path.open("wb") as outhandle: |
|
|
|
with cut_path.open("wb") as outhandle: |
|
|
|
cut_array = tif_array.data[top:bottom, left:right] |
|
|
|
cut_array = tif_array.data[top:bottom, left:right] |
|
|
|
cut_img = Image.fromarray(cut_array) |
|
|
|
cut_img = Image.fromarray(cut_array) |
|
|
|
cut_img.save(outhandle) |
|
|
|
cut_img.save(outhandle, compression='tiff_lzw') |
|
|
|
del cut_img |
|
|
|
del cut_img |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|