Transform RGB RAW 8-bit/10-bit into JPG

Hello

Any guidance in how to convert the RGB RAW 8-bit/10-bit output of a OV9715 sensor using Arduino?

Any available library or something?

Any help will be very valuable, I don't know where to start.

Thank you very much.