Class PngImage

java.lang.Object
com.aowagie.text.pdf.codec.PngImage

public class PngImage extends Object
Reads a PNG image. All types of PNG can be read.

It is based in part in the JAI codec.

Author:
Paulo Soares (psoares@consiste.pt)
  • Field Details

    • PNGID

      public static final int[] PNGID
      Some PNG specific values.
  • Method Details

    • getImage

      public static Image getImage(URL url) throws IOException
      Reads a PNG from an url.
      Parameters:
      url - the url
      Returns:
      the image
      Throws:
      IOException - on error
    • getImage

      public static Image getImage(byte[] data) throws IOException
      Reads a PNG from a byte array.
      Parameters:
      data - the byte array
      Returns:
      the image
      Throws:
      IOException - on error