Package org.apache.poi.sl.usermodel
Interface PictureData
-
- All Known Implementing Classes:
Bitmap,DIB,EMF,HSLFPictureData,JPEG,Metafile,PICT,PNG,WMF,XSLFPictureData
public interface PictureData
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPictureData.PictureType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getChecksum()Gets the checksum - the checksum can be of various length - mostly it's 8 (XSLF) or 16 (HSLF) bytes long.java.lang.StringgetContentType()Returns content type (mime type) of this picture.byte[]getData()Returns the binary data of this Picturejava.awt.DimensiongetImageDimension()Return the original image dimensions in points (for formats supported by BufferedImage).java.awt.DimensiongetImageDimensionInPixels()Return the original image dimensions in pixelsPictureData.PictureTypegetType()voidsetData(byte[] data)Sets the binary picture data
-
-
-
Method Detail
-
getContentType
java.lang.String getContentType()
Returns content type (mime type) of this picture.- Returns:
- content type of this picture.
-
getType
PictureData.PictureType getType()
- Returns:
- the picture type
-
getData
byte[] getData()
Returns the binary data of this Picture- Returns:
- picture data
-
setData
void setData(byte[] data) throws java.io.IOExceptionSets the binary picture data- Parameters:
data- picture data- Throws:
java.io.IOException
-
getChecksum
byte[] getChecksum()
Gets the checksum - the checksum can be of various length - mostly it's 8 (XSLF) or 16 (HSLF) bytes long.- Returns:
- the checksum
-
getImageDimension
java.awt.Dimension getImageDimension()
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.
-
getImageDimensionInPixels
java.awt.Dimension getImageDimensionInPixels()
Return the original image dimensions in pixels- See Also:
getImageDimension()
-
-