mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-17 11:18:36 +01:00
fixed partial image rendering
This commit is contained in:
parent
38e39243a4
commit
d16247d1d9
@ -33,15 +33,14 @@ const convertAndScale = async (
|
||||
}
|
||||
// Save the image
|
||||
const buffer = await newImage.toBuffer();
|
||||
sharp(buffer)
|
||||
.toFile(processedImagePath)
|
||||
.then(() => {
|
||||
logit("✅ Done converting to: ", upscaledImagePath);
|
||||
})
|
||||
.catch((error) => {
|
||||
logit("❌ Error converting to: ", saveImageAs, error);
|
||||
onError(error);
|
||||
});
|
||||
try {
|
||||
await sharp(buffer).toFile(processedImagePath);
|
||||
} catch (error) {
|
||||
logit("❌ Error converting to: ", saveImageAs, error);
|
||||
onError(error);
|
||||
}
|
||||
|
||||
logit("✅ Done converting to: ", upscaledImagePath);
|
||||
};
|
||||
|
||||
export default convertAndScale;
|
||||
|
@ -146,7 +146,7 @@ const Home = () => {
|
||||
// UPSCAYL DONE
|
||||
window.electron.on(COMMAND.UPSCAYL_DONE, (_, data: string) => {
|
||||
setProgress("");
|
||||
setTimeout(() => setUpscaledImagePath(data), 500);
|
||||
setUpscaledImagePath(data);
|
||||
logit("upscaledImagePath: ", 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"
|
||||
onClick={() => {
|
||||
setShowCloudModal(true);
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
Introducing Upscayl Cloud
|
||||
</button>
|
||||
)}
|
||||
@ -557,7 +558,8 @@ const Home = () => {
|
||||
onDragOver={(e) => handleDragOver(e)}
|
||||
onDragEnter={(e) => handleDragEnter(e)}
|
||||
onDragLeave={(e) => handleDragLeave(e)}
|
||||
onPaste={(e) => handlePaste(e)}>
|
||||
onPaste={(e) => handlePaste(e)}
|
||||
>
|
||||
{window.electron.platform === "mac" && (
|
||||
<div className="absolute top-0 w-full h-8 mac-titlebar"></div>
|
||||
)}
|
||||
@ -627,7 +629,8 @@ const Home = () => {
|
||||
</p>
|
||||
<button
|
||||
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
|
||||
</button>
|
||||
</>
|
||||
|
Loading…
x
Reference in New Issue
Block a user