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
375 B

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