ToImage

ToImage(string, ImageSaveOptions)

创建形状图像并将其保存到文件。 文件名的扩展名决定图像的格式。

public void ToImage(string imageFile, ImageSaveOptions options)
范围类型描述
imageFileString带完整路径的图像文件名。
optionsImageSaveOptions其他图像创建选项

评论

图片的格式是通过文件名的扩展名 来指定的。例如,如果指定“myfile.png”,那么图片将以PNG格式保存 。可以识别以下文件扩展名: .bmp、.gif、.png、.jpg、.jpeg、.tiff、.tif、.emf。

也可以看看


ToImage(Stream, ImageSaveOptions)

创建形状图像并将其保存到指定格式的流中。

public void ToImage(Stream stream, ImageSaveOptions options)
范围类型描述
streamStream输出流。
optionsImageSaveOptions其他图像创建选项

也可以看看