Я делаю проект камеры Wi-Fi с использованием пакетов OV7670
и ESP32
: https://github.com/bitluni/ESP32CameraI2S < / а>.
Как сохранить растровое изображение, используя SPIFFS
в File
?
Часть кода:
void Get_photo (AsyncWebServerRequest * request) {
camera-> oneFrame ();
File file = SPIFFS.open ("/ Images / test.bmp", FILE_WRITE); // How to save to this file?
for (int i = 0; i <BMP :: headerSize; i ++)
{
bmpHeader [i];
}
for (int i = 0; i <camera-> xres * camera-> yres * 2; i ++)
{
camera-> frame [i];
}
Serial.println ("PHOTO_OK!");
}