title: Convert PNG-8 to PNG-24 (or something else)
body: <p>I have a PHP application where...</p>
  
  <ol>
  <li>User uploads a scanned image (png or jpg)</li>
  <li>I create annotations that are saved as a transparent png.</li>
  <li>Those annotations are "embedded" into the scans and the output is a png file.</li>
  </ol>
  
  <p>All works well except if the images are PNG-8's.  So, I don't know if this is possible, but could I convert a PNG-8 to a PNG-24 (or some other kind of PNG)?  </p>
  
  <p>I don't know much about PNG types, but according to <a href="http://www.fileformat.info" rel="nofollow">http://www.fileformat.info</a>, the metadata of a working image looks like this...</p>
  
  <pre><code>&lt;javax_imageio_png_1.0&gt;
  &lt;IHDR width="600" height="764" bitDepth="8" colorType="RGB" compressionMethod="deflate" filterMethod="adaptive" interlaceMethod="none"/&gt;
  &lt;pHYs pixelsPerUnitXAxis="7874" pixelsPerUnitYAxis="7874" unitSpecifier="meter"/&gt;
  &lt;tIME year="2013" month="4" day="25" hour="14" minute="9" second="17"/&gt;
  &lt;/javax_imageio_png_1.0&gt;
  </code></pre>
  
  <p>And metadata from a failing image looks like this...</p>
  
  <pre><code>&lt;javax_imageio_png_1.0&gt;
  &lt;IHDR width="600" height="755" bitDepth="8" colorType="Grayscale" compressionMethod="deflate" filterMethod="adaptive" interlaceMethod="none"/&gt;
  &lt;pHYs pixelsPerUnitXAxis="7874" pixelsPerUnitYAxis="7874" unitSpecifier="meter"/&gt;
  &lt;tIME year="2013" month="4" day="23" hour="21" minute="10" second="33"/&gt;
  &lt;/javax_imageio_png_1.0&gt;
  </code></pre>