mirror of
https://github.com/googlefonts/noto-emoji.git
synced 2025-06-07 23:37:58 +00:00
Fix emoji thumbnail generation to prevent grayscale pngs.
Same problem that we ran into previously with the emoji font-- imagemagick takes RGBA that contain only grayscale and converts to grayscale with alpha, but although it can display these ok, chrome can't. So force it to generate RGBA output.
This commit is contained in:
parent
ca22132c45
commit
518294f018
1 changed files with 2 additions and 2 deletions
|
@ -38,10 +38,10 @@ logger = logging.getLogger('emoji_thumbnails')
|
||||||
|
|
||||||
def create_thumbnail(src_path, dst_path):
|
def create_thumbnail(src_path, dst_path):
|
||||||
# uses imagemagik
|
# uses imagemagik
|
||||||
# we need imagex exactly 72x72 in size, with transparent background
|
# we need images exactly 72x72 in size, with transparent background
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'convert', '-thumbnail', '72x72', '-gravity', 'center', '-background',
|
'convert', '-thumbnail', '72x72', '-gravity', 'center', '-background',
|
||||||
'none', '-extent', '72x72', src_path, dst_path])
|
'none', '-extent', '72x72', src_path, 'PNG32:' + dst_path])
|
||||||
|
|
||||||
|
|
||||||
def get_inv_aliases():
|
def get_inv_aliases():
|
||||||
|
|
Loading…
Add table
Reference in a new issue