1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-27 17:00: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}`,
desiredScale,
saveImageAs,
onError
isAlpha
);
});
mainWindow.webContents.send(

View File

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

View File

@ -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(

View File

@ -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;