alincode / skilltree.js

1 stars 0 forks source link

[Research] resizing icon image without backend server #1

Closed alincode closed 3 years ago

alincode commented 5 years ago
alincode commented 5 years ago
    var g = svg.append("g").append("image")
        .attr("width", width / 2) 
        .attr("height", height ) 
        .attr("xlink:href", "data:image/png;base64," + data); // replace 
alincode commented 5 years ago

not work

await fetch("http://lorempixel.com/32/32",{mode: 'no-cors'})
alincode commented 5 years ago
await fetch('https://cross-http.herokuapp.com/http://lorempixel.com/400/200/').then(x=> console.log(x.text()))

https://cross-http.herokuapp.com/http://lorempixel.com/400/200/