mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
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:
5
test/unit/io.js
Executable file → Normal file
5
test/unit/io.js
Executable file → Normal 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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user