Aspose::Cells::Drawing::Shape::ToImage method

Shape::ToImage(Aspose::Cells::Drawing::ImageType) method

Creates the shape image and saves it to a stream in the specified format.

Vector<uint8_t> Aspose::Cells::Drawing::Shape::ToImage(Aspose::Cells::Drawing::ImageType imageType)
ParameterTypeDescription
streamAspose::Cells::Drawing::ImageTypeThe output stream.

Remarks

The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.

See Also

Shape::ToImage(const U16String&, const ImageOrPrintOptions&) method

Saves the shape to a file.

void Aspose::Cells::Drawing::Shape::ToImage(const U16String &imageFile, const ImageOrPrintOptions &options)

Examples

U16String imgFile = u"exmaple.png";
ImageOrPrintOptions op;
shape.ToImage(imgFile, op);

See Also

Shape::ToImage(const char16_t*, const ImageOrPrintOptions&) method

Saves the shape to a file.

void Aspose::Cells::Drawing::Shape::ToImage(const char16_t *imageFile, const ImageOrPrintOptions &options)

Examples

ImageOrPrintOptions op;
shape.ToImage(u"exmaple.png", op);

See Also

Shape::ToImage(const ImageOrPrintOptions&) method

Saves the shape to a stream.

Vector<uint8_t> Aspose::Cells::Drawing::Shape::ToImage(const ImageOrPrintOptions &options)

Examples

ImageOrPrintOptions op;
Vector<uint8_t> imageStream = shape.ToImage(op);

See Also