Allow override of EXIF Orientation tag #189

Clear Orientation when rotate/flip/flop are used
This commit is contained in:
Lovell Fuller
2015-07-13 20:00:33 +01:00
parent 642e5687b6
commit d303703dc5
7 changed files with 130 additions and 11 deletions

View File

@@ -312,4 +312,21 @@ describe('Image metadata', function() {
});
});
describe('Invalid withMetadata parameters', function() {
it('String orientation', function() {
assert.throws(function() {
sharp().withMetadata({orientation: 'zoinks'});
});
});
it('Negative orientation', function() {
assert.throws(function() {
sharp().withMetadata({orientation: -1});
});
});
it('Too large orientation', function() {
assert.throws(function() {
sharp().withMetadata({orientation: 8});
});
});
});
});