Add failing composite test for autoOrient

This commit is contained in:
Don Denton 2024-07-13 00:04:58 -04:00
parent ae43f0f613
commit 6261f412ff
2 changed files with 15 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -138,6 +138,21 @@ describe('composite', () => {
fixtures.assertMaxColourDistance(actual, expected); 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 => { it('zero offset', done => {
sharp(fixtures.inputJpg) sharp(fixtures.inputJpg)
.resize(80) .resize(80)