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 f05aada commit 20641b8Copy full SHA for 20641b8
IMAGES & PHOTO SCRIPTS/Image-Inverter/inverter.py
@@ -18,8 +18,11 @@ def main():
18
continue
19
20
file_name = os.path.splitext(file)
21
- with Image.open(file) as image:
22
- ImageOps.invert(image).save(filename + "_inverted", "JPEG")
+ try:
+ with Image.open(file) as image:
23
+ ImageOps.invert(image).save(filename + "_inverted", "JPEG")
24
+ except:
25
+ print("Couldn't convert " + filename + "successfully!")
26
i = i + 1
27
28
if __name__ == '__main__':
0 commit comments