Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'drb' require 'rubygems' require 'RMagick' frames = ['\\o\\', '|o|', '/o/', '|o|'] filenames = [] obj = DRbObject.new_with_uri("druby://eviladmins.org:9000") frames.each_index do |ind| File.open("frame" + ind.to_s + ".jpg", "wb") { |a| puts "Writing frame " + ind.to_s filename << "frame" + ind.to_s + ".jpg" a << obj.write_simple(frames[ind]) } end #not sure if anything past here works, since RMagick hates me. anim = ImageList.new() filenames.each { |f| anim.read f } anim.write("animated.gif")
This paste will be private.
From the Design Piracy series on my blog: