38 lines
2.1 KiB
HTML
38 lines
2.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>image glitch experiment</title>
|
|
<link rel="stylesheet" href="styles/global.css" />
|
|
</head>
|
|
<body>
|
|
<article class="content">
|
|
<h1 class="headline">glitch images</h1>
|
|
<p>drag an image into the browser window to modify it. this script corrupts some bytes in a jpg image. because of the way <a href="https://en.wikipedia.org/wiki/JPEG">jpg</a> encoding works, the corripted file still shows something. inspired by <a href="http://github.com/soulwire">soulwire</a>s <a href="http://blog.soulwire.co.uk/laboratory/flash/as3-bitmapdata-glitch-generator">experiment</a> in flash. this experiment was created by <a href="http://fishnation.de/">georg</a>. you can follow him on <a href="https://twitter.com/snorpey">twitter</a> or explore the source code on <a href="https://github.com/snorpey/jpg-glitch">github</a>.</p>
|
|
</article>
|
|
<div class="content" id="controls">
|
|
<div class="control-wrapper">
|
|
<label class="control-label" for="amount">glitch amount</label>
|
|
<input class="control-input" type="range" id="amount" min="0" max="100" value="50" />
|
|
</div>
|
|
<div class="control-wrapper">
|
|
<label class="control-label" for="seed">seed</label>
|
|
<input class="control-input" type="range" id="seed" min="0" max="100" value="50" />
|
|
</div>
|
|
<div class="control-wrapper">
|
|
<label class="control-label" for="iterations">iterations</label>
|
|
<input class="control-input" type="range" id="iterations" min="1" max="50" value="5" />
|
|
</div>
|
|
<div class="control-wrapper">
|
|
<label class="control-label" for="quality">jpg quality</label>
|
|
<input class="control-input" type="range" id="quality" min="1" max="90" value="50" />
|
|
</div>
|
|
</div>
|
|
<div class="export-wrapper">
|
|
<button id="save-button" class="button">export image</button>
|
|
<a id="png-button" download="glitched-image.png" target="_blank" class="download-link">download bitmap file<span> (.png)</span></a>
|
|
</div>
|
|
<canvas id="canvas"></canvas>
|
|
<script src="scripts/lib/require-2.1.4.js" data-main="scripts/src/main"></script>
|
|
</body>
|
|
</html> |