Dibujos FBX
Contents
[
Hide
]Exportar formato FBX a PNG
Aspose.CAD para Javascript en Angular permite a los desarrolladores exportar un archivo FBX a formato PNG. El enfoque de conversión de FBX a PNG funciona de la siguiente manera:
- Cargar el archivo de dibujo FBX utilizando el método Image.load.
- Llamar a Image.save pasando un objeto de PngOptions como segundo parámetro.
Código de muestra
El código a continuación muestra cómo lograr el mismo objetivo usando Aspose.CAD para JavaScript
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
async onFileSelected(event) { | |
const file: File = event.target.files[0]; //file.fbx | |
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' }); | |
}); | |
} |