mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Use imageSmoothingQuality high when doing canvas-based resizes
This commit is contained in:
+1
-1
@@ -1989,7 +1989,7 @@ export class CanvasSink {
|
|||||||
}) as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
|
}) as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
|
||||||
assert(context);
|
assert(context);
|
||||||
|
|
||||||
context.resetTransform();
|
context.imageSmoothingQuality = 'high';
|
||||||
|
|
||||||
if (!canvasIsNew) {
|
if (!canvasIsNew) {
|
||||||
if (!this._alpha && isFirefox()) {
|
if (!this._alpha && isFirefox()) {
|
||||||
|
|||||||
@@ -1546,6 +1546,8 @@ export class VideoSample implements Disposable {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.imageSmoothingQuality = 'high';
|
||||||
|
|
||||||
if (description.alpha === 'discard') {
|
if (description.alpha === 'discard') {
|
||||||
context.fillStyle = 'black';
|
context.fillStyle = 'black';
|
||||||
context.fillRect(0, 0, description.width, description.height);
|
context.fillRect(0, 0, description.width, description.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user