Skip to content

Commit e66900c

Browse files
committed
Write image to web client using multiple byte write.
1 parent 372537b commit e66900c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ESP32_I2S_Camera/ESP32_I2S_Camera.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ void serve()
8787
client.println("Content-type:image/bmp");
8888
client.println();
8989

90-
for(int i = 0; i < BMP::headerSize; i++)
91-
client.write(bmpHeader[i]);
92-
for(int i = 0; i < camera->xres * camera->yres * 2; i++)
93-
client.write(camera->frame[i]);
90+
client.write(bmpHeader, BMP::headerSize);
91+
client.write(camera->frame, camera->xres * camera->yres * 2);
9492
}
9593
}
9694
}

0 commit comments

Comments
 (0)