Aspose::Cells::Drawing::Shape::ToImage method
Contents
[
Hide
]Shape::ToImage(const Vector <uint8_t>&, Aspose::Cells::Drawing::ImageType) method
Creates the shape image and saves it to a stream in the specified format.
void Aspose::Cells::Drawing::Shape::ToImage(const Vector<uint8_t> &stream, Aspose::Cells::Drawing::ImageType imageType)
Parameter | Type | Description |
---|---|---|
stream | const Vector <uint8_t>& | The output stream. |
imageType | Aspose::Cells::Drawing::ImageType | The type in which to save the image. |
Remarks
The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.
Examples
Vector<uint8_t> imageStream {0};
shape.ToImage(imageStream, ImageType::Png);
See Also
- Class Vector
- Enum ImageType
- Class Shape
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++
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
- Class Vector
- Class U16String
- Class ImageOrPrintOptions
- Class Shape
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++
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
- Class Vector
- Class ImageOrPrintOptions
- Class Shape
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++
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
- Class Vector
- Class ImageOrPrintOptions
- Class Shape
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++