HTML
JPG
CAD
XML
OBJ
GIF
แปลง OBJ เป็น GIF ผ่าน C #
แปลง OBJ เป็น GIF ได้ทันทีโดยไม่ต้องใช้ AutoCAD® หรือซอฟต์แวร์แสดงผลอื่นๆ
ในการแปลง OBJ เป็น GIF เราจะใช้ API ของ Aspose.CAD for .NET ซึ่งเป็น API ที่มีคุณลักษณะหลากหลาย มีประสิทธิภาพ และ ง่ายต่อการใช้การจัดการเอกสารและการแปลง API สำหรับแพลตฟอร์ม C# เปิด NuGet package manager ค้นหา Aspose.CAD และติดตั้ง คุณยังสามารถใช้คำสั่งต่อไปนี้จาก Package Manager Console
คำสั่งคอนโซลตัวจัดการแพ็คเกจ
PM> Install-Package Aspose.CAD
ขั้นตอนในการแปลง OBJ เป็น GIF ผ่าน C#
- โหลดไฟล์ OBJ ด้วย Image.Load method
- ตั้งค่าวัตถุของ CadRasterizationOptions ด้วยความสูง & ความกว้างของหน้า
- สร้างอินสแตนซ์ของคลาส GifOptions และตั้งค่าคุณสมบัติ VectorRasterizationOptions
- เรียกเมธอด Image.Save ขณะส่งพาธไฟล์ผลลัพธ์ & ออบเจกต์ของ GifOptions
ข้อกำหนดการแปลง
- Microsoft Windows หรือระบบปฏิบัติการที่เข้ากันได้กับ .NET Framework, .NET Core และ PHP, VBScript, Delphi, C++ ผ่าน COM Interop
- สภาพแวดล้อมการพัฒนาเช่น Microsoft Visual Studio
- Aspose.CAD for .NET DLL ที่อ้างอิงในโครงการของคุณ
โค้ดตัวอย่างนี้แสดง OBJ ถึง GIF C# Conversion
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
// load OBJ in an instance of Image via its Load method | |
using (var image = Image.Load("template.obj")) | |
{ | |
// create an instance of CadRasterizationOptions and set page height & width | |
var rasterizationOptions = new ImageOptions.CadRasterizationOptions() | |
{ | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// create an instance of GifOptions | |
var options = new ImageOptions.GifOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// export OBJ to GIF | |
image.Save("output.gif", options); | |
} |
แอพฟรีเพื่อแปลง OBJ เป็น GIF
Check our live demos for OBJ to GIF conversion with following benefits.
No need to download or setup anything.
No need to write any code.
Just upload your OBJ file and hit the "Convert" button.
You will instantly get the download link for resultant GIF file.