Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

perf: skip canvasNeedsTransparency pixel scan for file exports

ManthanNimodiyad9680f7362e2
diff --git a/apps/desktop/src/routes/screenshot-editor/useScreenshotExport.ts b/apps/desktop/src/routes/screenshot-editor/useScreenshotExport.ts
index 072ace445..dad984452 100644
--- a/apps/desktop/src/routes/screenshot-editor/useScreenshotExport.ts
+++ b/apps/desktop/src/routes/screenshot-editor/useScreenshotExport.ts
@@ -180,7 +180,10 @@ export function useScreenshotExport() {
toast.loading("Preparing upload", { id: toastId });
}
- const needsAlpha = canvasNeedsTransparency(outputCanvas, project);
+ const needsAlpha =
+ destination === "share" || destination === "clipboard"
+ ? canvasNeedsTransparency(outputCanvas, project)
+ : false;
const blobCanvas =
destination === "clipboard" && !needsAlpha
? withWhiteBackground(outputCanvas)