Blob URL for image

How can I “save” this image?

blob:https%3A//theta360.com/473c6400-b8e7-4c41-8f7a-90f03cbc8787

found at: https://theta360.com/s/lE2in9qQDK6j2CcjPAQcvNhOi

I tried a few script that I found on SO that uses canvas.toDataURL

But I get an error message:

It is not allowed to load the local resource: blob: https% 3A // theta360.com / 473c6400-b8e7-4c41-8f7a-90f03cbc8787

JavaScript:

var url = "blob:https%3A//theta360.com/473c6400-b8e7-4c41-8f7a-90f03cbc8787"; // document.getElementById("img1").src; // 'img1' is the thumbnail - I had to put an id on it
var canvas = document.getElementById("MyCanvas");
var img = new Image();
img.src = url;
img.onload = function () {
    var myImage = canvas.toDataURL("image/jpg");
    document.getElementById("dataurl").value = myImage;
}

HTML:

<canvas id="MyCanvas">This browser or document mode doesn't support canvas</canvas>
<input id="dataurl" name="dataurl" type="text" size="50" />
+4
source share
3 answers

Unable to retrieve the URL generated URL.createObjectURL()from another source. objectURLexists in windowthat created it for the time of life documentthat created it.

URL.createObjectURL()

URL.createObjectURL() DOMString URL-, , . URL- document , . URL- File Blob .

+3

, , .

Chrome chrome://cache/ equirectangular_web_optimized

+2

I made it so that I get the BLOB-URL props (file.localDataUrl)

    const img = new Image();
    img.src = file.localDataUrl;

    img.onload = (a) => {
        console.log(a);
        console.log([a.path[0].width, a.path[0].height]);
    };
0
source

All Articles