Transaction 872218c97e5eb466d9c8f61cc5b3dbcdbb9ce7185624055e02999a9ac4e7bca0
1 Input
-
e332c6e521c5e6d7602ee06ddb1b4094d96b81d8238819fd35bac5daa37a2c1a:0
OP_DATA_32(32) 609db0f84b140f2c6f81152ece631d90cd8ac017ca6768dfbe9f1f623e2fb289OP_CHECKSIG(172)OP_0(0)OP_IF(99)OP_DATA_3(3) ordOP_DATA_1(1)OP_DATA_23(23) text/html;charset=utf-8OP_0(0)OP_PUSHDATA2(77) <!DOCTYPE html> <html> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } canvas { position: relative; width: 24rem; height: 24rem; position: absolute; width: 100%; height: 100%; object-fit: contain; top: 0; left: 0; image-rendering: pixelated; } </style> <body> <canvas id="canvas" width="24" height="24"></canvas> <scrOP_PUSHDATA2(77) ipt> var isBlackAndWhite = true; var originalImageData = null; function convertToBlackAndWhite() { var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var x = 0; var y = 13; var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); var pixels = imageData.data; for (var i = 0; i < pixels.length; i += 4) { var currentX = (i / 4) % canvas.width; var currentY = MatOP_PUSHDATA2(77) h.floor(i / (4 * canvas.width)); if (currentX === x && currentY === y) { pixels[i] = 255; pixels[i + 1] = 73; pixels[i + 2] = 0; pixels[i + 3] = 255; } else { var red = pixels[i]; var green = pixels[i + 1]; var blue = pixels[i + 2]; var grayscaleValue = red * 0.3 + green * 0.59 + blue * 0.11; pixels[i] = grayscaleValue; pixels[i + 1] = grayscaleValue;OP_PUSHDATA2(77) pixels[i + 2] = grayscaleValue; } } ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.putImageData(imageData, 0, 0); isBlackAndWhite = true; } function restoreOriginalColors() { var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.putImageData(originalImageData, 0, 0); isBlackAndWhite = false;OP_PUSHDATA2(77) } function toggleColors() { if (isBlackAndWhite) { restoreOriginalColors(); } else { convertToBlackAndWhite(); } } function loadImage() { var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var img = new Image(); img.crossOrigin = 'anonymous'; img.onload = function () { ctx.drawImage(img, 0, 0); originalImageData = ctx.getImageData(0, 0,OP_PUSHDATA2(77) canvas.width, canvas.height); setTimeout(convertToBlackAndWhite, 0); }; img.src = '/content/6defa75c3d57fed23c4205ee258d434bd7ccde8e32b0f4f1bbddc04823fc7d8di0'; } window.onload = function () { var canvas = document.getElementById('canvas'); canvas.addEventListener('click', toggleColors); loadImage(); }; </script> </body> </html>OP_ENDIF(104)
1 Outputs
- 872218c97e5eb466d9c8f61cc5b3dbcdbb9ce7185624055e02999a9ac4e7bca0:0
value 1387
address bc1pa76jspn3s9fa4g9a68yny683qjmmjdp9fzu9k0e8a9wwy8n8dpksk9t3et