Ok, thanks a lot for this information, but I have the same problem I can't save the file as image in my computer .
na = numpy.array(pixels, dtype=numpy.uint8).reshape((int(h),int(w),3))
ValueError: cannot reshape array of size 1121989 into shape (117,111,3)