Skip to content

Commit 7df1fd7

Browse files
hugovktakluyver
authored andcommitted
Skip whitelisted images, and those already less than 160x80px
1 parent 957b51a commit 7df1fd7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/thumbnail-images.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99

1010
max_size = 160, 80
1111

12+
# Exclude these images from thumbnailing
13+
excludes = ["assets/signac.png"]
14+
1215
for infile in glob.glob("assets/*.png"):
16+
if infile in excludes:
17+
continue
1318
im = Image.open(infile)
19+
if im.width <= max_size[0] and im.height <= max_size[1]:
20+
continue
1421
im.thumbnail(max_size)
1522
im.save(infile)

0 commit comments

Comments
 (0)