shattered machine (2021)
The Shattered Machine is a gem that aim to create glitched png images easily.
- Converter : Convert a single jpg images or a directory full of jpg image into png
- Seven algorithms : Seven different algorithm 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
require 'shattered_machine' io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename') ShatteredMachine::Glitcher.new('Slim', io).call
require 'shattered_machine' io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename') ShatteredMachine::Sampler.new(io).call
require 'shattered_machine' io = ShatteredMachine::Io.new('input_image.jpg', 'output_folder', 'output_filename') ShatteredMachine::Converter.new(io).call
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.
bundle install to fetch the needed gems.
Create new version
- Fill the CHANGELOG with the changes contained in the new version
- Ensure the specs are green
- Change the versions in
- Create git tag
- Compile the gem :
gem build shattered_machine.gemspec
- Push the new version :
gem push shattered_machine-x.x.x.gem
This project uses Rspec for writing specs, to run them simply run
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