Resize PNG images correctly

This commit is contained in:
Thaddee Tyl 2017-01-29 17:53:25 +01:00
parent 8dccc153cf
commit eb74626f52

View File

@ -17,6 +17,7 @@ module.exports = function (svg, format, out, cb) {
var buf = new Buffer('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + svg);
var stream = imageMagick(buf, 'image.' + format)
.density(90)
.background(format === 'jpg' ? '#FFFFFF' : 'none')
.flatten()
.stream(format, function (err, stdout, stderr) {