diff --git a/Python Projects/Cursed photo creater/main.py b/Python Projects/Cursed photo creater/main.py new file mode 100644 index 00000000..5e5fedb9 --- /dev/null +++ b/Python Projects/Cursed photo creater/main.py @@ -0,0 +1,31 @@ +# put all the photo in "phototouse" folder run the script . Done your photo will be in "photoout" folder + +from PIL import Image, ImageEnhance, ImageOps +import os + +path = r"phototouse" +out = r"photoout" + +factor = 2 +brightness = 1.5 + +def edit_photo(filepath): + editedimg = Image.open(filepath) + editedimg = editedimg.convert("L") + editedimg = ImageEnhance.Contrast(editedimg).enhance(factor) + editedimg = ImageEnhance.Brightness(editedimg).enhance(brightness) + editedimg = ImageOps.expand(editedimg, border=20, fill=10) + return editedimg + +for filename in os.listdir(path): + #!Get photo path + filepath = (f"{path}\{filename}") + print(filepath) + + #!edit the photo + editPic = edit_photo(filepath) + + #!Save the photo + editPic.save(f"{out}\{os.path.splitext(filename)[0]}_edited.jpg") + +print("DONE ✅") diff --git a/Python Projects/Cursed photo creater/photoout/1a15ba500a50f20a5bce3627cef6c1e5_edited.jpg b/Python Projects/Cursed photo creater/photoout/1a15ba500a50f20a5bce3627cef6c1e5_edited.jpg new file mode 100644 index 00000000..5f9923dc Binary files /dev/null and b/Python Projects/Cursed photo creater/photoout/1a15ba500a50f20a5bce3627cef6c1e5_edited.jpg differ diff --git a/Python Projects/Cursed photo creater/phototouse/1a15ba500a50f20a5bce3627cef6c1e5.jpg b/Python Projects/Cursed photo creater/phototouse/1a15ba500a50f20a5bce3627cef6c1e5.jpg new file mode 100644 index 00000000..ac3821dc Binary files /dev/null and b/Python Projects/Cursed photo creater/phototouse/1a15ba500a50f20a5bce3627cef6c1e5.jpg differ