1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-19 01:24:09 +01:00

Skip conversion for png 4x

This commit is contained in:
Nayam Amarshe 2023-10-14 14:18:14 +05:30
parent 9a58f2d2aa
commit 437eb9685a

View File

@ -12,6 +12,10 @@ const convertAndScale = async (
saveImageAs: string,
onError: (error: any) => void
) => {
if (saveImageAs === "png" && scale === "4" && compression === 0) {
logit("Skipping png compression for 4x scale");
return;
}
const mainWindow = getMainWindow();
const originalImage = await sharp(originalImagePath).metadata();