org.apache.poi.ss.usermodel
Interface Picture

All Known Implementing Classes:
HSSFObjectData, HSSFPicture

public interface Picture

Repersents a picture in a SpreadsheetML document


Method Summary
 ClientAnchorgetClientAnchor()
           
 java.awt.DimensiongetImageDimension()
          Return the dimension of the embedded image in pixel
 PictureDatagetPictureData()
          Return picture data for this picture
 ClientAnchorgetPreferredSize()
          Calculate the preferred size for this picture.
 ClientAnchorgetPreferredSize(double scaleX, double scaleY)
          Calculate the preferred size for this picture.
 SheetgetSheet()
           
 voidresize()
          Reset the image to the dimension of the embedded image
 voidresize(double scale)
          Resize the image proportionally.
 voidresize(double scaleX, double scaleY)
          Resize the image.
 

Method Detail

resize

void resize()
Reset the image to the dimension of the embedded image

See Also:
resize(double, double)

resize

void resize(double scale)
Resize the image proportionally.

See Also:
resize(double, double)

resize

void resize(double scaleX,            double scaleY)
Resize the image.

Please note, that this method works correctly only for workbooks with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). If the default font is changed the resized image can be streched vertically or horizontally.

resize(1.0,1.0) keeps the original size,
resize(0.5,0.5) resize to 50% of the original,
resize(2.0,2.0) resizes to 200% of the original.
resize(Double.MAX_VALUE,Double.MAX_VALUE) resizes to the dimension of the embedded image.

Parameters:
scaleX - the amount by which the image width is multiplied relative to the original width.
scaleY - the amount by which the image height is multiplied relative to the original height.

getPreferredSize

ClientAnchor getPreferredSize()
Calculate the preferred size for this picture.

Returns:
XSSFClientAnchor with the preferred size for this image

getPreferredSize

ClientAnchor getPreferredSize(double scaleX,                              double scaleY)
Calculate the preferred size for this picture.

Parameters:
scaleX - the amount by which image width is multiplied relative to the original width.
scaleY - the amount by which image height is multiplied relative to the original height.
Returns:
ClientAnchor with the preferred size for this image

getImageDimension

java.awt.Dimension getImageDimension()
Return the dimension of the embedded image in pixel

Returns:
image dimension in pixels

getPictureData

PictureData getPictureData()
Return picture data for this picture

Returns:
picture data for this picture

getClientAnchor

ClientAnchor getClientAnchor()
Returns:
the anchor that is used by this picture

getSheet

Sheet getSheet()
Returns:
the sheet which contains the picture




NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14