Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1882b72

Browse files
Update ImageCompressing.py
1 parent 40094b3 commit 1882b72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Image Processing/ImageCompressing.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Python Imaging Library PIL
44
from PIL import Image as ig
55

6-
#open the image from directory , in my case its in same directory
7-
img=ig.open("Home/Pictures/default.jpg") # Here we have to provide complete address of image from file which contains your py file
8-
6+
# Here we have to provide complete address of image from file which contains your py file
7+
filePath=input("Enter the path of your Image : ")
8+
img=ig.open(filePath)
99
#Apply the compressing
1010
img.save("Compressed.jpg",optimize=True,quality=30)
1111

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /