We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c754094 commit db09d11Copy full SHA for db09d11
Compress Image/code.py
@@ -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
0 commit comments