Skip to content

πŸ†™ Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

Fix #646

Nayam Amarshefed423f73f32
diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts
index 7656937..2d2fe64 100644
--- a/electron/commands/image-upscayl.ts
+++ b/electron/commands/image-upscayl.ts
@@ -177,17 +177,9 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
desiredScale,
saveImageAs,
);
- // Remove the png file (default) if the saveImageAs is not png
- // fs.access(
- // removeFileExtension(outFile) + ".png",
- // fs.constants.F_OK,
- // (err) => {
- // if (!err && saveImageAs !== "png") {
- // logit("πŸ—‘ Removing png file");
- // fs.unlinkSync(removeFileExtension(outFile) + ".png");
- // }
- // }
- // );
+ if (isAlpha && saveImageAs === "jpg") {
+ fs.unlinkSync(outFile + ".png");
+ }
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(
COMMAND.UPSCAYL_DONE,