Upgrade to libvips 8.10.0-beta2

This commit is contained in:
Lovell Fuller
2020-07-14 11:10:20 +01:00
parent ba17db3ab3
commit 3150fad909
18 changed files with 627 additions and 498 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -23,7 +23,7 @@ describe('failOnError', function () {
let isWarningEmitted = false;
sharp(fixtures.inputPngTruncated, { failOnError: false })
.on('warning', function (warning) {
assert.strictEqual('not enough data', warning);
assert.ok(warning.includes('not enough data') || warning.includes('end of stream'));
isWarningEmitted = true;
})
.resize(320, 240)
@@ -62,7 +62,7 @@ describe('failOnError', function () {
it('returns errors to callback for truncated PNG', function (done) {
sharp(fixtures.inputPngTruncated).toBuffer(function (err, data, info) {
assert.ok(err.message.includes('vipspng: libpng read error'), err);
assert.ok(err.message.includes('read error'), err);
assert.strictEqual(data, undefined);
assert.strictEqual(info, undefined);
done();

View File

@@ -116,7 +116,7 @@ describe('TIFF', function () {
sharp(fixtures.inputTiff8BitDepth)
.toColourspace('b-w') // can only squash 1 band uchar images
.tiff({
squash: false,
bitdepth: 8,
compression: 'none',
predictor: 'none'
})
@@ -133,7 +133,7 @@ describe('TIFF', function () {
sharp(fixtures.inputTiff8BitDepth)
.toColourspace('b-w') // can only squash 1 band uchar images
.tiff({
squash: true,
bitdepth: 1,
compression: 'none',
predictor: 'none'
})
@@ -145,10 +145,10 @@ describe('TIFF', function () {
});
});
it('Invalid TIFF squash value throws error', function () {
it('Invalid TIFF bitdepth value throws error', function () {
assert.throws(function () {
sharp().tiff({ squash: 'true' });
});
sharp().tiff({ bitdepth: 3 });
}, /Error: Expected 1, 2, 4 or 8 for bitdepth but received 3 of type number/);
});
it('TIFF setting xres and yres on file', () =>
@@ -255,7 +255,7 @@ describe('TIFF', function () {
sharp(fixtures.inputTiff)
.toColourspace('b-w')
.tiff({
squash: true,
bitdepth: 1,
compression: 'ccittfax4'
})
.toFile(fixtures.outputTiff, (err, info) => {