add_icons method

add_icons

Adds svg image.

Returns

def add_icons(self, upper_left_row, top, upper_left_column, left, height, width, image_byte_data, compatible_image_data):
    ...
ParameterTypeDescription
upper_left_rowintUpper left row index.
topintRepresents the vertical offset of shape from its left row, in unit of pixel.
upper_left_columnintUpper left column index.
leftintThe horizontal offset of shape from its left column, in unit of pixel.
heightintThe height of shape, in unit of pixel.
widthintThe width of shape, in unit of pixel.
image_byte_databytesThe image byte data.
compatible_image_databytesConverted image data from svg in order to be compatible with Excel 2016 or lower versions.

Example

from aspose import pycore
import bytearray
import int

# add icon
with open("icon.svg", "rb") as fs:
    len = pycore.cast(int, utils.filesize(fs))
    imageData = bytearray(len)
    fs.readinto(imageData)
    picture = shapes.add_icons(4, 0, 5, 0, -1, -1, imageData, None)

See Also