Don't know if I need to do this in 2 steps:
1. convert bmp image to ipg image
2. create any jpg file header and save it to a file?

Any sample file?

Thank you in advance!