How to convert OV7670' output into MIME (base64 coding)

pszemek
Posts: 1
Joined: Fri Oct 05, 2018 3:03 pm

How to convert OV7670' output into MIME (base64 coding)

Postby pszemek » Fri Oct 05, 2018 3:13 pm

Hi,

Im trying to send email with photo captured from OV7670 as attachement.

Already I have achieved sending emails with attachement (also images in base64 coding) but I don't know how to convert OV7670 output to something what I could transform to base64.

I'm using Bitluni's driver to OV7670 from https://github.com/bitluni/ESP32CameraI2S, how can I achieve this?

My code:

Code: Select all

// ....
client.println("From: <" + String(FROM) + '>');
client.println("To: <" + to + '>'); 
client.print("Subject: ");
client.println(_subject);
client.println("Content-Type: image/png; name=\"picture.png\"\r\nContent-Disposition: attachment; filename=\"picture.png\"\r\nContent-Transfer-Encoding: base64\r\n\r\n");

for(int i = 0; i < BMP::headerSize; i++)
    client.write(bmpHeader[i]);
for(int i = 0; i < camera->xres * camera->yres * 2; i++)
    client.write(camera->frame[i]);
// ...

Who is online

Users browsing this forum: No registered users and 7 guests