mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Upgrade to libvips 8.10.0-beta2
This commit is contained in:
BIN
test/fixtures/expected/conv-sobel-horizontal.jpg
vendored
BIN
test/fixtures/expected/conv-sobel-horizontal.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
BIN
test/fixtures/expected/extract.webp
vendored
BIN
test/fixtures/expected/extract.webp
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
test/fixtures/expected/tint-cmyk.jpg
vendored
BIN
test/fixtures/expected/tint-cmyk.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -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();
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user