<html>
<head>
<title>Image-to-html converter</title>
<style>
#img, #canvas, #span {
display: none;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAL0lEQVQ4jWP09vZ+xoAHuLi44JNmYMIrSwQYNWAwGMBCKJ737NlDWxeMGjAYDAAAak4FtfgpsBoAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h2>Image-to-html converter</h2>
<p>Enter the relative path to an image file, and this will convert it
to a pure HTML representation (no images).</p>
<script> varimg = document.getElementById("img"); varcanvas = document.getElementById("canvas"); varspan = document.getElementById("span"); vartextarea = document.getElementById("textarea"); var fill = document.getElementById("fill"); var fillRGB = document.getElementById("fillRGB");
function start_convert() {
try {
// Unhide stuff. They're initially hidden because the image shows a
// broken-image icon on first page load, and the canvas defaults to a
// large empty area. img.style.display = "inline"; canvas.style.display = "inline"; span.style.display = "inline-block";
// Clear out any previous values. textarea.value = "(loading image)" span.innerHTML = "";
// Get the image filename varinput = document.getElementById("filepath"); img.src = input.value;
// We're done, let the onload handler do the real work.
} catch (e) {
alert("Crap, start_convert failed: " + e);
}
}
function run_convert() {
try { textarea.value = "(rendering canvas)";
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.