Add support for OME-TIFF subIFDs #2557

This commit is contained in:
Lovell Fuller
2021-04-02 08:04:21 +01:00
parent 8c33d0aa56
commit 43a085d1ae
10 changed files with 52 additions and 4 deletions

View File

@@ -718,6 +718,19 @@ describe('Input/output', function () {
sharp({ level: -1 });
}, /Expected integer between 0 and 256 for level but received -1 of type number/);
});
it('Valid subifd property', function () {
sharp({ subifd: 1 });
});
it('Invalid subifd property (string) throws', function () {
assert.throws(function () {
sharp({ subifd: '1' });
}, /Expected integer between -1 and 100000 for subifd but received 1 of type string/);
});
it('Invalid subifd property (float) throws', function () {
assert.throws(function () {
sharp({ subifd: 1.2 });
}, /Expected integer between -1 and 100000 for subifd but received 1.2 of type number/);
});
});
describe('create new image', function () {