glitch-images/index.html
2013-11-02 13:02:22 +01:00

58 lines
4.0 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>image glitch experiment</title>
<link rel="stylesheet" href="styles/main.css" />
</head>
<body>
<article class="content intro">
<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 corrupted 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>
<p>if you like this one, you can check out some of his other <a href="http://snorpey.github.io/experiments/">javascript experiments</a>.</p>
</article>
<div class="content" id="controls">
<div class="control-wrapper">
<label class="control-label" for="amount-slider">amount</label>
<input class="control-input control-number" id="amount-number" type="number" min="0" max="99" value="50" maxlength="2" />
<input class="control-input control-slider" id="amount-slider" type="range" min="0" max="99" value="50" step="1" maxlength="2" />
</div>
<div class="control-wrapper">
<label class="control-label" for="seed-slider">seed</label>
<input class="control-input control-number" id="seed-number" type="number" min="0" max="100" value="50" maxlength="2" />
<input class="control-input control-slider" id="seed-slider" type="range" min="0" max="100" value="50" step="1" maxlength="2" />
</div>
<div class="control-wrapper">
<label class="control-label" for="iterations-slider">iterations</label>
<input class="control-input control-number" id="iterations-number" type="number" min="1" max="50" value="5" maxlength="2" />
<input class="control-input control-slider" id="iterations-slider" type="range" min="1" max="50" value="5" step="1" maxlength="2"/>
</div>
<div class="control-wrapper">
<label class="control-label" for="quality-slider">quality</label>
<input class="control-input control-number" id="quality-number" type="number" min="1" max="99" value="50" maxlength="2" />
<input class="control-input control-slider" id="quality-slider" type="range" min="1" max="99" value="50" step="1" maxlength="2" />
</div>
<button id="random-button" class="button is-hidden">randomize</button>
</div>
<div class="export-wrapper">
<button id="import-button" class="button" title="open image from your computer">import image</button>
<input type="file" id="import-input" accept="image/*" />
<button id="export-button" class="button" title="save image to your computer">download image</button>
<button id="imgur-button" class="button" title="share image via imgur.com"><span>share image</span></button>
<a id="png-button" download="glitched-image.png" target="_blank" class="download-link">download bitmap file<span> (.png)</span></a>
<div id="imgur-url-container">
<input id="imgur-url-input" type="text" readonly="readonly" />
<a href id="imgur-url-link" class="button social-link" href="http://imgur.com" target="_blank">open</a>
<a href id="twitter-link" class="button social-link" href="http://twitter.com" target="_blank" title="post your image on twitter">twitter</a>
<a href id="facebook-link" class="button social-link" href="http://facebook.com" target="_blank" title="post your image on facebook">facebook</a>
<a href id="reddit-link" class="button social-link" href="http://reddit.com" target="_blank" title="post your image on reddit">reddit</a>
<span id="imgur-url-error">sorry, something went wrong. maybe try again?</span>
</div>
</div>
<div class="canvas-wrapper">
<canvas id="canvas" />
</div>
<script src="scripts/lib/require-2.1.4.js" data-main="scripts/main"></script>
</body>
</html>