Shape.ToImage
Contents
[
Hide
]ToImage(Stream, ImageType)
Creates the shape image and saves it to a stream in the specified format.
public void ToImage(Stream stream, ImageType imageType)
Parameter | Type | Description |
---|---|---|
stream | Stream | The output stream. |
imageType | ImageType | The type in which to save the image. |
Remarks
The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.
Examples
[C#]
MemoryStream imageStream = new MemoryStream();
shape.ToImage(imageStream, ImageType.Png);
See Also
- enum ImageType
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells
ToImage(string, ImageOrPrintOptions)
Saves the shape to a file.
public void ToImage(string imageFile, ImageOrPrintOptions options)
Examples
[C#]
ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.ToImage("exmaple.png", op);
See Also
- class ImageOrPrintOptions
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells
ToImage(Stream, ImageOrPrintOptions)
Saves the shape to a stream.
public void ToImage(Stream stream, ImageOrPrintOptions options)
Examples
[C#]
MemoryStream imageStream = new MemoryStream();
ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.ToImage(imageStream, op);
See Also
- class ImageOrPrintOptions
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells
ToImage(ImageOrPrintOptions)
Returns the bitmap object of the shape .
public Bitmap ToImage(ImageOrPrintOptions options)
Examples
[C#]
ImageOrPrintOptions op = new ImageOrPrintOptions();
System.Drawing.Bitmap btm = shape.ToImage(op);
See Also
- class ImageOrPrintOptions
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells