From 264319f488bdc1431f0ff0d472e0b1b3c15a4776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Leblanc?= Date: Sat, 31 Oct 2020 23:14:03 -0400 Subject: [PATCH] Copy the files to their destination instead of removing the originals. (#113) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * copy the files to their destination instead of removing the originals * bump version Co-authored-by: François Leblanc --- autocrop/__version__.py | 2 +- autocrop/cli.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autocrop/__version__.py b/autocrop/__version__.py index 0c54d77..f2bd583 100644 --- a/autocrop/__version__.py +++ b/autocrop/__version__.py @@ -1,4 +1,4 @@ __title__ = "autocrop" __description__ = "Automatically crops faces from batches of pictures" __author__ = "François Leblanc" -__version__ = "1.0.2" +__version__ = "1.1.0" diff --git a/autocrop/cli.py b/autocrop/cli.py index 7e250b9..aa441d1 100644 --- a/autocrop/cli.py +++ b/autocrop/cli.py @@ -22,7 +22,7 @@ def output(input_filename, output_filename, image): cropped image data.""" if input_filename != output_filename: # Move the file to the output directory - shutil.move(input_filename, output_filename) + shutil.copy(input_filename, output_filename) # Encode the image as an in-memory PNG img_new = Image.fromarray(image) # Write the new image (converting the format to match the output @@ -34,7 +34,7 @@ def reject(input_filename, reject_filename): """Move the input file to the reject location.""" if input_filename != reject_filename: # Move the file to the reject directory - shutil.move(input_filename, reject_filename) + shutil.copy(input_filename, reject_filename) def main(