1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-28 01:10:52 +01:00
This commit is contained in:
Nayam Amarshe 2024-01-23 15:00:08 +05:30
parent ef7b2dd3e3
commit 00099928fb
4 changed files with 6 additions and 6 deletions

View File

@ -155,7 +155,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
)}.${saveImageAs}`, )}.${saveImageAs}`,
desiredScale, desiredScale,
saveImageAs, saveImageAs,
onError isAlpha
); );
}); });
mainWindow.webContents.send( mainWindow.webContents.send(

View File

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

View File

@ -172,7 +172,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
outFile, outFile,
desiredScale, desiredScale,
saveImageAs, saveImageAs,
onError isAlpha
); );
// Remove the png file (default) if the saveImageAs is not png // Remove the png file (default) if the saveImageAs is not png
// fs.access( // fs.access(

View File

@ -10,10 +10,10 @@ const convertAndScale = async (
processedImagePath: string, processedImagePath: string,
scale: string, scale: string,
saveImageAs: ImageFormat, saveImageAs: ImageFormat,
onError: (error: any) => void isAlpha: boolean
) => { ) => {
if (scale === "4" && compression === 0) { if (!isAlpha && scale === "4" && compression === 0) {
logit("Skipping png compression for 4x scale and 0% compression"); logit("Skipping compression for 4x scale and 0% compression");
return; return;
} }
let originalImage: Metadata | undefined; let originalImage: Metadata | undefined;