This commit is contained in:
louiscklaw
2025-02-01 01:19:51 +08:00
commit 3b0b154910
32597 changed files with 1171319 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import os
import shutil
def merge_images(input_folder, output_folder):
if not os.path.exists(output_folder):
os.mkdir(output_folder)
count = 0
for root, _, filenames in os.walk(input_folder):
for fn in filenames:
if fn.endswith('.jpg'):
count += 1
shutil.copy(os.path.join(root, fn), os.path.join(output_folder, 'c_{:010d}.jpg'.format(count)))
if __name__ == '__main__':
merge_images('p', 'output')