Skip to content

Instantly share code, notes, and snippets.

@ethanjurman
Created March 8, 2013 13:45
Show Gist options
  • Save ethanjurman/5116533 to your computer and use it in GitHub Desktop.
Save ethanjurman/5116533 to your computer and use it in GitHub Desktop.
threads = []
count = 0
(0..360-4).step(4).each do |x|
threads << Thread.new() {
(0..360-4).step(4).each do |y|
(0..360-4).step(4).each do |z|
file = "C:\\tmp\\monkeyROTATE\\#{ "0"*(3-x.to_s.size) }#{x}#{ "0"*(3-y.to_s.size) }#{y}#{ "0"*(3-z.to_s.size) }#{z}_0001.bmp"
`convert #{file} -depth 1 ./bitMonkey/#{ "0"*(3-x.to_s.size) }#{x}#{ "0"*(3-y.to_s.size) }#{y}#{ "0"*(3-z.to_s.size) }#{z}.bmp`
end
end
}
end
threads.each {|thr| thr.join()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment