def resize_and_copy(src_path, dst_path): # Lazy copy if cfg.lazy_copy and exists(dst_path): return # Resize and Save elif cfg.photo_resize: rim = image_resize(Image.open(src_path), cfg.photo_resize_horizontal_max_size, cfg.photo_resize_vertical_max_size) rim.save(dst_path) # Just copy else: copy2(src_path, dst_path)