Gawea piranti lunak pangolahan TIFF ing Node.js nggunakake TIFF Optimization API. Solusi Node.js sing kuat iki mbantu sampeyan ngoptimalake lan nyuda ukuran file TIFF kanthi gampang. Uji kemampuan kompres TIFF kanthi online kanthi gratis!
Nggawe file TIFF gedhe luwih cilik tanpa mundhut kualitas. Mbusak data sing ora perlu lan ora digunakake. Nyilikake ukuran file TIFF ing kode. Pustaka JavaScript nyedhiyakake pangembang API terpadu kanggo ngoptimalake isi TIFF.
Perpustakaan JavaScript minangka solusi mandiri lan ora mbutuhake piranti lunak pihak katelu sing diinstal.
Kompresi lossless lan optimasi isi jero digawe gampang karo 'Aspose.Words for Node.js via .NET'. Conto ing ngisor iki nuduhake carane ngoptimalake isi file TIFF ing JavaScript:
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
shape = builder.insertImage("Input.tiff")
var saveOptions = new aw.Saving.ImageSaveOptions(aw.SaveFormat.Tiff)
saveOptions.tiffCompression = aw.Saving.TiffCompression.Lzw
shape.getShapeRenderer().save("Output.tiff", saveOptions)
const aw = require('@aspose/words');
var doc = new aw.Document("Input.tiff");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// Iku nganti pangembang kanggo milih perpustakaan kanggo komprèsi gambar.
const imageData = shape.getImageData().toStream();
// ...
// Ngompres gambar lan nyetel maneh menyang wangun.
shape.getImageData().setImage(compressedImageBuffer);
}
}
var saveOptions = new aw.Saving.PdfSaveOptions()
saveOptions.cacheBackgroundGraphics = true
doc.save("Output.tiff", saveOptions)
const aw = require('@aspose/words');
var doc = new aw.Document("Input.tiff");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// Iku nganti pangembang kanggo milih perpustakaan kanggo komprèsi gambar.
const imageData = shape.getImageData().toStream();
// ...
// Ngompres gambar lan nyetel maneh menyang wangun.
shape.getImageData().setImage(compressedImageBuffer);
}
}
doc.save("Output.tiff")
const aw = require('@aspose/words');
var doc = new aw.Document("Input.tiff");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// Iku nganti pangembang kanggo milih perpustakaan kanggo komprèsi gambar.
const imageData = shape.getImageData().toStream();
// ...
// Ngompres gambar lan nyetel maneh menyang wangun.
shape.getImageData().setImage(compressedImageBuffer);
}
}
var saveOptions = new aw.Saving.OoxmlSaveOptions()
saveOptions.compressionLevel = aw.Saving.CompressionLevel.Maximum
doc.save("Output.tiff", saveOptions)
const aw = require('@aspose/words');
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
shape = builder.insertImage("Input.tiff")
var saveOptions = new aw.Saving.ImageSaveOptions(aw.SaveFormat.Tiff)
saveOptions.tiffCompression = aw.Saving.TiffCompression.Lzw
shape.getShapeRenderer().save("Output.tiff", saveOptions)
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 ngoptimalake file ing akeh format file liyane: