I have this image with size 128 x 128 pixels and RGBA stored as byte values in my memory. But
from PIL import Image
image_data = ... # byte values of the image
image = Image.frombytes('RGBA', (128,128), image_data)
image.show()
throws the exception
ValueError: not enough image data
Why? What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…