From 437eb9685a2a5074cb661906d210848379ce6933 Mon Sep 17 00:00:00 2001 From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com> Date: Sat, 14 Oct 2023 14:18:14 +0530 Subject: [PATCH] Skip conversion for png 4x --- electron/utils/convert-and-scale.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electron/utils/convert-and-scale.ts b/electron/utils/convert-and-scale.ts index c81e902..f2fcbdb 100644 --- a/electron/utils/convert-and-scale.ts +++ b/electron/utils/convert-and-scale.ts @@ -12,6 +12,10 @@ const convertAndScale = async ( saveImageAs: string, onError: (error: any) => void ) => { + if (saveImageAs === "png" && scale === "4" && compression === 0) { + logit("Skipping png compression for 4x scale"); + return; + } const mainWindow = getMainWindow(); const originalImage = await sharp(originalImagePath).metadata();