From 9b401f6ea3aa99f83c6a18f4a691ea90fa36314c Mon Sep 17 00:00:00 2001 From: Antonio Della Fortuna <50418432+adarkforce@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:41:10 +0100 Subject: [PATCH] fix: fixed image transparency by adding alpha option to preserve image alpha channel (#8895) added alpha option to preserve image alpha channel --- packages/excalidraw/data/blob.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/excalidraw/data/blob.ts b/packages/excalidraw/data/blob.ts index 69a62cda5..d19107a22 100644 --- a/packages/excalidraw/data/blob.ts +++ b/packages/excalidraw/data/blob.ts @@ -329,7 +329,7 @@ export const resizeImageFile = async ( } return new File( - [await reduce.toBlob(file, { max: opts.maxWidthOrHeight })], + [await reduce.toBlob(file, { max: opts.maxWidthOrHeight, alpha: true })], file.name, { type: opts.outputType || file.type,