commit
c347fbde32
1 changed files with 2 additions and 1 deletions
|
@ -1534,7 +1534,7 @@ async function upscaleAndDownload(
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
})
|
})
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then(async (data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
var link = document.createElement("a");
|
var link = document.createElement("a");
|
||||||
link.download =
|
link.download =
|
||||||
|
@ -1554,6 +1554,7 @@ async function upscaleAndDownload(
|
||||||
console.log("Add upscaled to resource");
|
console.log("Add upscaled to resource");
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.src = link.href;
|
img.src = link.href;
|
||||||
|
await img.decode();
|
||||||
tools.stamp.state.addResource(guid() + " (upscaled)", img);
|
tools.stamp.state.addResource(guid() + " (upscaled)", img);
|
||||||
}
|
}
|
||||||
if (download == true) {
|
if (download == true) {
|
||||||
|
|
Loading…
Reference in a new issue