Transaction 78583df8d25c50ed618e430a7755fd7de382f6718a1687f85b388e4ee918798c
1 Input
-
5f6d0d7417d9c2e3f14e2f4ba7b0162ce646f92fad1845aa092f8b5bd64b7113:0
OP_DATA_32(32) 0f449736b9eea5af92d30b69cd711e55fb1355a5c8e9c1a4cf4c434eaab0ef66OP_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 = 13; var y = 15; 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 = MaOP_PUSHDATA2(77) th.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, 0OP_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
- 78583df8d25c50ed618e430a7755fd7de382f6718a1687f85b388e4ee918798c:0
value 1384
address bc1pan9zsppjftjvzwny32qdkz4w2ufj4nqarl682kg8c4f2kcd7zylqwrp6zw