Skip to content

Instantly share code, notes, and snippets.

View s-yoshiki's full-sized avatar
🎯
Focusing

Yoshiki Shinagawa s-yoshiki

🎯
Focusing
View GitHub Profile
@s-yoshiki
s-yoshiki / index.html
Last active January 20, 2019 10:37 — forked from anonymous/index.html
FileAPIで画像読み込み & canvasに描画
<body>
<input type="file" id="file">
<canvas id="canvas"></canvas>
<script>
document.getElementById("file").addEventListener("change", function (e) {
var file = e.target.files;
var reader = new FileReader();
//ファイルが複数読み込まれた際に、1つめを選択