Skip to content

Commit

Permalink
馃寜 Update README with fence
Browse files Browse the repository at this point in the history
  • Loading branch information
leblancfg committed Apr 27, 2021
1 parent ab05acb commit 6c9caad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -30,9 +30,10 @@ cropper = Cropper()
# Get a Numpy array of the cropped image
cropped_array = cropper.crop('portrait.png')

# Save the cropped image with PIL
cropped_image = Image.fromarray(cropped_array)
cropped_image.save('cropped.png')
# Save the cropped image with PIL if a face was detected:
if cropped_array:
cropped_image = Image.fromarray(cropped_array)
cropped_image.save('cropped.png')
~~~

Further examples and use cases are found in the [accompanying Jupyter Notebook](https://github.com/leblancfg/autocrop/blob/master/tests/visual_tests.ipynb).
Expand Down

0 comments on commit 6c9caad

Please sign in to comment.