[FIX] tools: always preload PIL with basic formats

Ensures that only the desired list of images formats are made available
via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
This commit is contained in:
Olivier Dony
2017-05-05 17:02:45 +02:00
parent d5cdb77717
commit 8fbbe04a50
+4
View File
@@ -10,6 +10,10 @@ from PIL import Image
from PIL import ImageEnhance
from random import randrange
# Preload PIL with the minimal subset of image formats we need
Image.preinit()
Image._initialized = 2
# ----------------------------------------
# Image resizing
# ----------------------------------------