Shattered Machine

The Shattered Machine is a gem that aim to create glitched png images easily.

  • Rubygems page
  • Documentation

    Features

  • Converter : Convert a single jpg images or a directory full of jpg image into png

  • Seven algorithms : Seven different alogirithm with their own settings giving you lots of freedom to mess with your images

  • Sampler : Giving you a quick overview of all algorithms effect on your image

  • Folder glitching : Glitch easily all png images contained in a folder

Usage/Examples

Glitcher

require 'shattered_machine'

io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename')
ShatteredMachine::Glitcher.new('Slim', io).call

Sampler

require 'shattered_machine'

io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename')
ShatteredMachine::Sampler.new(io).call

Converter

require 'shattered_machine'

io = ShatteredMachine::Io.new('input_image.jpg', 'output_folder', 'output_filename')
ShatteredMachine::Converter.new(io).call

Development

Install locally

The Shattered Machine using two main libraries for glitching :

The rusty engine is written in rust and a compiled version for Windows, Mac os and Linux is already included in the gem. To install the needed dependencies you need to install the Ruby language and Bundler.

Then run bundle install to fetch the needed gems.

Specs

This project uses Rspec for writting specs, to run them simply run bundle rspec