Ensure 16-bit+alpha input images work with vips_premultiply #301

Improves SVG support as *magick serves these as 16-bit

Add automated tests for SVG and 16-bit+alpha PNG inputs
This commit is contained in:
Lovell Fuller
2015-11-21 20:21:34 +00:00
parent c9ecc7a517
commit 05dd191e17
7 changed files with 46 additions and 9 deletions

5
test/unit/io.js Executable file → Normal file
View File

@@ -638,16 +638,17 @@ describe('Input/output', function() {
sharp(fixtures.inputSvg)
.resize(100, 100)
.toFormat('png')
.toFile(fixtures.path('output.svg.png'), function(err, info) {
.toBuffer(function(err, data, info) {
if (err) {
assert.strictEqual(0, err.message.indexOf('Input file is of an unsupported image format'));
done();
} else {
assert.strictEqual(true, info.size > 0);
assert.strictEqual('png', info.format);
assert.strictEqual(100, info.width);
assert.strictEqual(100, info.height);
fixtures.assertSimilar(fixtures.expected('svg.png'), data, done);
}
done();
});
});
}