From 18451a5998564b653651700981a6d3d9720cfa9a Mon Sep 17 00:00:00 2001 From: Bryce Taylor <brycet@media.mit.edu> Date: Mon, 17 Aug 2020 14:27:03 -0400 Subject: [PATCH] Use canvas width/height for futureproofing --- src/lib/backpack/jpeg-thumbnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/backpack/jpeg-thumbnail.js b/src/lib/backpack/jpeg-thumbnail.js index bf6a4797c..687e97557 100644 --- a/src/lib/backpack/jpeg-thumbnail.js +++ b/src/lib/backpack/jpeg-thumbnail.js @@ -11,7 +11,7 @@ const jpegThumbnail = dataUrl => new Promise((resolve, reject) => { // drawImage can fail if image height/width is less than 1 // Use blank image; the costume is too small to render anyway ctx.fillStyle = 'white'; // Create white background, since jpeg doesn't have transparency - ctx.fillRect(0, 0, maxDimension, maxDimension); + ctx.fillRect(0, 0, canvas.width, canvas.height); } else { if (image.height > image.width) { canvas.height = maxDimension; -- GitLab