mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Allow override of EXIF Orientation tag #189
Clear Orientation when rotate/flip/flop are used
This commit is contained in:
@@ -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});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user