use thumbnails instead of full size pics
|
Before Width: | Height: | Size: 6.9 MiB After Width: | Height: | Size: 6.9 MiB |
|
Before Width: | Height: | Size: 7.2 MiB After Width: | Height: | Size: 7.2 MiB |
|
Before Width: | Height: | Size: 7.8 MiB After Width: | Height: | Size: 7.8 MiB |
|
Before Width: | Height: | Size: 6.7 MiB After Width: | Height: | Size: 6.7 MiB |
|
Before Width: | Height: | Size: 5.3 MiB After Width: | Height: | Size: 5.3 MiB |
|
Before Width: | Height: | Size: 7.5 MiB After Width: | Height: | Size: 7.5 MiB |
|
Before Width: | Height: | Size: 5.8 MiB After Width: | Height: | Size: 5.8 MiB |
|
Before Width: | Height: | Size: 7.0 MiB After Width: | Height: | Size: 7.0 MiB |
|
Before Width: | Height: | Size: 7.2 MiB After Width: | Height: | Size: 7.2 MiB |
|
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 4.7 MiB |
|
Before Width: | Height: | Size: 5.4 MiB After Width: | Height: | Size: 5.4 MiB |
|
Before Width: | Height: | Size: 7.2 MiB After Width: | Height: | Size: 7.2 MiB |
15
thumbnailer.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from PIL import Image
|
||||
import glob, os
|
||||
|
||||
size = 128, 128
|
||||
|
||||
work_path = os.getcwd()
|
||||
|
||||
for infile in glob.glob(work_path + "/fullsize/*.png"):
|
||||
file, ext = os.path.splitext(infile)
|
||||
with Image.open(infile) as im:
|
||||
im.thumbnail(size)
|
||||
filename = file.split('/')[-1:][0]
|
||||
im.save(work_path + "/thumbnails/" + filename + ".jpg", "JPEG")
|
||||
BIN
thumbnails/image1.jpg
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
thumbnails/image10.jpg
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
thumbnails/image11.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
thumbnails/image12.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
thumbnails/image2.jpg
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
thumbnails/image3.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
thumbnails/image4.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
thumbnails/image5.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
thumbnails/image6.jpg
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
thumbnails/image7.jpg
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
thumbnails/image8.jpg
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
thumbnails/image9.jpg
Normal file
|
After Width: | Height: | Size: 3.8 KiB |