Skip to content

Commit db09d11

Browse files
committed
Semi-Utility Added
1 parent c754094 commit db09d11

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Compress Image/code.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import PIL
2+
from PIL import Image
3+
4+
print("enter image name :")
5+
image_name = str(input()) # image name with relative path
6+
7+
img = Image.open(image_name)
8+
mywidth = img.size[0]
9+
myheight = img.size[1]
10+
img = img.resize((mywidth, myheight), PIL.Image.ANTIALIAS)
11+
img.save("Resized_Image.jpeg")

Compress Image/demo.jpg

1.14 MB
Loading

0 commit comments

Comments
 (0)