Issue in converting the Pixels values to image

I updated my code but the problem is still

After I used this code

fb = esp_camera_fb_get();
Serial.print(fb->height); Serial.write(',');  // write the height 
Serial.print(fb->width); Serial.write(',');   // write the width
for (int i = 0; i < fb->len; i++){            // dump the pixels' value
  Serial.print(fb->buf[i]);
  if (i != fb->len -1) Serial.write(',');
  else Serial.println();
}

The same problem I can't show the image

na = np.array(pixels, dtype=np.uint8).reshape((int(h),int(w),3))
ValueError: cannot reshape array of size 19200 into shape (120,160,3)

I'm tried to save the txt file directly as image.jpg or any other extension but when open the image I get "We can't open this file" ! :frowning: