Shape.ToImage

ToImage(Stream, ImageType)

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

public void ToImage(Stream stream, ImageType imageType)
ParameterTypeDescription
streamStreamThe output stream.
imageTypeImageTypeThe 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


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


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


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