allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/7] allura git commit: [#8143] better transparency check, so thumbnails preserve transparency
Date Tue, 31 Jan 2017 20:27:03 GMT
Repository: allura
Updated Branches:
  refs/heads/db/8143 [created] e3a19fb06


[#8143] better transparency check, so thumbnails preserve transparency


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fe262530
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fe262530
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fe262530

Branch: refs/heads/db/8143
Commit: fe26253008a497541c45109032db0d96eb340fb4
Parents: d3cd129
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Jan 30 13:49:10 2017 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Tue Jan 31 11:36:02 2017 -0500

----------------------------------------------------------------------
 Allura/allura/model/filesystem.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fe262530/Allura/allura/model/filesystem.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/filesystem.py b/Allura/allura/model/filesystem.py
index 47c5eeb..00a306e 100644
--- a/Allura/allura/model/filesystem.py
+++ b/Allura/allura/model/filesystem.py
@@ -132,7 +132,7 @@ class File(MappedClass):
         width = image.size[1]
         if square and height != width:
             sz = max(width, height)
-            if 'transparency' in image.info:
+            if image.mode == 'RGBA':
                 new_image = PIL.Image.new('RGBA', (sz, sz))
             else:
                 new_image = PIL.Image.new('RGB', (sz, sz), 'white')


Mime
View raw message