title: Convert iText Barcode Image from CCITT format to PNG
body: <p>I'm using iText to create a PDF417 bar code like so:</p>
  
  <p><code>
    private InputStream getBarcode() throws Exception {</p>
  
  <pre><code>BarcodePDF417 barcode = new BarcodePDF417();
  barcode.setText("Sample bar code text");
  
  Image image = barcode.getImage();
  image.scalePercent(50, 50 * barcode.getYHeight());
  
  return new ByteArrayInputStream(image.getRawData());
  </code></pre>
  
  <p>}
  </code></p>
  
  <p>I need to convert the CCITT format returned by <code>barcode.getImage()</code> to either JPG, GIF, or PNG so I can include it in a document I'm creating in JasperReports.</p>