mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: fix new colorSpace spec
This commit is contained in:
@@ -448,8 +448,8 @@ describe('nativeImage module', () => {
|
||||
it('toBitmap() accepts a colorSpace option', () => {
|
||||
const image = nativeImage.createFromPath(imageColorSpaceP3.path);
|
||||
|
||||
const srgbBuf = image.toBitmap({ colorSpace: { primaries: 'bt709', transferFunction: 'iec61966-2-1', matrix: 'rgb', range: 'full' } });
|
||||
const p3Buf = image.toBitmap({ colorSpace: { primaries: 'smptest432-1', transferFunction: 'iec61966-2-1', matrix: 'rgb', range: 'full' } });
|
||||
const srgbBuf = image.toBitmap({ colorSpace: { primaries: 'bt709', transfer: 'srgb', matrix: 'rgb', range: 'full' } });
|
||||
const p3Buf = image.toBitmap({ colorSpace: { primaries: 'p3', transfer: 'srgb', matrix: 'rgb', range: 'full' } });
|
||||
|
||||
// Both should produce valid buffers of the same size (same pixel dimensions)
|
||||
expect(srgbBuf.length).to.be.greaterThan(0);
|
||||
|
||||
Reference in New Issue
Block a user