1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-31 12:13:43 +01:00

Fix PNG to JPG convert issue

This commit is contained in:
Nayam Amarshe 2024-02-14 11:30:39 +05:30
parent 810d25b35c
commit df9ff7de27
4 changed files with 10 additions and 8 deletions

View File

@ -161,6 +161,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
outFile, outFile,
desiredScale.toString(), desiredScale.toString(),
saveImageAs, saveImageAs,
isAlpha,
); );
mainWindow.setProgressBar(-1); mainWindow.setProgressBar(-1);
mainWindow.webContents.send( mainWindow.webContents.send(

View File

@ -176,6 +176,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
outFile, outFile,
desiredScale, desiredScale,
saveImageAs, saveImageAs,
isAlpha,
); );
if (isAlpha && saveImageAs === "jpg") { if (isAlpha && saveImageAs === "jpg") {
fs.unlinkSync(outFile + ".png"); fs.unlinkSync(outFile + ".png");

View File

@ -10,7 +10,7 @@ export const getSingleImageArguments = (
model: string, model: string,
scale: any, scale: any,
gpuId: string, gpuId: string,
saveImageAs: ImageFormat saveImageAs: ImageFormat,
) => { ) => {
return [ return [
"-i", "-i",
@ -38,7 +38,7 @@ export const getSingleImageSharpenArguments = (
model: string, model: string,
scale: any, scale: any,
gpuId: string, gpuId: string,
saveImageAs: ImageFormat saveImageAs: ImageFormat,
) => { ) => {
return [ return [
"-i", "-i",
@ -65,7 +65,7 @@ export const getDoubleUpscaleArguments = (
model: string, model: string,
gpuId: string, gpuId: string,
saveImageAs: ImageFormat, saveImageAs: ImageFormat,
scale: string scale: string,
) => { ) => {
return [ return [
"-i", "-i",
@ -92,7 +92,7 @@ export const getDoubleUpscaleSecondPassArguments = (
model: string, model: string,
gpuId: string, gpuId: string,
saveImageAs: ImageFormat, saveImageAs: ImageFormat,
scale: string scale: string,
) => { ) => {
return [ return [
"-i", "-i",
@ -107,7 +107,7 @@ export const getDoubleUpscaleSecondPassArguments = (
model, model,
gpuId ? "-g" : "", gpuId ? "-g" : "",
gpuId ? gpuId : "", gpuId ? gpuId : "",
"-f", isAlpha ? "" : "-f",
isAlpha ? "" : saveImageAs, isAlpha ? "" : saveImageAs,
]; ];
}; };
@ -119,7 +119,7 @@ export const getBatchArguments = (
model: string, model: string,
gpuId: string, gpuId: string,
saveImageAs: ImageFormat, saveImageAs: ImageFormat,
scale: string scale: string,
) => { ) => {
return [ return [
"-i", "-i",

View File

@ -1,7 +1,7 @@
{ {
"name": "upscayl", "name": "upscayl",
"private": true, "private": true,
"version": "2.9.9", "version": "2.10.0",
"productName": "Upscayl", "productName": "Upscayl",
"author": { "author": {
"name": "Nayam Amarshe", "name": "Nayam Amarshe",
@ -55,7 +55,7 @@
"dist:mac": "tsc && npm run build && electron-builder --mac --universal", "dist:mac": "tsc && npm run build && electron-builder --mac --universal",
"dist:mac-arm64": "tsc && npm run build && electron-builder --mac --arm64", "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": "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:win": "tsc && npm run build && electron-builder --win",
"dist:linux": "tsc && npm run build && electron-builder --linux", "dist:linux": "tsc && npm run build && electron-builder --linux",
"publish-app": "tsc && npm run build && electron-builder -wlm --publish always", "publish-app": "tsc && npm run build && electron-builder -wlm --publish always",