For more details, please visit Convert IFC to JPG or PNG Image using C#
Last active
December 23, 2021 05:37
-
-
Save aspose-com-gists/f68d1eac04052152a08d37e7f4df87bb to your computer and use it in GitHub Desktop.
Convert IFC to JPG or PNG Image Programmatically using C# .NET
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 input IFC file using the Image class | |
Image image = Image.Load("template.ifc"); | |
// Create an instance of CadRasterizationOptions class | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions() | |
{ | |
// Set the height & width | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// Create an object of JpegOptions | |
JpegOptions options = new JpegOptions(); | |
// Set the VectorRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// Convert IFC to JPG image | |
image.Save("output.jpg", options); |
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 input IFC file using the Image class | |
Image image = Image.Load("template.ifc"); | |
// Create an instance of CadRasterizationOptions class | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions() | |
{ | |
// Set the height & width | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// Create an object of PngOptions | |
PngOptions options = new PngOptions(); | |
// Set the VectorRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// Convert IFC to PNG image | |
image.Save("output.png", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment