Issue in converting the Pixels values to image

yes I printed fb->len and this equal to 19200

I used
na = np.array(pixels, dtype=np.uint8).reshape((int(h),int(w),1))

and I have this output

Traceback (most recent call last):

File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 2835, in fromarray

mode, rawmode = _fromarray_typemap[typekey]

KeyError: ((1, 1, 1), '|u1')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "c:\Users\hp\Desktop\workpy\A.py", line 44, in

Image.fromarray(na).save('C://Users//hp//Desktop//result.jpg')

File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 2837, in fromarray

raise TypeError("Cannot handle this data type: %s, %s" % typekey) from e

TypeError: Cannot handle this data type: (1, 1, 1), |u1