diff --git a/getstickers.py b/getstickers.py index e1b0df8..c208c4f 100644 --- a/getstickers.py +++ b/getstickers.py @@ -146,11 +146,7 @@ def zipdir(path, ziph): def convert_png(path): im = Image.open(path) - im.load() - alpha = im.split()[-1] - im = im.convert('RGB').convert('P', palette=Image.ADAPTIVE, colors=255) - mask = Image.eval(alpha, lambda a: 255 if a <=128 else 0) - im.paste(255, mask) + im = im.convert('RGBA') new_path = path.replace(".webp", ".png") - im.save(new_path, transparency=255) + im.save(new_path, 'PNG') return new_path diff --git a/list.json b/list.json index a6a317b..e80308b 100644 --- a/list.json +++ b/list.json @@ -532,7 +532,7 @@ }, { "name": "getstickers", - "version": "1.02", + "version": "1.03", "section": "chat", "maintainer": "xtaodada", "size": "5.4 kb",