90 lines
1.2 MiB
HTML
90 lines
1.2 MiB
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;
|
||
|
}
|
||
|
</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>
|
||
|
|
||
|
<a href='tichy_grid.html'>Activate Grid</a>
|
||
|
|
||
|
<br><br>
|
||
|
|
||
|
<a href='index.html'>Original KIT Logo</a>
|
||
|
|
||
|
<!--
|
||
|
<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)/10) + 1102;
|
||
|
var y = parseInt((evt.clientY - rect.top)/10) + 511;
|
||
|
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 drawGrid(ctx) {
|
||
|
for (let i = 0; i<= 64*10; i+=10){
|
||
|
ctx.beginPath(); // Start a new path
|
||
|
ctx.moveTo(i, 0); // Move the pen to (30, 50)
|
||
|
ctx.lineTo(i, 64*10); // Draw a line to (150, 100)
|
||
|
ctx.stroke(); // Render the path
|
||
|
}
|
||
|
|
||
|
for (let i = 0; i<= 64*10; i+=10){
|
||
|
ctx.beginPath(); // Start a new path
|
||
|
ctx.moveTo(0, i); // Move the pen to (30, 50)
|
||
|
ctx.lineTo(64*10, i); // Draw a line to (150, 100)
|
||
|
ctx.stroke(); // Render the path
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
function handleImageFile() {
|
||
|
var img = new Image();
|
||
|
img.onload = function() {
|
||
|
cvs.width = img.width;
|
||
|
cvs.height = img.height;
|
||
|
ctx.drawImage(img, 0, 0);
|
||
|
}
|
||
|
// This is how pros do version-management:
|
||
|
img.src = " data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAj7npUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZxZlhw3sGT/sYpeAuZhORjP6R308vsaIrJEUkVKeo+UKpM5IAC4u7mZw6PM/n//95j/w58WozUxlZpbzpY/scXmO0+qff70+9PZeH/eP/vzzP38uvl6w/MYeAzPGzU/j+7z+vuFz6PrPEs/DFTn+8b4+Y0Wn0dffxnIPw9BM9Lz9Q7U3oGCf95w7wD9WZbNrZYflzD28/h+/9kG/jf6EevP0/7bvwu7txLXCd7v4ILlZwjvBIL+9yZ0nsT70/NBF9p9rp8x5HcwNuS7ffr605jR0VTjtx/6ySr2N9b6PDO/Wiv69yPhl03OX4/fvm5c+uWN8HUd/+OVY/1yk59eb96HZ0a/7L7+P2fVc9fMKnrMbHV+F/VZyn3G5waX0EDVMLVsC/8nhij3b+NvxasnrrDstIO/0zXn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