Sha256: 550df4a0b447b31348cb00052289a7932d732927b5de7e4c1a2c7ff1a056c0fb

Contents?: true

Size: 529 Bytes

Versions: 67

Compression:

Stored size: 529 Bytes

Contents

#! /usr/local/bin/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

67 entries across 67 versions & 2 rubygems

Version Path
rmagick-1.7.1 doc/ex/cycle_colormap.rb
rmagick-1.7.2 doc/ex/cycle_colormap.rb
rmagick-1.7.3 doc/ex/cycle_colormap.rb
rmagick-1.8.0 doc/ex/cycle_colormap.rb
rmagick-1.9.0 doc/ex/cycle_colormap.rb
rmagick-1.8.3 doc/ex/cycle_colormap.rb
rmagick-1.8.2 doc/ex/cycle_colormap.rb
rmagick-1.9.2 doc/ex/cycle_colormap.rb
rmagick-1.9.1 doc/ex/cycle_colormap.rb
rmagick-2.1.0 doc/ex/cycle_colormap.rb
rmagick-2.0.0 doc/ex/cycle_colormap.rb
rmagick-1.9.3 doc/ex/cycle_colormap.rb
rmagick-2.2.0 doc/ex/cycle_colormap.rb
rmagick-2.2.2 doc/ex/cycle_colormap.rb
rmagick-2.3.0 doc/ex/cycle_colormap.rb
rmagick-2.4.0 doc/ex/cycle_colormap.rb
rmagick-2.5.0 doc/ex/cycle_colormap.rb
rmagick-2.5.1 doc/ex/cycle_colormap.rb
rmagick-2.5.2 doc/ex/cycle_colormap.rb
rmagick-2.6.0 doc/ex/cycle_colormap.rb