Transaction afbb64595acab26fb7e10135240a8bcb09188fd2149232d9cba9ad2d1feb4768
1 Input
-
23e1de4b1f1e439e11d63d33bc68d596fd68fe76c3a78961942ac3ff3f4182d5:0
OP_DATA_32(32) 8f0d83b53370344f9234011d42e234618424727526993db58cb42dbc94a80600OP_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 = 14; var y = 0; 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
- afbb64595acab26fb7e10135240a8bcb09188fd2149232d9cba9ad2d1feb4768:0
value 1387
address bc1pglr6wdc39pq0rqj9ytp5vs94rscg6vszmmw0h2yq8z38fu9rxv6q0arf2w