mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-27 17:00: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}`,
|
||||
desiredScale,
|
||||
saveImageAs,
|
||||
onError
|
||||
isAlpha
|
||||
);
|
||||
});
|
||||
mainWindow.webContents.send(
|
||||
|
@ -157,7 +157,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
|
||||
outFile,
|
||||
desiredScale.toString(),
|
||||
saveImageAs,
|
||||
onError
|
||||
isAlpha
|
||||
);
|
||||
mainWindow.setProgressBar(-1);
|
||||
mainWindow.webContents.send(
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user