mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-28 01:10:52 +01:00
Fix #653
This commit is contained in:
parent
ef7b2dd3e3
commit
00099928fb
@ -155,7 +155,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
|
|||||||
)}.${saveImageAs}`,
|
)}.${saveImageAs}`,
|
||||||
desiredScale,
|
desiredScale,
|
||||||
saveImageAs,
|
saveImageAs,
|
||||||
onError
|
isAlpha
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
mainWindow.webContents.send(
|
mainWindow.webContents.send(
|
||||||
|
@ -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(
|
||||||
|
@ -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(
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user