1 Reply Latest reply on Nov 29, 2012 12:24 PM by StanislavL

    how to convert a import com.lowagie.text.Image; to a java.awt.image?

      I am trying to convert an itext image to a java.awt image

      ByteArrayOutputStream bas = new ByteArrayOutputStream();
      ImageIO.write((RenderedImage)image, "png", bas);

      byte[] data = bas.toByteArray();

      InputStream in = new ByteArrayInputStream(data);
      BufferedImage finalImage = ImageIO.read(in);

      But at run time i get a ClassCastException.

      Can anyone help me with this?