MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / imgDataToBlob

Function imgDataToBlob

src/common/mapping/utils/L7LayerUtil.js:1565–1575  ·  view source on GitHub ↗
(imagedata)

Source from the content-addressed store, hash-verified

1563 }
1564
1565 function imgDataToBlob(imagedata) {
1566 const canvas = document.createElement('canvas');
1567 const ctx = canvas.getContext('2d');
1568 canvas.width = imagedata.width;
1569 canvas.height = imagedata.height;
1570 ctx && ctx.putImageData(imagedata, 0, 0);
1571
1572 const image = new Image();
1573 image.src = canvas.toDataURL();
1574 return image.src;
1575 }
1576
1577 /**
1578 * 将雪碧图1倍地址替换成2x的

Callers 1

addTexturesFunction · 0.85

Calls 3

createElementMethod · 0.80
getContextMethod · 0.45
toDataURLMethod · 0.45

Tested by

no test coverage detected