|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.hwpf.usermodel.Picture
public class Picture
Represents embedded picture extracted from Word Document
| Field Summary | |
|---|---|
static byte[] |
BMP
|
static byte[] |
COMPRESSED1
|
static byte[] |
COMPRESSED2
|
static byte[] |
EMF
|
static byte[] |
GIF
|
static byte[] |
IHDR
|
static byte[] |
JPG
|
static byte[] |
PNG
|
static byte[] |
TIFF
|
static byte[] |
TIFF1
|
static byte[] |
WMF1
|
static byte[] |
WMF2
|
| Constructor Summary | |
|---|---|
Picture(int dataBlockStartOfsset,
byte[] _dataStream,
boolean fillBytes)
|
|
| Method Summary | |
|---|---|
int |
getAspectRatioX()
returns horizontal aspect ratio for picture provided by user |
int |
getAspectRatioY()
returns vertical aspect ratio for picture provided by user |
byte[] |
getContent()
|
int |
getHeight()
returns pixel height of the picture or -1 if dimensions determining was failed |
byte[] |
getRawContent()
|
int |
getSize()
|
int |
getWidth()
returns pixel width of the picture or -1 if dimensions determining was failed |
java.lang.String |
suggestFileExtension()
tries to suggest extension for picture's file by matching signatures of popular image formats to first bytes of picture's contents |
java.lang.String |
suggestFullFileName()
Tries to suggest a filename: hex representation of picture structure offset in "Data" stream plus extension that is tried to determine from first byte of picture's content. |
void |
writeImageContent(java.io.OutputStream out)
Writes Picture's content bytes to specified OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte[] GIF
public static final byte[] PNG
public static final byte[] JPG
public static final byte[] BMP
public static final byte[] TIFF
public static final byte[] TIFF1
public static final byte[] EMF
public static final byte[] WMF1
public static final byte[] WMF2
public static final byte[] IHDR
public static final byte[] COMPRESSED1
public static final byte[] COMPRESSED2
| Constructor Detail |
|---|
public Picture(int dataBlockStartOfsset,
byte[] _dataStream,
boolean fillBytes)
| Method Detail |
|---|
public java.lang.String suggestFullFileName()
public void writeImageContent(java.io.OutputStream out)
throws java.io.IOException
out - a stream to write to
java.io.IOException - if some exception is occured while writing to specified outpublic byte[] getContent()
public byte[] getRawContent()
public int getSize()
public int getAspectRatioX()
public int getAspectRatioY()
public java.lang.String suggestFileExtension()
public int getWidth()
public int getHeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||