title: Tools to convert from 16-bit RGB to 24-bit RGB and vice versa
body: <p>Are there any image editing or research tools, hopefully OSS, which will allow me to:</p>
  
  <ul>
  <li>map colors (images) from 16-bit RGB (565) to 24-bit RGB (888) space or vice versa</li>
  <li>save files in PNG, GIF, or JPEG </li>
  <li>give user the ability to control how colors are mapped from 16-bit space to 24-bit space.</li>
  </ul>
  
  <p>I found one issue that discusses something similar but I'm hoping I'll be able to run these tests without writing any code.
   <a href="https://stackoverflow.com/q/1553502/981380">convert 24bit RGB to ARGB16</a></p>
  
  <p>Here's a little background for this request.</p>
  
  <p>I'm working on a project evaluating an LCD display panel.  The native bit depth of the panel is 24-bits (RGB 888) and it is currently available on an evaluation kit that uses an LCD controller that supports 24-bit output only.  </p>
  
  <p>The LCD controller on the product for which this panel is being evaluated only supports 16-bit output (RGB 565).  In the final design the remaining bits for each color channel on the panel will be connected in some way.  </p>
  
  <p>The evaluation kit does not take RGB inputs (as mentioned above it only takes PNG, JPEG, or GIF). I'm looking for a way to create 16-bit and 24-bit RGB files which will then be converted to a PNG.   By manipulating the values of the R, G and B channels in the source files (16-bit and 24-bit) I want to compare the difference between driving a 24-bit display with 24-bits of color and 16-bits of color (extended to 24-bits).</p>
  
  <p>I'd also be interested in learning about others experiences with this sort of evaluation and the sanity of my proposed test methodology.</p>
  
  <p>Thanks.</p>