Package org.apache.poi.hslf.blip
Class DIB
- java.lang.Object
-
- org.apache.poi.hslf.usermodel.HSLFPictureData
-
- org.apache.poi.hslf.blip.Bitmap
-
- org.apache.poi.hslf.blip.DIB
-
- All Implemented Interfaces:
GenericRecord
,PictureData
public final class DIB extends Bitmap
Represents a DIB picture data in a PPT file
-
-
Nested Class Summary
-
Nested 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
Constructors Constructor Description DIB()
Deprecated.UseHSLFSlideShow.addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)
or one of its overloads to create newDIB
.DIB(EscherContainerRecord recordContainer, EscherBSERecord bse)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static byte[]
addBMPHeader(byte[] data)
protected byte[]
formatImageForSlideshow(byte[] data)
Formats the picture data for storage in the slideshow.byte[]
getData()
int
getSignature()
DIB signature is0x7A80
or0x7A90
PictureData.PictureType
getType()
void
setSignature(int signature)
Sets the DIB signature - either0x7A80
or0x7A90
-
Methods inherited from class org.apache.poi.hslf.blip.Bitmap
getImageDimension
-
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFPictureData
create, getChecksum, getChecksum, getContentType, getGenericProperties, getHeader, getImageDimensionInPixels, getIndex, getOffset, getRawData, getUID, getUIDInstanceCount, setData, setIndex, setOffset, setRawData, setUIDInstanceCount, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Constructor Detail
-
DIB
@Deprecated @Removal(version="5.3") public DIB()
Deprecated.UseHSLFSlideShow.addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)
or one of its overloads to create newDIB
. This API led to detachedDIB
instances (See Bugzilla 46122) and prevented adding additional functionality.
-
DIB
@Internal public DIB(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 Detail
-
getType
public PictureData.PictureType getType()
-
getSignature
public int getSignature()
DIB signature is0x7A80
or0x7A90
- Specified by:
getSignature
in classHSLFPictureData
- Returns:
- DIB signature (
0x7A80
or0x7A90
)
-
setSignature
public void setSignature(int signature)
Sets the DIB signature - either0x7A80
or0x7A90
- Specified by:
setSignature
in classHSLFPictureData
-
getData
public byte[] getData()
- Specified by:
getData
in interfacePictureData
- Overrides:
getData
in classBitmap
-
addBMPHeader
public static byte[] addBMPHeader(byte[] data)
-
formatImageForSlideshow
protected byte[] formatImageForSlideshow(byte[] data)
Description copied from class:HSLFPictureData
Formats the picture data for storage in the slideshow.Images stored in
HSLFSlideShow
s are represented differently than when they are standalone files. The exact formatting differs for each image type.- Overrides:
formatImageForSlideshow
in classBitmap
- Parameters:
data
- Original image data. If these bytes were written to a disk, a common image viewer would be able to render the image.- Returns:
- Formatted image representation.
-
-