add_picture method

add_picture

Adds a picture to the collection.

Returns

Picture Picture object.

def add_picture(self, upper_left_row, upper_left_column, lower_right_row, lower_right_column, stream):
    ...
ParameterTypeDescription
upper_left_rowintUpper left row index.
upper_left_columnintUpper left column index.
lower_right_rowintLower right row index
lower_right_columnintLower right column index
streamio.RawIOBaseStream object which contains the image data.

Example


# add a picture
with open("image.jpg", "rb") as fs:
    picture = shapes.add_picture(1, 0, 1, 0, fs)

add_picture

Adds a picture to the collection.

Returns

Picture Picture object.

def add_picture(self, upper_left_row, upper_left_column, stream, width_scale, height_scale):
    ...
ParameterTypeDescription
upper_left_rowintUpper left row index.
upper_left_columnintUpper left column index.
streamio.RawIOBaseStream object which contains the image data.
width_scaleintScale of image width, a percentage.
height_scaleintScale of image height, a percentage.

Example


# add a picture
with open("image.jpg", "rb") as fs:
    picture = shapes.add_picture(1, 1, fs, 50, 60)

See Also