From 03f31859f100603acede44010afe090ba5bd61ca Mon Sep 17 00:00:00 2001 From: Emil Mirzayev <25964049+emilmirzayev@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:29:06 +0100 Subject: [PATCH] Update remove_bg.py only remove non png images --- remove_bg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remove_bg.py b/remove_bg.py index 6683b9b..38b22b7 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', 'png')): + if file.lower().endswith(('.jpg', '.jpeg')): input_path = os.path.join(subdir, file) output_filename = os.path.splitext(file)[0] + '.png' output_path = os.path.join(subdir, output_filename)