diff options
Diffstat (limited to 'addons/web/models/base_document_layout.py')
| -rw-r--r-- | addons/web/models/base_document_layout.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web/models/base_document_layout.py b/addons/web/models/base_document_layout.py index 8d26f61e2f7..6dd2883f3b9 100644 --- a/addons/web/models/base_document_layout.py +++ b/addons/web/models/base_document_layout.py @@ -179,9 +179,8 @@ class BaseDocumentLayout(models.TransientModel): w = int(50 * base_w / base_h) h = 50 - # Converts to RGBA if no alpha detected - image_converted = image.convert( - 'RGBA') if 'A' not in image.getbands() else image + # Converts to RGBA (if already RGBA, this is a noop) + image_converted = image.convert('RGBA') image_resized = image_converted.resize((w, h)) colors = [] |
