title: How can I convert (encode) RGB buffer to JPEG in plain C?
body: <p>I would expect that there's some sort of library that I can use in this fashion:</p>
  
  <pre><code>int* buffer[720*480]; // read in from file/memory/network stream
  raw_params params;
  params.depth = 16;
  params.width = 720;
  params.height = 480;
  params.map = "rgb";
  params.interleave = JPEG_RAW_INTERLEAVE_OFF;
  
  jpeg_encode(buffer, params)
  </code></pre>
  
  <p>But I can't seem to find it.</p>
  
  <h2>Clarification</h2>
  
  <p>I'm looking for a simple example of how to use such a library as well. Code as robust as the source of <code>netpbm</code> and <code>magick</code> are too complex for my level of understanding.</p>