76 lines
36 KiB
HTML
76 lines
36 KiB
HTML
|
<!DOCTYPE HTML>
|
||
|
<!-- Display image, show mouse position and pixel values
|
||
|
Author: Dominik Roth
|
||
|
But I stole most of it from this guy:
|
||
|
Author: Changjiang Yang
|
||
|
Date: 08/14/2016
|
||
|
TODO: Add drag and drop
|
||
|
-->
|
||
|
<html>
|
||
|
<head>
|
||
|
<style>
|
||
|
div.footer {
|
||
|
left: 0;
|
||
|
margin: 0 auto;
|
||
|
background: #0072BB;
|
||
|
color:#fff;
|
||
|
}
|
||
|
|
||
|
canvas {
|
||
|
image-rendering: -moz-crisp-edges;
|
||
|
image-rendering: -webkit-crisp-edges;
|
||
|
image-rendering: pixelated;
|
||
|
image-rendering: crisp-edges;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<div class="footer" id="results">Move mouse over image to show coordinates on r/place</div>
|
||
|
<canvas id="canvas" style="margin:12px;"></canvas>
|
||
|
|
||
|
<br><br>
|
||
|
|
||
|
|
||
|
<!--
|
||
|
<h3>The Template shown here might become oudated. The Discord-Channel always contains the newest information on the current plan.</h3>
|
||
|
<h4>Current Imgur-Link: <a href='https://i.imgur.com/04s98N5.png'>https://i.imgur.com/04s98N5.png</a></h4>
|
||
|
<h4>Previous Imgur-Link: <a href='https://i.imgur.com/fyE1WmW.png'>https://i.imgur.com/fyE1WmW.png</a></h4>
|
||
|
-->
|
||
|
<script>
|
||
|
var URL = window.URL;
|
||
|
var cvs = document.getElementById('canvas');
|
||
|
var ctx = cvs.getContext('2d');
|
||
|
var res = document.getElementById('results');
|
||
|
|
||
|
cvs.addEventListener('mousemove', mousePos, false);
|
||
|
|
||
|
function mousePos(evt) {
|
||
|
var rect = cvs.getBoundingClientRect();
|
||
|
var x = parseInt((evt.clientX - rect.left)/8) + 866;
|
||
|
var y = parseInt((evt.clientY - rect.top)/8) + 199;
|
||
|
var p = ctx.getImageData(x, y, 1, 1).data;
|
||
|
results.innerHTML = '<table style="width:100%;table-layout:fixed"><td>X: '
|
||
|
+ x + '</td><td>Y: ' + y + '</td></table>';
|
||
|
return {x, y};
|
||
|
}
|
||
|
|
||
|
function drawImg() {
|
||
|
var img = new Image();
|
||
|
img.onload = function() {
|
||
|
cvs.width = img.width;
|
||
|
cvs.height = img.height;
|
||
|
ctx.imageSmoothingEnabled = false;
|
||
|
ctx.drawImage(img, 0, 0, cvs.width, cvs.height);
|
||
|
}
|
||
|
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABIoAAAGQCAIAAABOBhz4AABnZklEQVR42u39d5wU9L33/U/UKC4g9l5AEEEQpVgSxa7YEsVeoqIoZQEBRZrI+22s2HtXll4EbKAUCxbEEjWJMe2Yk35OTspJLsuVc+fc99nfH7/rflyP+3rvTM5sZpmd5TWP11/fx7jsd3YW58nnj0/Bcl3DyMxy+1n1WSt8foeZ9Znluob6rBnnHRtGZRX8Plvb69xu1sjMcvuG+szy5rNGZJY3nTMis1yYMzzjvG2fS/p9Uw9Jv23qUcHnFzv/c1OPCj6f+3Jf7lur97Vf7FfIOOd8Q5/3LWQlzlf0LWScN/u83Ne/gu+HAjyDZ/CMc3jGx1nuy325LzzjHJ5xDs/gGTyDMfCMj7Pcl/tyX3jGOefwDJ7BM3gGzziHZ3yc5b7cl/vCM87hGefwDJ7BMxgDz/g4y325L/eFZ5xzDs/gGTyDZ/CMc3jGx1nuy325LzzjHJ5xDs/gGTyDK/CMj7Pcl/tyX3jGOefwDJ6V4BkRUYsmHjx48KiVB39nE1FVK1huN6s+KzFFaW3PLzb1Kv71yzsv/vXL+z6LTbFq5XXu2FCfWf7KnBEZUyPOmZ5xX+7LfWt0evbmQYWMc84553zDnMMzeAbPOIdnfJzlvtyX+8IzzjnnHJ7BM3jGOTzj4yz35b7cF55xzjnnnMMzeAbPOIdnfJzlvtyX+8IzzjnnHJ7BM3jGOTzj4yz35b7cF55xzjnnnMMzeAbPOIdnfJzlvtyX+8IzzjnnHJ7BM3jG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