IFC 도면
Contents
[
Hide
]IFC 형식을 PNG로 내보내기
Aspose.CAD for Java는 개발자가 IFC 파일을 PNG로 내보낼 수 있도록 합니다. 다음은 IFC 파일에 접근하고 이를 CadRasterizationOptions와 PngOptions를 사용하여 PNG로 변환하는 코드를 보여줍니다.
샘플 코드
This file contains hidden or 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
String fileName = dataDir +"example.ifc"; | |
IfcImage cadImage = (IfcImage)Image.load(fileName); | |
CadRasterizationOptions vectorOptions = new CadRasterizationOptions(); | |
vectorOptions.setPageWidth(1500); | |
vectorOptions.setPageHeight(1500); | |
PngOptions pngOptions = new PngOptions(); | |
pngOptions.setVectorRasterizationOptions(vectorOptions); | |
String outPath = dataDir + "example.png"; | |
cadImage.save(dataDir, pngOptions); | |