diff --git a/image resizer.py b/image resizer.py index f19fe79..4b5b6ce 100644 --- a/image resizer.py +++ b/image resizer.py @@ -1,14 +1,24 @@ +from ctypes import resize from PIL import Image -def resize_image(sizel, size2) : - image = Image.open('codewithtomi-logo.jpg') +def resize_image(size1, size2): - print(f"Current size : {image.size}" ) + input_open = input('Name for picture you wanna change the size: ') #search for name with input from user + image = Image.open(input_open) - resized_image = image.resize(( sizel, size2)) - - resized_image.save(' codewithtomi-Pogo-' + str(size1) + '.jpeg') + print(f"Current size : {image.size}") + + resize_image = image.resize((size1, size2)) + + input_save = input("Fill name for image you saved: ") # input user for saved picture + input_fototype = input("Write type of new picture: ") # input fomrat for picture + + resize_image.save(input_save+str(size1)+'.'+input_fototype) + + print(f"Changed Size become: {resize_image.size}") + + +size1 = int(input('Input width of new picture: ')) +size2 = int(input('Input length of new picture: ')) -size1 = int(input( ' Enter Width: ')) -size2 = int(input('Enter Length: ')) resize_image(size1, size2)