mirror of
https://github.com/upscayl/upscayl.git
synced 2024-09-24 11:28:25 +02:00
fixed partial image rendering
This commit is contained in:
parent
38e39243a4
commit
d16247d1d9
@ -33,15 +33,14 @@ const convertAndScale = async (
|
|||||||
}
|
}
|
||||||
// Save the image
|
// Save the image
|
||||||
const buffer = await newImage.toBuffer();
|
const buffer = await newImage.toBuffer();
|
||||||
sharp(buffer)
|
try {
|
||||||
.toFile(processedImagePath)
|
await sharp(buffer).toFile(processedImagePath);
|
||||||
.then(() => {
|
} catch (error) {
|
||||||
logit("✅ Done converting to: ", upscaledImagePath);
|
logit("❌ Error converting to: ", saveImageAs, error);
|
||||||
})
|
onError(error);
|
||||||
.catch((error) => {
|
}
|
||||||
logit("❌ Error converting to: ", saveImageAs, error);
|
|
||||||
onError(error);
|
logit("✅ Done converting to: ", upscaledImagePath);
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default convertAndScale;
|
export default convertAndScale;
|
||||||
|
@ -146,7 +146,7 @@ const Home = () => {
|
|||||||
// UPSCAYL DONE
|
// UPSCAYL DONE
|
||||||
window.electron.on(COMMAND.UPSCAYL_DONE, (_, data: string) => {
|
window.electron.on(COMMAND.UPSCAYL_DONE, (_, data: string) => {
|
||||||
setProgress("");
|
setProgress("");
|
||||||
setTimeout(() => setUpscaledImagePath(data), 500);
|
setUpscaledImagePath(data);
|
||||||
logit("upscaledImagePath: ", data);
|
logit("upscaledImagePath: ", data);
|
||||||
logit(`💯 UPSCAYL_DONE: `, data);
|
logit(`💯 UPSCAYL_DONE: `, data);
|
||||||
});
|
});
|
||||||
@ -499,7 +499,8 @@ const Home = () => {
|
|||||||
className="mb-5 rounded-btn p-1 mx-5 bg-success shadow-lg shadow-success/40 text-slate-50 animate-pulse text-sm"
|
className="mb-5 rounded-btn p-1 mx-5 bg-success shadow-lg shadow-success/40 text-slate-50 animate-pulse text-sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowCloudModal(true);
|
setShowCloudModal(true);
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
Introducing Upscayl Cloud
|
Introducing Upscayl Cloud
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
@ -557,7 +558,8 @@ const Home = () => {
|
|||||||
onDragOver={(e) => handleDragOver(e)}
|
onDragOver={(e) => handleDragOver(e)}
|
||||||
onDragEnter={(e) => handleDragEnter(e)}
|
onDragEnter={(e) => handleDragEnter(e)}
|
||||||
onDragLeave={(e) => handleDragLeave(e)}
|
onDragLeave={(e) => handleDragLeave(e)}
|
||||||
onPaste={(e) => handlePaste(e)}>
|
onPaste={(e) => handlePaste(e)}
|
||||||
|
>
|
||||||
{window.electron.platform === "mac" && (
|
{window.electron.platform === "mac" && (
|
||||||
<div className="absolute top-0 w-full h-8 mac-titlebar"></div>
|
<div className="absolute top-0 w-full h-8 mac-titlebar"></div>
|
||||||
)}
|
)}
|
||||||
@ -627,7 +629,8 @@ const Home = () => {
|
|||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary bg-gradient-blue rounded-btn p-3 font-medium text-white/90 transition-colors"
|
className="btn btn-primary bg-gradient-blue rounded-btn p-3 font-medium text-white/90 transition-colors"
|
||||||
onClick={openFolderHandler}>
|
onClick={openFolderHandler}
|
||||||
|
>
|
||||||
Open Upscayled Folder
|
Open Upscayled Folder
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user