Ensure create has correct bit depth and colourspace #3139

This commit is contained in:
Lovell Fuller
2022-03-22 19:48:02 +00:00
parent b609df4b48
commit 1d36936954
6 changed files with 50 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ describe('Gaussian noise', function () {
sigma: 30
}
}
});
}).toColourspace('b-w');
noise.toFile(output, function (err, info) {
if (err) throw err;
assert.strictEqual('png', info.format);
@@ -131,6 +131,7 @@ describe('Gaussian noise', function () {
}
});
noise
.toColourspace('b-w')
.toBuffer(function (err, data, info) {
if (err) throw err;
assert.strictEqual(1, info.channels);