|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hslf.usermodel.Picture
public class Picture
Represents a picture in a PowerPoint document.
The information about an image in PowerPoint document is stored in two places:
Data in the "Pictures" OLE stream is organized as follows:
For each image there is an entry: 25 byte header + image data.
Image data is the exact content of the JPEG file, i.e. PowerPoint
puts the whole jpeg file there without any modifications.
Header format:
Field Summary | |
---|---|
static int |
DIB
Windows DIB (BMP) |
protected byte[] |
header
Header which holds information about this picture |
static int |
HEADER_SIZE
The size of the header |
static int |
JPEG
JPEG |
static int |
PICT
Macintosh PICT |
protected byte[] |
pictdata
Binary data of the picture |
static int |
PNG
PNG |
static int |
WMF
Windows Metafile |
Constructor Summary | |
---|---|
Picture(byte[] pictstream,
int offset)
Read a picture from "Pictures" OLE stream |
Method Summary | |
---|---|
byte[] |
getData()
|
int |
getSize()
Return image size in bytes |
int |
getType()
Returns the type of this picture. |
byte[] |
getUID()
Returns the unique identifier (UID) of this picture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WMF
public static final int PICT
public static final int JPEG
public static final int PNG
public static final int DIB
public static final int HEADER_SIZE
protected byte[] pictdata
protected byte[] header
Constructor Detail |
---|
public Picture(byte[] pictstream, int offset)
pictstream
- the bytes to readoffset
- the index of the first byte to readMethod Detail |
---|
public byte[] getData()
public int getSize()
public byte[] getUID()
public int getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |