Sha256: c85273562a5e88cb494bfbbcc9cf3f57b2bb4d586a758ad621a3242b72d0a933
Contents?: true
Size: 526 Bytes
Versions: 13
Compression:
Stored size: 526 Bytes
Contents
#!/usr/bin/env ruby -w require 'rmagick' # Demonstrate the Image#cycle_colormap method balloons = Magick::Image.read('images/Hot_Air_Balloons.jpg').first balloons = balloons.quantize(256, Magick::RGBColorspace) jump = balloons.colors / 10 animation = Magick::ImageList.new animation[0] = balloons 5.times { animation << animation.cycle_colormap(jump) } 4.times { animation << animation.cycle_colormap(-jump) } animation.delay=20 animation.iterations = 10000 #animation.animate animation.write('cycle_colormap.gif') exit
Version data entries
13 entries across 13 versions & 3 rubygems