public final class Picture
extends java.lang.Object
Constructor and Description |
---|
Picture(EscherBlipRecord blipRecord)
Builds a Picture object for a Picture stored as Escher.
|
Picture(int dataBlockStartOfsset, byte[] _dataStream, boolean fillBytes)
Builds a Picture object for a Picture stored in the DataStream
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent() |
java.lang.String |
getDescription()
returns the description stored in the alternative text
(返回存储在替代文本中的描述)
|
int |
getDxaCropLeft()
Deprecated.
POI 3.8 beta 4.
(已弃用。 POI 3.8 测试版 4。)
|
int |
getDxaCropRight()
Deprecated.
POI 3.8 beta 4.
(已弃用。 POI 3.8 测试版 4。)
|
int |
getDxaGoal()
Gets the initial width of the picture, in twips, prior to cropping or scaling.
(在裁剪或缩放之前获取图片的初始宽度(以缇为单位)。)
|
int |
getDyaCropBottom()
Deprecated.
POI 3.8 beta 5.
(已弃用。 POI 3.8 测试版 5。)
|
int |
getDyaCropTop()
Deprecated.
POI 3.8 beta 5.
(已弃用。 POI 3.8 测试版 5。)
|
int |
getDyaGoal()
Gets the initial height of the picture, in twips, prior to cropping or scaling.
(在裁剪或缩放之前获取图片的初始高度(以缇为单位)。)
|
int |
getHeight()
returns pixel height of the picture or -1 if dimensions determining was failed
(如果尺寸确定失败,则返回图片的像素高度或 -1)
|
int |
getHorizontalScalingFactor() |
java.lang.String |
getMimeType()
Returns the MIME type for the image
(返回图像的 MIME 类型)
|
byte[] |
getRawContent()
Returns picture's content as stored in the Word file, i.e.
(返回存储在 Word 文件中的图片内容,即)
|
int |
getSize() |
int |
getStartOffset() |
int |
getVerticalScalingFactor() |
int |
getWidth()
returns pixel width of the picture or -1 if dimensions determining was failed
(如果尺寸确定失败,则返回图片的像素宽度或 -1)
|
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.
(尝试建议一个文件名:“数据”流中图片结构偏移的十六进制表示加上尝试从图片内容的第一个字节确定的扩展名。)
|
PictureType |
suggestPictureType() |
void |
writeImageContent(java.io.OutputStream out)
Writes Picture's content bytes to specified OutputStream.
(将 Picture 的内容字节写入指定的 OutputStream。)
|
public Picture(EscherBlipRecord blipRecord)
public Picture(int dataBlockStartOfsset, byte[] _dataStream, boolean fillBytes)
public byte[] getContent()
@Deprecated public int getDxaCropLeft()
@Deprecated public int getDxaCropRight()
public int getDxaGoal()
@Deprecated public int getDyaCropBottom()
@Deprecated public int getDyaCropTop()
public int getDyaGoal()
public int getHeight()
public int getHorizontalScalingFactor()
public java.lang.String getMimeType()
public byte[] getRawContent()
public int getSize()
public int getStartOffset()
CharacterRun.getPicOffset()
(此图片在图片字节中的偏移量,与 CharacterRun.getPicOffset() 匹配时使用)
public int getVerticalScalingFactor()
public int getWidth()
public java.lang.String getDescription()
public java.lang.String suggestFileExtension()
public java.lang.String suggestFullFileName()
public PictureType suggestPictureType()
public void writeImageContent(java.io.OutputStream out) throws java.io.IOException
out
- a stream to write to
(out - 要写入的流)
java.io.IOException
- if some exception is occured while writing to specified out
(java.io.IOException - 如果在写入指定输出时发生某些异常)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.