Last active
July 12, 2022 11:53
-
-
Save CLozy/38f3084532a3dcff3a272b502c39ca4d to your computer and use it in GitHub Desktop.
resizing image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create thumbnail of an image | |
image = Image.open('/content/gdrive/MyDrive/ComputerVisionEngineer/images/deadstar.jpg') | |
#report size | |
print(image.size) | |
#create thumbnail and preserve aspect ratio | |
image.thumbnail((400,400)) | |
#print size | |
print(image.size) | |
image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment