Re: Adam Rosenfield answers: you do not need to implement anything: jpeg_mem_src() will do what you want:
jpeg_mem_src(&cinfo, payload, payload_len);
You must have the entire image stored in memory (and know its length).
obStackoverflow: I know the answer to a really old question, but today I have to do just that, and this page was the first or second rating in response to my web search.
dland source share