Modern JavaScript perpustakaan ngijini Node.js via .NET gawe Ngonversi gambar kanggo SVG format gambar karo sawetara garis saka kode. gambar mesin konversi nganalisa isi asli, lan SVG gambar.
Gunakake JavaScript kanggo ngowahi gambar dadi SVG format gambar kanthi keluwesan lan kacepetan maksimal. Jalanake demo langsung online lan priksa SVG paling dhuwur ing browser. gambar Conversion API ndhukung akeh opsi migunani.
Kanggo ngowahi gambar file menyang SVG image mung nggunakake JavaScript perpustakaan sing Ngalahake kabeh rincian-tingkat kurang.
Ngonversi pirang-pirang gambar lan simpen asil dadi siji SVG gambar Yen sampeyan ngembangake kode ing JavaScript, gambar bakal luwih gampang tinimbang sing katon. Deleng JavaScript sing ngulang liwat gambar lan gabungke dadi siji SVG gambar.
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');
var fileNames = [ "Input1.png", "Input2.png" ]
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
shapes = fileNames.map(fileName => builder.insertImage(fileName))
// Ngetung jembaré maksimum lan dhuwur lan nganyari setelan kaca
// kanggo potong document pas ukuran gambar.
pageSetup = builder.pageSetup
pageSetup.pageWidth = Math.max(...shapes.map(shape => shape.width));
pageSetup.pageHeight = shapes.reduce((sum, shape) => sum + shape.height, 0);
pageSetup.topMargin = 0
pageSetup.leftMargin = 0
pageSetup.bottomMargin = 0
pageSetup.rightMargin = 0
doc.save("Output.svg")
We host our Node.js via .Net packages in NPM repositories. Please follow the step-by-step instructions on how to install "Aspose.Words for Node.js via .NET" to your developer environment.
This package is compatible with Node.js 14.17.0 or higher.
Sampeyan bisa nggabungake gambar menyang akeh format file liyane: