Skip to content

Commit 6826805

Browse files
committed
Use instead of when reading in file from PIL
1 parent 6ac79a7 commit 6826805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autocrop/autocrop.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def check_positive_scalar(num):
8383
def open_file(input_filename):
8484
"""Given a filename, returns a numpy array"""
8585
with Image.open(input_filename) as img_orig:
86-
return np.asarray(img_orig)
86+
return np.array(img_orig)
8787

8888

8989
class Cropper:
@@ -207,7 +207,7 @@ def crop(self, path_or_array):
207207
# Resize
208208
if self.resize:
209209
with Image.fromarray(image) as img:
210-
image = np.asarray(img.resize((self.width, self.height)))
210+
image = np.array(img.resize((self.width, self.height)))
211211

212212
# Underexposition fix
213213
if self.gamma:

0 commit comments

Comments
 (0)