[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:
parent
e3081dbb7e
commit
58114e4954
|
@ -28,6 +28,10 @@ from PIL import Image
|
||||||
from PIL import ImageEnhance
|
from PIL import ImageEnhance
|
||||||
from random import randint
|
from random import randint
|
||||||
|
|
||||||
|
# Preload PIL with the minimal subset of image formats we need
|
||||||
|
Image.preinit()
|
||||||
|
Image._initialized = 2
|
||||||
|
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# Image resizing
|
# Image resizing
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue