소스 검색

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 9 달 전
부모
커밋
9b401f6ea3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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,