From 0eec96b787d65a28f22c72e7efb6ea454a84df54 Mon Sep 17 00:00:00 2001 From: Emil Mirzayev <25964049+emilmirzayev@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:30:52 +0100 Subject: [PATCH] Update remove_bg.py --- remove_bg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remove_bg.py b/remove_bg.py index 38b22b7..6683b9b 100644 --- a/remove_bg.py +++ b/remove_bg.py @@ -45,7 +45,7 @@ def process_directory(directory): with tqdm(total=total_files, desc="Processing images", unit="image") as pbar: for subdir, dirs, files in os.walk(directory): for file in files: - if file.lower().endswith(('.jpg', '.jpeg')): + if file.lower().endswith(('.jpg', '.jpeg', 'png')): input_path = os.path.join(subdir, file) output_filename = os.path.splitext(file)[0] + '.png' output_path = os.path.join(subdir, output_filename)