Package org.apache.poi.hslf.blip
Class Metafile
java.lang.Object
org.apache.poi.hslf.usermodel.HSLFPictureData
org.apache.poi.hslf.blip.Metafile
- All Implemented Interfaces:
GenericRecord,PictureData
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA structure which represents a 34-byte header preceding the compressed metafile dataNested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.PictureData
PictureData.PictureType -
Field Summary
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFPictureData
CHECKSUM_SIZE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetafile(EscherContainerRecord recordContainer, EscherBSERecord bse) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[]compress(byte[] bytes, int offset, int length) Return the original image dimensions in points (for formats supported by BufferedImage).static intstatic voidsetMaxRecordLength(int length) Methods inherited from class org.apache.poi.hslf.usermodel.HSLFPictureData
formatImageForSlideshow, getChecksum, getChecksum, getContentType, getGenericProperties, getHeader, getImageDimensionInPixels, getIndex, getOffset, getRawData, getSignature, getUID, getUIDInstanceCount, setData, setIndex, setSignature, setUIDInstanceCount, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordTypeMethods inherited from interface org.apache.poi.sl.usermodel.PictureData
getData, getType
-
Constructor Details
-
Metafile
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
Description copied from interface:PictureDataReturn 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.
-