convert -crop 509x1+0+0 top-row.png txt:- | grep -v 'black$' | ruby -e 'STDIN.each {|line| print $1.to_i.chr if line =~ /0,\s?(\d{2,3})\)/}'