Skip to content

Commit

Permalink
np.asarraynp.array (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
leblancfg authored Aug 3, 2022
1 parent a388919 commit b35257b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autocrop/autocrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def check_positive_scalar(num):
def open_file(input_filename):
"""Given a filename, returns a numpy array"""
with Image.open(input_filename) as img_orig:
return np.asarray(img_orig)
return np.array(img_orig)


class Cropper:
Expand Down Expand Up @@ -207,7 +207,7 @@ def crop(self, path_or_array):
# Resize
if self.resize:
with Image.fromarray(image) as img:
image = np.asarray(img.resize((self.width, self.height)))
image = np.array(img.resize((self.width, self.height)))

# Underexposition fix
if self.gamma:
Expand Down

0 comments on commit b35257b

Please sign in to comment.