title: RGB888 (24 bit) to PNG/JPEG image algorithm
body: <p>I need to convert 24 bit RGB(888) image data to PNG or JPEG image (whichever possible). Need simpler approach to do this same like converting RGB888 to BMP without any compression. Would be great if it is something like adding PNG/JPEG headers to the RGB data with/without little modification. Ready to provide more details on request..</p>
  
  <p>Thanks in advance..</p>
  
  <p>Language/Platform : C/Linux</p>