Skip to content

Commit 7d78c4c

Browse files
authored
Remove RGBA24 format (#31)
`RGBA24` format doesn't exists, so `node-canvas` uses its default `RGBA32` instead, that's in fact what's being expected by `i420ToRgba` and `rgbaToI420` functions anyway.
1 parent f151519 commit 7d78c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/video-compositing/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function beforeOffer(peerConnection) {
2525

2626
// TODO(mroberts): Is pixelFormat really necessary?
2727
const canvas = createCanvas(width, height);
28-
const context = canvas.getContext('2d', { pixelFormat: 'RGBA24' });
28+
const context = canvas.getContext('2d');
2929
context.fillStyle = 'white';
3030
context.fillRect(0, 0, width, height);
3131

@@ -34,7 +34,7 @@ function beforeOffer(peerConnection) {
3434
const interval = setInterval(() => {
3535
if (lastFrame) {
3636
const lastFrameCanvas = createCanvas(lastFrame.width, lastFrame.height);
37-
const lastFrameContext = lastFrameCanvas.getContext('2d', { pixelFormat: 'RGBA24' });
37+
const lastFrameContext = lastFrameCanvas.getContext('2d');
3838

3939
const rgba = new Uint8ClampedArray(lastFrame.width * lastFrame.height * 4);
4040
const rgbaFrame = createImageData(rgba, lastFrame.width, lastFrame.height);

0 commit comments

Comments
 (0)