the pic is an ESP32CAM image of type camera_fb_t so I suppose the buf is the buffer of the image taken.
The question is what is the jpeg_buf? Is it a conversion of all the buf[ii] to uint8_t? So jpeg_buf is an array of uint8_t numbers or am I wrong?
If it is an array of uint8_t numbers, how can I convert it to a B4R byte array?
I have managed to copy the data successfully to an in line c byte array.
Is there any way to copy with B4R byte converter this inline c byte array to a new B4R byte array?
C++:
byte imageData[pic->len];
// Copy the image data from the camera frame buffer to the byte array
memcpy(imageData, pic->buf, pic->len);