Skip to content

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

Update #499

Nayam Amarshe161c3102dab7
diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts
index 6b9ff93..624d62a 100644
--- a/electron/commands/image-upscayl.ts
+++ b/electron/commands/image-upscayl.ts
@@ -170,7 +170,10 @@ const imageUpscayl = async (event, payload) => {
saveImageAs,
onError
);
- if (saveImageAs === "jpg") fs.unlinkSync(outFile);
+ // Remove the png file (default) if the saveImageAs is not png
+ if (saveImageAs !== "png") {
+ fs.unlinkSync(outFile.slice(0, -3) + "png");
+ }
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(
COMMAND.UPSCAYL_DONE,