Last active
December 11, 2023 07:40
-
-
Save nna774/f51a131cd2c4bba5c3eec3714e183015 to your computer and use it in GitHub Desktop.
乗りつぶしオンライン 画像をsvgからpngへ。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function () { | |
var map = document.getElementById('map'); | |
map.width = 1800; // 特に意味のある値ではない。小さいとガビるので、適当にこれぐらい。元々のmapはサイズの指定のないimgなので適当に画面幅とかになっている? | |
var c = document.createElement('canvas'); | |
c.width = map.width; | |
c.height = map.height; | |
var ctx = c.getContext('2d'); | |
ctx.drawImage(map, 0, 0); | |
map.src = c.toDataURL(); | |
})(); | |
// https://www.noritsubushi.org/common/map.php で使う。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment