Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Wednesday, October 2, 2019

Image bytes to np array in Python

For reference:

# data - image bytes

im = Image.open(BytesIO(data))
I =  numpy.asarray(im)
print("I type:", type(I), "I shape:", I.shape)

>> I type: <class 'numpy.ndarray'> I shape: (512, 512, 3)

Learning System Design with Cute Animation

 This one is superb -  https://designed-to-scale.vercel.app/