导出AnyBitmap
从IronDrawing工具生成的AnyBitmap
文件可以导出为其他图像格式,并能够指定导出图像的损失程度。 此功能使用户能够平衡所需图像的质量与导出的图像文件大小之间的关系。
要将AnyBitmap
文件导出为其他图像格式,只需加载AnyBitmap
文件并使用.ExportFile()
方法。 该方法有3个重载,分别是导出文件名、图像格式和图像损失。 导出的图像格式可以是:
- Bmp
- Gif
- Png
- Jpeg
- Tiff
- Webp
- Wbmp
- Wmf
- Icon
using IronSoftware.Drawing; //Export AnyBitmap files to other formats with ability to control loss AnyBitmap bitmap = new AnyBitmap(@"FILE_PATH"); bitmap.ExportFile("losslogo.png", AnyBitmap.ImageFormat.Png, 100);
Imports IronSoftware.Drawing 'Export AnyBitmap files to other formats with ability to control loss Private bitmap As New AnyBitmap("FILE_PATH") bitmap.ExportFile("losslogo.png", AnyBitmap.ImageFormat.Png, 100)
Install-Package IronSoftware.System.Drawing
从IronDrawing工具生成的AnyBitmap
文件可以导出为其他图像格式,并能够指定导出图像的损失程度。 此功能使用户能够平衡所需图像的质量与导出的图像文件大小之间的关系。
要将AnyBitmap
文件导出为其他图像格式,只需加载AnyBitmap
文件并使用.ExportFile()
方法。 该方法有3个重载,分别是导出文件名、图像格式和图像损失。 导出的图像格式可以是: