π Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.
TypeScript aielectronesrgangigapixelgigapixel-imagesimageimage-upscalingtopazupscaleupscalerimageupscayl
fixed partial image rendering
TGS963d16247d1d99a
diff --git a/electron/utils/convert-and-scale.ts b/electron/utils/convert-and-scale.tsindex cdbcd17..84b051d 100644--- a/electron/utils/convert-and-scale.ts+++ b/electron/utils/convert-and-scale.ts@@ -33,15 +33,14 @@ const convertAndScale = async (}// Save the imageconst 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;diff --git a/renderer/pages/index.tsx b/renderer/pages/index.tsxindex f432b29..8ddbb4d 100644--- a/renderer/pages/index.tsx+++ b/renderer/pages/index.tsx@@ -146,7 +146,7 @@ const Home = () => {// UPSCAYL DONEwindow.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><buttonclassName="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></>