Esp32_camera sketch is optimized for RGB

Question/Issue:
So I have trained the object detection using 96x96 resolution grayscale images. I am using the esp32_camera example sketch in the library. But it is optimised for RGB images
Project ID:
589469
Context/Use case:
bool converted = fmt2rgb888(fb->buf, fb->len, PIXFORMAT_JPEG, snapshot_buf);
This converts the captured image into RGB format, as JPEG is not preferred. But my images are already taken as grayscale.

So how will it interpret my grayscale image as? will it convert it to RGB then what will happen? as I have trained my model using grayscale image, asn in parameter too I have chosen grayscale