Class WmfImageData

java.lang.Object
com.itextpdf.io.image.ImageData
com.itextpdf.kernel.pdf.canvas.wmf.WmfImageData

public class WmfImageData extends ImageData
Image implementation for WMF, Windows Metafile.
  • Field Details

    • wmf

      private static final byte[] wmf
  • Constructor Details

    • WmfImageData

      public WmfImageData(String fileName) throws MalformedURLException
      Creates a WmfImage from a file.
      Parameters:
      fileName - pah to the file
      Throws:
      MalformedURLException - a MalformedURLException
    • WmfImageData

      public WmfImageData(URL url)
      Creates a WmfImage from a URL.
      Parameters:
      url - URL to the file
    • WmfImageData

      public WmfImageData(byte[] bytes)
      Creates a WmfImage from a byte[].
      Parameters:
      bytes - the image bytes
  • Method Details

    • imageTypeIs

      private static boolean imageTypeIs(byte[] imageType, byte[] compareWith)
    • readImageType

      private static byte[] readImageType(URL source)
    • readImageType

      private static byte[] readImageType(byte[] bytes)