mirror of
https://github.com/lovell/sharp.git
synced 2025-07-27 01:52:27 +02:00
Add failing composite test for autoOrient
This commit is contained in:
parent
ae43f0f613
commit
6261f412ff
BIN
test/fixtures/expected/composite-autoOrient.jpg
vendored
Normal file
BIN
test/fixtures/expected/composite-autoOrient.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
@ -138,6 +138,21 @@ describe('composite', () => {
|
||||
fixtures.assertMaxColourDistance(actual, expected);
|
||||
});
|
||||
|
||||
it('autoOrient', (done) => {
|
||||
const filename = 'composite-autoOrient.jpg';
|
||||
const exifImg = fixtures.inputJpgWithExif;
|
||||
const actual = fixtures.path(`output.${filename}`);
|
||||
const expected = fixtures.expected(filename);
|
||||
sharp({ create: { width: 600, height: 600, channels: 4, background: { ...red, alpha: 1 } } })
|
||||
.composite([{
|
||||
input: exifImg,
|
||||
autoOrient: true
|
||||
}])
|
||||
.toFile(actual).then(() => {
|
||||
fixtures.assertSimilar(actual, expected, done);
|
||||
});
|
||||
});
|
||||
|
||||
it('zero offset', done => {
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(80)
|
||||
|
Loading…
x
Reference in New Issue
Block a user