title: iText Image and transparency
body: <p>I'm trying to add a PNG image to an existing pdf, but the transparency is converted to black color.</p>
  
  <pre><code>        PdfReader reader = new PdfReader(pdfPath);
          File f = new File(pdfPath);
          String result = f.getParent() + File.separator + UUID.randomUUID().toString() + ".pdf";
          PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(result));
          Image image = Image.getInstance(ImageIO.read(new File(imagePath)), null);
          PdfImage stream = new PdfImage(image, null, null);
          PdfIndirectObject ref = stamper.getWriter().addToBody(stream);      
          image.setDirectReference(ref.getIndirectReference());
          image.setAbsolutePosition(30, 300);
          PdfContentByte canvas = stamper.getOverContent(1);
          canvas.addImage(image);
          stamper.close();
          reader.close();
  </code></pre>
  
  <p>How can I keep transparency?</p>