glitch-images/index.html
Georg Fischer 2810d7ac76 update ui;
add open and close button to ui;
close intro when new image is uploaded;
2013-11-29 22:09:10 +01:00

68 lines
4.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>image glitch experiment</title>
<link rel="stylesheet" href="styles/main.css" />
</head>
<body>
<div class="nav-wrapper dark-bg">
<div class="export-wrapper center">
<h1 class="headline">glitch images</h1>
<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>
<button class="intro-button button is-active"></button>
</div>
</div>
<div class="nav-wrapper light-bg">
<div class="content center" 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">randomise</button>
</div>
</div>
<div class="canvas-wrapper">
<canvas id="canvas"></canvas>
<article class="content intro is-active">
<div class="center">
<p>drag an image into the browser window to modify it.</p>
<p>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>
<button class="close"></button>
</div>
</article>
</div>
<script src="scripts/lib/require-2.1.4.js" data-main="scripts/main"></script>
</body>
</html>