From ff42c0bd507bc1e8416f3cb5a87fadc5ccaae6d8 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 5 Feb 2026 20:25:36 +0100 Subject: [PATCH] Cap the max canvas dimensions in order to avoid to downscale large images in the worker (bug 2014399) --- src/core/image_resizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/image_resizer.js b/src/core/image_resizer.js index adfb476ed..9fa03205c 100644 --- a/src/core/image_resizer.js +++ b/src/core/image_resizer.js @@ -22,7 +22,7 @@ const MIN_IMAGE_DIM = 2048; // In Chrome, there aren't max dimensions but only a max area. So an image with // a very large dimensions is acceptable but it probably doesn't hurt to reduce // it when considering that it will finally rendered on a small canvas. -const MAX_IMAGE_DIM = 65537; +const MAX_IMAGE_DIM = 32768; const MAX_ERROR = 128; // Large images are encoded in using the BMP format (it's a way faster than