Deprecate background, add op-specific prop to resize/extend/flatten #1392

This commit is contained in:
Lovell Fuller
2018-10-01 20:58:55 +01:00
parent 6007e13a22
commit a64844689e
17 changed files with 378 additions and 296 deletions

View File

@@ -69,8 +69,10 @@ describe('Colour space conversion', function () {
it('From CMYK to sRGB with white background, not yellow', function (done) {
sharp(fixtures.inputJpgWithCmykProfile)
.resize(320, 240, { fit: sharp.fit.contain })
.background('white')
.resize(320, 240, {
fit: sharp.fit.contain,
background: 'white'
})
.toBuffer(function (err, data, info) {
if (err) throw err;
assert.strictEqual('jpeg', info.format);