You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
415 B

#!/usr/bin/env python3
import string
import numpy as np
from PIL import Image
import urllib.request
from io import BytesIO
def cat(w, h):
url = f'https://cataas.com/cat/says/DOCHKATZE?size=100&width={w}?height={h}?text=cat'
resp = urllib.request.urlopen(url)
im_data = resp.read()
im = Image.open(BytesIO(im_data))
return im
if __name__ == "__main__":
cat = cat(1920,1080)
cat.show()