120x160 = 19200 pixels
since you are in gray scale, you likely have only 1 byte per pixel ➜ 19200 bytes
(try printing also fb->len to be sure)
So you should not say 3 when you reshape the array. 1 would likely make more sense.
120x160 = 19200 pixels
since you are in gray scale, you likely have only 1 byte per pixel ➜ 19200 bytes
(try printing also fb->len to be sure)
So you should not say 3 when you reshape the array. 1 would likely make more sense.