Skip to content

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

Fix #653

Nayam Amarshe00099928fb63
diff --git a/electron/commands/batch-upscayl.ts b/electron/commands/batch-upscayl.ts
index 5ebe145..df099b5 100644
--- a/electron/commands/batch-upscayl.ts
+++ b/electron/commands/batch-upscayl.ts
@@ -155,7 +155,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
)}.${saveImageAs}`,
desiredScale,
saveImageAs,
- onError
+ isAlpha
);
});
mainWindow.webContents.send(
diff --git a/electron/commands/double-upscayl.ts b/electron/commands/double-upscayl.ts
index 32815e9..7976881 100644
--- a/electron/commands/double-upscayl.ts
+++ b/electron/commands/double-upscayl.ts
@@ -157,7 +157,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
outFile,
desiredScale.toString(),
saveImageAs,
- onError
+ isAlpha
);
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(
diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts
index 6cc3a5f..b4560bc 100644
--- a/electron/commands/image-upscayl.ts
+++ b/electron/commands/image-upscayl.ts
@@ -172,7 +172,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
outFile,
desiredScale,
saveImageAs,
- onError
+ isAlpha
);
// Remove the png file (default) if the saveImageAs is not png
// fs.access(
diff --git a/electron/utils/convert-and-scale.ts b/electron/utils/convert-and-scale.ts
index f9f0292..cd6495d 100644
--- a/electron/utils/convert-and-scale.ts
+++ b/electron/utils/convert-and-scale.ts
@@ -10,10 +10,10 @@ const convertAndScale = async (
processedImagePath: string,
scale: string,
saveImageAs: ImageFormat,
- onError: (error: any) => void
+ isAlpha: boolean
) => {
- if (scale === "4" && compression === 0) {
- logit("Skipping png compression for 4x scale and 0% compression");
+ if (!isAlpha && scale === "4" && compression === 0) {
+ logit("Skipping compression for 4x scale and 0% compression");
return;
}
let originalImage: Metadata | undefined;