Aspose::Cells::Drawing::PictureCollection::Add method

PictureCollection::Add(int32_t, int32_t, int32_t, int32_t, const Vector <uint8_t>&) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(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

Picture object index.

Examples

//Get image data from file(e.g image.jpg)
//(Note: You need to read the data into this variable.)
Vector<uint8_t> fs{0};

//add a picture
int index = pictures.Add(1, 1, 5, 5, fs);

See Also

PictureCollection::Add(int32_t, int32_t, int32_t, int32_t, const U16String&) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, int32_t lowerRightRow, int32_t lowerRightColumn, const U16String &fileName)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
lowerRightRowint32_tLower right row index
lowerRightColumnint32_tLower right column index
fileNameconst U16String&Image filename.

ReturnValue

Picture object index.

See Also

PictureCollection::Add(int32_t, int32_t, int32_t, int32_t, const char16_t*) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, int32_t lowerRightRow, int32_t lowerRightColumn, const char16_t *fileName)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
lowerRightRowint32_tLower right row index
lowerRightColumnint32_tLower right column index
fileNameconst char16_t*Image filename.

ReturnValue

Picture object index.

See Also

PictureCollection::Add(int32_t, int32_t, const Vector <uint8_t>&) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, const Vector<uint8_t> &stream)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
streamconst Vector <uint8_t>&Stream object which contains the image data.

ReturnValue

Picture object index.

Examples

//Get image data from file(e.g image.jpg)
//(Note: You need to read the data into this variable.)
Vector<uint8_t> fs{ 0 };

//add a picture
pictures.Add(1, 1, fs);

See Also

PictureCollection::Add(int32_t, int32_t, const U16String&) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, const U16String &fileName)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
fileNameconst U16String&Image filename.

ReturnValue

Picture object index.

Examples

//add a picture
U16String imageFile = u"image.jpg";
pictures.Add(1, 1, imageFile);

See Also

PictureCollection::Add(int32_t, int32_t, const char16_t*) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, const char16_t *fileName)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
fileNameconst char16_t*Image filename.

ReturnValue

Picture object index.

Examples

//add a picture
pictures.Add(1, 1, u"image.jpg");

See Also

PictureCollection::Add(int32_t, int32_t, const Vector <uint8_t>&, int32_t, int32_t) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(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

Picture object index.

Examples

//Get image data from file(e.g image.jpg)
//(Note: You need to read the data into this variable.)
Vector<uint8_t> fs{ 0 };

//add a picture
pictures.Add(1, 1, fs, 50, 50);

See Also

PictureCollection::Add(int32_t, int32_t, const U16String&, int32_t, int32_t) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, const U16String &fileName, int32_t widthScale, int32_t heightScale)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
fileNameconst U16String&Image filename.
widthScaleint32_tScale of image width, a percentage.
heightScaleint32_tScale of image height, a percentage.

ReturnValue

Picture object index.

Examples

//add a picture
U16String imageFile = u"image.jpg";
pictures.Add(1, 1, imageFile, 50, 50);

See Also

PictureCollection::Add(int32_t, int32_t, const char16_t*, int32_t, int32_t) method

Adds a picture to the collection.

int32_t Aspose::Cells::Drawing::PictureCollection::Add(int32_t upperLeftRow, int32_t upperLeftColumn, const char16_t *fileName, int32_t widthScale, int32_t heightScale)
ParameterTypeDescription
upperLeftRowint32_tUpper left row index.
upperLeftColumnint32_tUpper left column index.
fileNameconst char16_t*Image filename.
widthScaleint32_tScale of image width, a percentage.
heightScaleint32_tScale of image height, a percentage.

ReturnValue

Picture object index.

Examples

//add a picture
pictures.Add(1, 1, u"image.jpg", 50, 50);

See Also