This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

21 lines
547 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Jimp browser example 2</title>
</head>
<body>
<h1> Demonstrates loading a relative file using Jimp on a WebWorker thread </h1>
<script>
var worker = new Worker("jimp-worker.js");
worker.onmessage = function (e) {
var img = document.createElement("img");
img.setAttribute("src", e.data);
document.body.appendChild(img);
};
worker.postMessage("lenna.png");
</script>
</body>
</html>