Convert From Byte Array To Image
I have data of length 498, and I want to convert it to an image. The data (byte array) is: ba = [4, 41, 80, 3, 41, 130, 134, 225, 196, 184, 63, 255, 137, 50, 182, 95, 3, 86, 250, 7
Solution 1:
You can try fromarray
function
import numpy as np
image = Image.fromarray(np.array(ba).reshape(498,1))
Post a Comment for "Convert From Byte Array To Image"