GIF
JPG
PDF
XML
STL
GIF
แปลง STL เป็น GIF ผ่าน Java
Native Java Library สำหรับอ่าน เขียน และส่งออก STL เป็น GIF โดยไม่ต้องใช้ Adobe
วิธีแปลง STL เป็น GIF โดยใช้ Java
ในการแสดง STL เป็น GIF เราจะใช้ API ของ Aspose.CAD for Java ซึ่งเป็นคุณลักษณะที่หลากหลาย มีประสิทธิภาพ และใช้งานง่าย เพื่อใช้ Conversion API สำหรับแพลตฟอร์ม Java คุณสามารถดาวน์โหลดเวอร์ชันล่าสุดได้โดยตรงจาก Maven และ ติดตั้งภายในโปรเจ็กต์ที่ใช้ Maven โดยเพิ่มการกำหนดค่าต่อไปนี้ใน pom.xml
ที่เก็บ
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>
การพึ่งพา
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cad</artifactId>
<version>version of aspose-cad API</version>
<classifier>jdk17</classifier>
</dependency>
ขั้นตอนในการแปลง STL เป็น GIF ผ่าน Java
- โหลดไฟล์ STL ด้วยวิธี Image.load
- ตั้งค่าวัตถุของ CadRasterizationOptions ด้วยความสูง & ความกว้างของหน้า
- สร้างอินสแตนซ์ของคลาส GifOptions และตั้งค่าคุณสมบัติ VectorRasterizationOptions
- เรียกเมธอด Image.save ขณะส่งพาธไฟล์ผลลัพธ์ & ออบเจ็กต์ของ GifOptions
ข้อกำหนดการแปลง
- Microsoft Windows หรือ OS ที่เข้ากันได้กับ Java Runtime Environment สำหรับแอปพลิเคชัน JSP/JSF และแอปพลิเคชันเดสก์ท็อป - รับ Aspose.CAD เวอร์ชันล่าสุดสำหรับ Java โดยตรงจาก MavenSTL เป็น GIF Java Conversion Source Code
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 STL in an instance of Image via its Load method | |
Image image = Image.load("template.stl"); | |
// create an instance of CadRasterizationOptions and set page height & width | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.setPageWidth(1600); | |
rasterizationOptions.setPageHeight(1600); | |
// create an instance of GifOptions | |
TiffOptions options = new TiffOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.setVectorRasterizationOptions(rasterizationOptions); | |
// export STL to GIF | |
image.save("output.gif", options); |
แอพฟรีเพื่อแปลง STL เป็น GIF
Convert STL to GIF right now by visiting our Live Demos website.The live demo has the following benefits
No need to download Aspose API.
No need to write any code.
Just upload your STL file, it will be converted instantly to GIF.
You will get the download link.