gif图片不可以解析吗?
var fs=require('fs'); fs.readFile("tupian.gif",function (err,origin_buffer) { console.log(Buffer.isBuffer(origin_buffer)) fs.writeFile("tupian_buffer.gif",origin_buffer,function (err) { if(err)console.log(err) }) var base64Image=origin_buffer.toString("base64") console.log(base64Image) var decodedImage=new Buffer(base64Image,'base64') console.log(Buffer.compare(origin_buffer,decodedImage)) fs.writeFile("tupian_buffers.gif",decodedImage,function (err) { if(err)console.log(err) }) })