Namespace EasyXLS.Drawings
Class ExcelImage
System.Object
This class stores image information like image path and position in worksheet.
-
Constructor Summary
ConstructorDescriptionDefines an instance of the image.ExcelImage(System.String path)
Defines an instance of the image having the specified path.ExcelImage(System.String path, int row, int column)
Defines an instance of the image having the specified path and location
This constructor is applicable only to adding images to ExcelWorksheet objects
ExcelImage(System.String path, int row, int column, int width, int height)
Defines an instance of the image having the specified path, location and size
This constructor is applicable only to adding images to ExcelWorksheet objects
ExcelImage(System.String path, System.String position)
Defines an instance of the image having the specified path and location
This constructor is applicable only to adding images to ExcelWorksheet objects
ExcelImage(System.String path, System.String position, int width, int height)
Defines an instance of the image having the specified path, location and size
This constructor is applicable only to adding images to ExcelWorksheet objects
-
Method Summary
Modifier and TypeMethodDescriptionClone()
Creates and returns a copy of this object.EasyXLS.BIFF_Records.Drawing_Records.BSE
Internal use only.byte[]
Returns a byte array that represents the image.System.String
Returns the file path to image file.void
setBSEImage(EasyXLS.BIFF_Records.Drawing_Records.BSE image)
Internal use only.void
setImagePath(System.String path)
Sets the file path to image file.Methods inherited from class EasyXLS.Drawings.DrawingObject2D
getLeftUpperCornerColumn, getLeftUpperCornerRow, setLeftUpperCorner, setLeftUpperCorner
Methods inherited from class EasyXLS.Drawings.FillDrawingObject
getFillFormat, setFillFormat
Methods inherited from class EasyXLS.Drawings.LineDrawingObject
getLineColorFormat, getLineStyleFormat, getShadowFormat, setLineColorFormat, setLineStyleFormat, setShadowFormat
Methods inherited from class EasyXLS.Drawings.DrawingObject
getHeight, getHorizontalOffset, getRelativeHeight, getRelativeHorizontalOffset, getRelativeVerticalOffset, getRelativeWidth, getVerticalOffset, getWidth, setLeftUpperOffset, setRelativeLeftUpperOffset, setRelativeSize, setSize
Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExcelImage
public ExcelImage()Defines an instance of the image. -
ExcelImage
public ExcelImage(System.String path)Defines an instance of the image having the specified path.- Parameters:
path
- the file path to image file
-
ExcelImage
public ExcelImage(System.String path, int row, int column)Defines an instance of the image having the specified path and location
This constructor is applicable only to adding images to ExcelWorksheet objects
- Parameters:
path
- the file path to image filerow
- the row number where the left upper corner of the image is anchoredcolumn
- the column number where the left upper corner of the image is anchored
-
ExcelImage
public ExcelImage(System.String path, int row, int column, int width, int height)Defines an instance of the image having the specified path, location and size
This constructor is applicable only to adding images to ExcelWorksheet objects
- Parameters:
path
- the file path to image filerow
- the row number where the left upper corner of the image is anchoredcolumn
- the column number where the left upper corner of the image is anchoredwidth
- the image widthheight
- the image height
-
ExcelImage
public ExcelImage(System.String path, System.String position)Defines an instance of the image having the specified path and location
This constructor is applicable only to adding images to ExcelWorksheet objects
- Parameters:
path
- the file path to image fileposition
- the cell reference where the left upper corner of the image is anchored
-
ExcelImage
public ExcelImage(System.String path, System.String position, int width, int height)Defines an instance of the image having the specified path, location and size
This constructor is applicable only to adding images to ExcelWorksheet objects
- Parameters:
path
- the file path to image fileposition
- the cell reference where the left upper corner of the image is anchoredwidth
- the image widthheight
- the image height
-
-
Method Details
-
getBSEImage
public EasyXLS.BIFF_Records.Drawing_Records.BSE getBSEImage()Internal use only. Returns the BSE record.- Returns:
- the BSE record
- See Also:
setBSEImage(EasyXLS.BIFF_Records.Drawing_Records.BSE)
-
setBSEImage
public void setBSEImage(EasyXLS.BIFF_Records.Drawing_Records.BSE image)Internal use only. Sets the BSE record.- Parameters:
image
- the BSE record- See Also:
getBSEImage()
-
getImagePath
public System.String getImagePath()Returns the file path to image file.- Returns:
- the file path to image file
- See Also:
setImagePath(System.String)
-
setImagePath
public void setImagePath(System.String path)Sets the file path to image file.- Parameters:
path
- the file path to image file- See Also:
getImagePath()
-
getImageBytes
public byte[] getImageBytes()Returns a byte array that represents the image. The image is available only if the Excel file containing the image was previously loaded or after the Excel file was written.- Returns:
- a byte array that represents the imag
-
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-