Convert icons to RGBA in the icon merger (#44890)

* Mark dmi.merge and pre-commit.hook executable

* Convert icons to RGBA when merging
This commit is contained in:
Tad Hardesty
2019-07-03 19:38:09 +12:00
committed by oranges
parent e5ccafd0b0
commit 8a365096bd
3 changed files with 2 additions and 0 deletions
Regular → Executable
View File
Regular → Executable
View File
+2
View File
@@ -45,6 +45,8 @@ class Dmi:
@classmethod
def from_file(cls, fname):
image = Image.open(fname)
if image.mode != 'RGBA':
image = image.convert('RGBA')
# no metadata = regular image file
if 'Description' not in image.info: