3DS Drawings
Contents
[
Hide
]Exporting 3DS Format To PNG
Aspose.CAD for Javascript in Angular allows developers to export an 3DS file to PNG format. 3DS to PNG conversion approach works as follows:
- Load 3DS drawing file using the Image.load method.
- Call Image.save while passing an object of PngOptions as the second parameter.
Sample Code
The code below shows how to achieve the same goal using Aspose.CAD for JavaScript
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
async onFileSelected(event) { | |
const file: File = event.target.files[0]; //file.3ds | |
file.arrayBuffer().then(async buff => { | |
let x = new Uint8Array(buff); | |
this.imgFile = await Image.load(x); | |
var exportedFile = await Image.save(this.imgFile, new PngOptions()); | |
var blob = new Blob([exportedFile], { type: 'application/octet-stream' }); | |
}); | |
} |