Skip to content

Instantly share code, notes, and snippets.

@pk5ls20
Created May 13, 2023 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pk5ls20/b521e8e49feb95689eabb4020dadc9bd to your computer and use it in GitHub Desktop.
Save pk5ls20/b521e8e49feb95689eabb4020dadc9bd to your computer and use it in GitHub Desktop.
from typing import Optional
from PIL import Image
def gen(alpList: list, size: int) -> None:
alpListLen = len(alpList)
new_image = Image.new('RGBA', (size * alpListLen, size), (0, 0, 0, 0))
for i in range(alpListLen):
with open(f'joke/{alpList[i]}.png', 'rb') as f:
img = Image.open(f).convert("RGBA")
new_image.paste(img, (size * i, 0), mask=img)
new_image.save('joke.png')
if __name__ == "__main__":
gen([itm for itm in "GNSSW"], 162)
pass
@pk5ls20
Copy link
Author

pk5ls20 commented May 13, 2023

Include Bilibili alphabet emojis, pls open it as a tar file -> joke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment