Skip to content

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

Fix PNG to JPG convert issue

Nayam Amarshedf9ff7de2786
diff --git a/electron/commands/double-upscayl.ts b/electron/commands/double-upscayl.ts
index 9974a34..1f9630a 100644
--- a/electron/commands/double-upscayl.ts
+++ b/electron/commands/double-upscayl.ts
@@ -161,6 +161,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
outFile,
desiredScale.toString(),
saveImageAs,
+ isAlpha,
);
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(
diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts
index 2d2fe64..a18a088 100644
--- a/electron/commands/image-upscayl.ts
+++ b/electron/commands/image-upscayl.ts
@@ -176,6 +176,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
outFile,
desiredScale,
saveImageAs,
+ isAlpha,
);
if (isAlpha && saveImageAs === "jpg") {
fs.unlinkSync(outFile + ".png");
diff --git a/electron/utils/get-arguments.ts b/electron/utils/get-arguments.ts
index 0f90c6a..8f4e1f1 100644
--- a/electron/utils/get-arguments.ts
+++ b/electron/utils/get-arguments.ts
@@ -10,7 +10,7 @@ export const getSingleImageArguments = (
model: string,
scale: any,
gpuId: string,
- saveImageAs: ImageFormat
+ saveImageAs: ImageFormat,
) => {
return [
"-i",
@@ -38,7 +38,7 @@ export const getSingleImageSharpenArguments = (
model: string,
scale: any,
gpuId: string,
- saveImageAs: ImageFormat
+ saveImageAs: ImageFormat,
) => {
return [
"-i",
@@ -65,7 +65,7 @@ export const getDoubleUpscaleArguments = (
model: string,
gpuId: string,
saveImageAs: ImageFormat,
- scale: string
+ scale: string,
) => {
return [
"-i",
@@ -92,7 +92,7 @@ export const getDoubleUpscaleSecondPassArguments = (
model: string,
gpuId: string,
saveImageAs: ImageFormat,
- scale: string
+ scale: string,
) => {
return [
"-i",
@@ -107,7 +107,7 @@ export const getDoubleUpscaleSecondPassArguments = (
model,
gpuId ? "-g" : "",
gpuId ? gpuId : "",
- "-f",
+ isAlpha ? "" : "-f",
isAlpha ? "" : saveImageAs,
];
};
@@ -119,7 +119,7 @@ export const getBatchArguments = (
model: string,
gpuId: string,
saveImageAs: ImageFormat,
- scale: string
+ scale: string,
) => {
return [
"-i",
diff --git a/package.json b/package.json
index 25fa949..fe8aa85 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "upscayl",
"private": true,
- "version": "2.9.9",
+ "version": "2.10.0",
"productName": "Upscayl",
"author": {
"name": "Nayam Amarshe",
@@ -55,7 +55,7 @@
"dist:mac": "tsc && npm run build && electron-builder --mac --universal",
"dist:mac-arm64": "tsc && npm run build && electron-builder --mac --arm64",
"dist:mas": "npm run enable-store && tsc && npm run build && electron-builder --mac mas --universal -c mas.json && npm run disable-store",
- "dist:mas-dev": "tsc && npm run build && electron-builder --mac mas-dev --universal -c mas-dev.json",
+ "dist:mas-dev": "npm run enable-store && tsc && npm run build && electron-builder --mac mas-dev --universal -c mas-dev.json && npm run disable-store",
"dist:win": "tsc && npm run build && electron-builder --win",
"dist:linux": "tsc && npm run build && electron-builder --linux",
"publish-app": "tsc && npm run build && electron-builder -wlm --publish always",