IGES Çizimleri
Contents
[
Hide
]IGES Formatını PNG’ye Aktarma
Aspose.CAD for Javascript in Angular, geliştiricilerin bir IGES dosyasını PNG formatına aktarmasına olanak tanır. IGES dosyasının PNG formatına dönüştürülmesi yaklaşımı şu şekilde çalışır:
- Image.load yöntemini kullanarak IGES çizim dosyasını yükleyin.
- İkinci parametre olarak PngOptions nesnesini geçirerek Image.save çağrısı yapın.
Örnek Kod
Aşağıdaki kod, Aspose.CAD for JavaScript kullanarak aynı sonuca nasıl ulaşılacağını göstermektedir.
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.igs | |
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' }); | |
}); | |
} |