0.0
No commit activity in last 3 years
No release in over 3 years
a ruby gem for scrambling jpeg/jpg files as though there were eggs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

ScrambledJpeg

Super simple jpeg glitcher.

example.jpg glitched at various granularities ranging from 5-75

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

  1. Reads a .jpg/.jpeg file
  2. Writes first line of original to new file to preserve headers
  3. Stores last line of original to preserve EOF
  4. Writes GRANULARITY lines of original to new file
  5. Caches GRANULARITY lines of original
  6. Writes GRANULARITY lines of original to new file
  7. Writes the cache to new file
  8. ETC.
  9. 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