AI转Jpg
Contents
[
Hide
]
Aspose.PSD是一款PSD格式的SDK,也能将AI文件转换为Jpg。您可以将Adobe Illustrator文件转换为Jpg文件。要导出Ai,您需要使用以下代码片段:
以下提供的示例代码演示了如何使用文件格式操作API将AI文件导出为Jpg:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
{ | |
@"34992OStroke", | |
@"rect2_color", | |
}; | |
for (int i = 0; i < sourcesFiles.Length; i++) | |
{ | |
string name = sourcesFiles[i]; | |
string sourceFileName = dataDir + name + ".ai"; | |
string outFileName = dataDir + name + ".jpg"; | |
using (AiImage image = (AiImage)Image.Load(sourceFileName)) | |
{ | |
ImageOptionsBase options = new JpegOptions() { Quality = 85 }; | |
image.Save(outFileName, options); | |
} | |
} |
您可以指定Jpeg文件格式的质量,Jpeg允许的有损误差。
这里有导出为Jpeg的示例:
使用不同路径权重导出Ai | 带有复杂轮廓示例的Ai转换 |
---|---|
|