Commit efda63b6 authored by Pavani Bandara's avatar Pavani Bandara

Upload New File

parent 70c5ad02
Pipeline #3704 canceled with stages
from PIL import Image
import os
def resize():
image_name =os.listdir('outputs')[0]
img_path = "outputs/"+image_name
image = Image.open(f"{img_path}")
outputPath="resized"
resized_image = image.resize((500, 500))
if not os.path.exists(outputPath):
os.makedirs(outputPath)
resized_image.save(f"{outputPath}/{image_name}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment