Class Metafile

All Implemented Interfaces:
GenericRecord, PictureData
Direct Known Subclasses:
EMF, PICT, WMF

public abstract class Metafile extends HSLFPictureData
Represents a metafile picture which can be one of the following types: EMF, WMF, or PICT. A metafile is stored compressed using the ZIP deflate/inflate algorithm.
  • Constructor Details

    • Metafile

      @Internal protected Metafile(EscherContainerRecord recordContainer, EscherBSERecord bse)
      Creates a new instance.
      Parameters:
      recordContainer - Record tracking all pictures. Should be attached to the slideshow that this picture is linked to.
      bse - Record referencing this picture. Should be attached to the slideshow that this picture is linked to.
  • Method Details

    • setMaxRecordLength

      public static void setMaxRecordLength(int length)
      Parameters:
      length - the max record length allowed for HWPF Picture
      Since:
      6.0.0
    • getMaxRecordLength

      public static int getMaxRecordLength()
      Returns:
      the max record length allowed for HWPF Picture
      Since:
      6.0.0
    • compress

      protected static byte[] compress(byte[] bytes, int offset, int length)
    • getImageDimension

      public Dimension getImageDimension()
      Description copied from interface: PictureData
      Return the original image dimensions in points (for formats supported by BufferedImage). Will return a Dimension with a default width of 200x200 if the format unsupported.