COLLADA Drawings

Exporting COLLADA Format To PNG

Aspose.CAD for Javascript in Angular allows developers to export an COLLADA file to PNG format. COLLADA to PNG conversion approach works as follows:

  1. Load COLLADA drawing file using the Image.load method.
  2. 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

async onFileSelected(event) {
const file: File = event.target.files[0]; //file.dae
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' });
});
}