Aspose::Cells::Drawing::ShapeCollection::AddPicture method

ShapeCollection::AddPicture(int32_t, int32_t, int32_t, int32_t, const Vector <uint8_t>&) method

Adds a picture to the collection.

Aspose::Cells::Drawing::Picture Aspose::Cells::Drawing::ShapeCollection::AddPicture(int32_t upperLeftRow, int32_t upperLeftColumn, int32_t lowerRightRow, int32_t lowerRightColumn, const Vector<uint8_t> &stream)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
lowerRightRowint32_tLower right row index
lowerRightColumnint32_tLower right column index
streamconst Vector <uint8_t>&Stream object which contains the image data.

ReturnValue

PicturePicture object.

Examples

//add a picture
Vector<uint8_t> fs{ 0 };//Gets image data into fs from file(e.g image.jpg . Note: You need to read the data into this variable.).
Picture picture = shapes.AddPicture(1, 0, 1, 0, fs);

See Also

ShapeCollection::AddPicture(int32_t, int32_t, const Vector <uint8_t>&, int32_t, int32_t) method

Adds a picture to the collection.

Aspose::Cells::Drawing::Picture Aspose::Cells::Drawing::ShapeCollection::AddPicture(int32_t upperLeftRow, int32_t upperLeftColumn, const Vector<uint8_t> &stream, int32_t widthScale, int32_t heightScale)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
streamconst Vector <uint8_t>&Stream object which contains the image data.
widthScaleint32_tScale of image width, a percentage.
heightScaleint32_tScale of image height, a percentage.

ReturnValue

PicturePicture object.

Examples

//add a picture
Vector<uint8_t> fs{ 0 };//Gets image data into fs from file(e.g image.jpg . Note: You need to read the data into this variable.).
Picture picture = shapes.AddPicture(1, 1, fs, 50, 60);

See Also