Shape.ToImage
Contents
[
Hide
]ToImage(Stream, ImageFormat)
Creates the shape image and saves it to a stream in the specified format.
[Obsolete("Use Shape.ToImage(Stream, ImageType) method instead.")]
public void ToImage(Stream stream, ImageFormat imageFormat)
Parameter | Type | Description |
---|---|---|
stream | Stream | The output stream. |
imageFormat | ImageFormat | The format in which to save the image. |
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.ToImage(Stream, ImageType) method. This property will be removed 12 months later since July 2022. Aspose apologizes for any inconvenience you may have experienced.
See Also
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells
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