Ai to Jpg
Contents
[
Hide
]
Aspose.PSD is a PSD Format SDK, that also can convert AI files to Jpg. You can convert Adobe Illustrator File to Jpg file. For Ai export you need to use following code snippet:
Below provided sample code demonstrates how to export the AI file to Jpg with the File Format Manipulation 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); | |
} | |
} |
You can specify Jpeg File Format quality, Jpeg Allowed Lossy Error.
Here the example of export to Jpeg:
Export Ai with different paths weight | Convert Ai with complex contour example |
---|---|
|