You have to use TurboC or TurboC++ compilers to use either of those links. graphics.h is obsolete and not supported by all other compilers.
I don't really know the answer to the question but I think it will be pretty complicated. Here is the jpg file format and here are other possible google links that may be useful.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
It gets stored in a memory block of your choice.
You then need to write that out to a BMP file, along with the correct BMP header.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953