Compress
SvgOptions.Compress property
获取或设置一个值,该值指示是否ICompressedOptions被压缩。
public bool Compress { get; set; }
适当的价值
真的
如果压缩;否则,错误的
.
例子
以下示例显示如何将 svg 图像转换为 svgz fromat
[C#]
string file = "juanmontoya_lingerie.svg";
string baseFolder = System.IO.Path.Combine("D:", "Compressed");
string inputFile = System.IO.Path.Combine(baseFolder, file);
string outFile = inputFile + ".svgz";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFile))
{
Aspose.Imaging.ImageOptions.VectorRasterizationOptions vectorRasterizationOptions = new Aspose.Imaging.ImageOptions.SvgRasterizationOptions() { PageSize = image.Size};
image.Save(outFile, new Aspose.Imaging.ImageOptions.SvgOptions() {VectorRasterizationOptions = vectorRasterizationOptions, Compress = true});
}
也可以看看
- class SvgOptions
- 命名空间 Aspose.Imaging.ImageOptions
- 部件 Aspose.Imaging