Aspose.PSD は PSD フォーマットの SDK であり、AI ファイルを Jpg に変換することもできます。Adobe Illustrator ファイルを Jpg ファイルに変換できます。Ai のエクスポートには、次のコード断片を使用する必要があります。
以下に示すサンプルコードでは、AI ファイルを Jpg にエクスポートする方法を ファイルフォーマット操作 API で示しています。
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 を変換|
| :- | :- |
||
|