Shattered machine

Metadata
creation year: 2021
Glitched icon for shattered machine

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

Features

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.

Create new version

Specs

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

Acknowledgements

This gem is relying heavily on the pnglitch gem and the rusty engine gem. The png image used in the specs has been created with Ronin while the jpg one is painting from Karl Wiener. Icons made by Freepik from www.flaticon.com