mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Support composite op with non-sRGB pipeline colourspace (#4412)
This commit is contained in:
committed by
GitHub
parent
91f1b58f31
commit
4d1f7e051d
@@ -122,6 +122,26 @@ describe('composite', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('scrgb pipeline', () => {
|
||||
const filename = 'composite-red-scrgb.png';
|
||||
const actual = fixtures.path(`output.${filename}`);
|
||||
const expected = fixtures.expected(filename);
|
||||
return sharp({
|
||||
create: {
|
||||
width: 32, height: 32, channels: 4, background: red
|
||||
}
|
||||
})
|
||||
.pipelineColourspace('scrgb')
|
||||
.composite([{
|
||||
input: fixtures.inputPngWithTransparency16bit,
|
||||
blend: 'color-burn'
|
||||
}])
|
||||
.toFile(actual)
|
||||
.then(() => {
|
||||
fixtures.assertMaxColourDistance(actual, expected);
|
||||
});
|
||||
});
|
||||
|
||||
it('multiple', async () => {
|
||||
const filename = 'composite-multiple.png';
|
||||
const actual = fixtures.path(`output.${filename}`);
|
||||
|
||||
Reference in New Issue
Block a user