我发现以下代码段可将以下网址中的tiff转换为jpeg: https://github.com/seikichi/tiff.js
它从节点js返回如下响应:
{ “ _filename”:“ 1.tiff”, “ _tiffPtr”:5410824 }
现在如何在UI端为图像标签绑定它:
var Tiff = require('tiff.js');
var fs = require('fs');
var filename = process.argv[2];
var input = fs.readFileSync(filename);
var image = new Tiff({ buffer: input });
console.log(filename + ': width = ' + image.width() + ', height = ' + image.height());
您能帮我吗?