Browse Source

fix: fixed image transparency by adding alpha option to preserve image alpha channel (#8895)

added alpha option to preserve image alpha channel
Antonio Della Fortuna 8 months ago
parent
commit
9b401f6ea3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/excalidraw/data/blob.ts

+ 1 - 1
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,