diff --git a/main.py b/main.py index b9706ef..0d750b1 100644 --- a/main.py +++ b/main.py @@ -36,7 +36,8 @@ def convert_img(path = os.path.abspath('.')): return 1 elif file.endswith('.jpg') or file.endswith('.jpeg'): img = Image.open(path + '\\' + file) - img.save(path + '\\' + file.split('.')[0] + ".png", "PNG") + dot_index = file.rfind('.') + img.save(path + '\\' + file[dot_index:] + ".png", "PNG") def gen_filelist(path = os.path.abspath('.')):