Permalink
Browse files

[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.
  • Loading branch information...
odony committed May 5, 2017
1 parent e3081db commit 58114e49545c4e3e8ebadec46fb4463d13e9ccbf
Showing with 4 additions and 0 deletions.
  1. +4 −0 openerp/tools/image.py
@@ -28,6 +28,10 @@
from PIL import ImageEnhance
from random import randint
# Preload PIL with the minimal subset of image formats we need
Image.preinit()
Image._initialized = 2
# ----------------------------------------
# Image resizing
# ----------------------------------------

0 comments on commit 58114e4

Please sign in to comment.