A basic introduction to processing binary files in Ruby, using PNG as an example. Code is at: https://github.com/sandal/binary_examples
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.