Programming, philosophy, pedaling.

Mini-post: Glitch Art with RMagick

Jun 29, 2015     Tags: art, programming    

I’ve used ImageMagick for quite a while, and it’s always struck me as one of the best image manipulation programs suites in terms of featuredness (if not in quality of code). It supports an absolutely insane number formats and has both Unix-y utilities and bindings in just about every popular language.

So, I decided to give RMagick (ImageMagick’s Ruby bindings) a spin. I’ve used PerlMagick for a few scripts in the past, so I figured it couldn’t be that bad.

Unfortunately for me, I was wrong. RMagick’s documentation is absolutely awful, split between GitHub, RubyDocs, and a RubyForge with no regard for versioning or even completeness. As a result, just finding the right functions to use was a trial that nearly sent me back to PerlMagick (another interface of little beauty).

After about two hours of experimentation, I came up with two short Ruby scripts for glitch art generation with RMagick:






The ‘seed’ images come from various cyberpunk/tech animes (Serial Experiments Lain, Ghost In The Shell, Neon Genesis Evangelion), personal images, and images given to me by IRC friends and acquaintences.

Concluding notes

Based on the hundred or so glitched images I’ve generated so far, the best compositions appear at a ‘glitch level’ between 25 and 50, for medium to large image canvases. Smaller canvases might be better suited to lower levels, and the opposite is true for very large images.

Glitch art is a lot of fun, and it can yield surprisingly provocative images (not that I’m claiming mine are). You’re welcome to use the scripts I’ve written with your own sample sets, but I’d encourage you to write your own programs and explore methods of glitching other than simple compositing.

Happy hacking!

- William

P.S.: The images above are not the full resolution images generated by my scripts. If you want those (and others I like), you can download the zip archive (about 145MB). They are not licensed, and can be considered public domain.