Created
May 13, 2023 18:39
-
-
Save pk5ls20/b521e8e49feb95689eabb4020dadc9bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Include Bilibili alphabet emojis, pls open it as a tar file ->