Class AwtImageDataFactory

java.lang.Object
com.itextpdf.io.image.AwtImageDataFactory

class AwtImageDataFactory extends Object
  • Constructor Details

    • AwtImageDataFactory

      AwtImageDataFactory()
  • Method Details

    • create

      public static ImageData create(Image image, Color color) throws IOException
      Gets an instance of an Image from a Image
      Parameters:
      image - the Image to convert
      color - if different from null the transparency pixels are replaced by this color
      Returns:
      RawImage
      Throws:
      IOException
    • create

      public static ImageData create(Image image, Color color, boolean forceBW) throws IOException
      Gets an instance of an Image from a java.awt.Image.
      Parameters:
      image - the java.awt.Image to convert
      color - if different from null the transparency pixels are replaced by this color
      forceBW - if true the image is treated as black and white
      Returns:
      RawImage
      Throws:
      IOException