Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions image resizer.py
Original file line number Diff line number Diff line change
@@ -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)