Test this online with Glitch Cruiser.
This is a commandline and web-based utility to mutilate images in unpredictable ways. It can randomly choose between algorithms, and many algorithms randomly mutate themselves. You can choose different encodings, effects, and emulate several glitch techniques, resulting in aleatoric new images and hidden configurations.
Check out some curated images at glitches.jkirchartz.com
This web-based utility completely client-side, using the FileReader and canvas APIs, your image isn't being uploaded to any server. If you have a decent browser, this should work. Also, you can right-click and save the result of the processing.
Based on Nolan Caudill's 3bitdither
Heavily modified by JKirchartz, code on github
Experimental functions may not be 100% stable, this is a work in progress.
install with npm install -g [email protected]/jkirchartz/Glitchy3bitDither
then run gleech glitch <input image> <output image> <glitch function name> [optional: parameters]
for example: gleech glitch test.jpg output.jpg fractal
to allow the fractal function to choose it's own parameters OR gleech.glitch test.jpg output.jpg fractal 0
to choose fractal type 0 (alternatively you can choose 1)
install with npm install --save [email protected]/jkirchartz/Glitchy3bitDither
and import it into your project for use like so:
'use strict';
var gleech = require('gleech');
gleech.read('test.jpg', function(err, image) {
image.fractal().write('output.jpg');
});
Gleech is based on [JIMP][https://github.com/oliver-moran/jimp] and (theoretically) any JIMP function can be used in place of a glitch function.
run gleech list
to see all available function names.
- update site (and gh-pages branch) to use
dist/gleech.js
instead ofsite/js/Glitchy3bitDither.js
- optimize code w/ better code from the row-sorting algos
- web workers
- namespace
- better function names
- better comments
- Add glitches:
- scan lines (1px black line the entire width every N lines)
- move each "row" in opposite directions (1px at a time)
- kaleidoscope
- Add blend modes: https://en.wikipedia.org/wiki/Blend_modes
v0.2.1 glitch function only calls existant functions
v0.2.0 glitch functionality is available as a node package and a command-line interface (gleech)
v0.1.0 has added glitch functions to jimp, and mostly successfully emulates Glitchy3bitDither in node.js. There are still some kinks to work out in a few of the glitch functions, use at your own peril.
The demo site in this repo is a Jekyll project. To run locally install the gem & run jekyll --serve
.
You can also use the --auto
flag to make Jekyll automatically update the site as files change.
Portions under the included MIT license, copyright 2013 Matthew Nolan Caudill, as noted.
JIMP (included in the node.js branch) is included under the MIT license (with Open Sans included under the Apache License)
Glitchy3bitDither is presented under the GPL3.0 license, copyleft 2013 JKirchartz, except as noted.
build with npm build
test with npm test
manually inspect images output in current directory
please read CONTRIBUTING.md for more details.
and... hack away! huzzah!