ScrambledJpeg
Super simple jpeg glitcher.
Here is a pretty good tutorial that covers the logic behind this and this looks like a good list of resources for other forms of glitch art.
SCRAMBLE ALGORITHM
- Reads a .jpg/.jpeg file
- Writes first line of original to new file to preserve headers
- Stores last line of original to preserve EOF
- Writes GRANULARITY lines of original to new file
- Caches GRANULARITY lines of original
- Writes GRANULARITY lines of original to new file
- Writes the cache to new file
- ETC.
- When it runs out of lines to write, it writes the last line and closes the new file.
GO TO THE GEM STORE
$ gem install scrambled_jpeg
ITS EASY LIKE SUNDAY MORNING
# CLI USE
$ scrambled_jpeg [FILENAME] ([GRANULARITY])
# granularity defaults to 5.
$ scrambled_jpeg example.jpg
# numbers have differing effects depending on file size and stuff...
$ scrambled_jpeg example.jpg 50
# sometimes it breaks the image...
# CAN BE USED IN RUBY TOOOOOOO
IRB(...)> ScrambledJpeg.scramble FILENAME, GRANULARITY=5
THE FUTURE
other potential glitch algorithms:
- Benedict
- Poach
- HardBoil
- Omelette