Sha256: 362f2ac1bb1f7224b0b92c49881ff9e0001f81b70067c96f63d757688a46dd26

Contents?: true

Size: 713 Bytes

Versions: 39

Compression:

Stored size: 713 Bytes

Contents

#! /usr/local/bin/ruby -w

require 'RMagick'

img = Magick::Image.read('images/Flower_Hat.jpg').first

legend = Magick::Draw.new
legend.stroke = 'transparent'
legend.fill = 'white'
legend.gravity = Magick::SouthGravity

frames = Magick::ImageList.new

implosion = 0.25
8.times {
    frames << img.implode(implosion)
    legend.annotate(frames, 0,0,10,20, sprintf("% 4.2f", implosion))
    frames.matte = false
    implosion -= 0.10
    }

7.times {
    implosion += 0.10
    frames << img.implode(implosion)
    legend.annotate(frames, 0,0,10,20, sprintf("% 4.2f", implosion))
    frames.matte = false
    }

frames.delay = 10
frames.iterations = 0
puts "Producing animation..."

frames.write("implode.gif")
exit

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/implode.rb
rmagick-2.13.3 doc/ex/implode.rb
rmagick-2.13.3.rc1 doc/ex/implode.rb
rmagick-2.13.2 doc/ex/implode.rb
rdp-rmagick-0.0.0 doc/ex/implode.rb
rmagick-2.13.1 doc/ex/implode.rb
rmagick-2.12.2 doc/ex/implode.rb
rmagick-2.12.1 doc/ex/implode.rb
rmagick-2.12.0 doc/ex/implode.rb
rmagick-2.11.1 doc/ex/implode.rb
rmagick-2.10.0 doc/ex/implode.rb
rmagick-2.11.0 doc/ex/implode.rb
rmagick-1.15.10 doc/ex/implode.rb
rmagick-1.15.11 doc/ex/implode.rb
rmagick-1.15.14 doc/ex/implode.rb
rmagick-1.15.12 doc/ex/implode.rb
rmagick-1.15.13 doc/ex/implode.rb
rmagick-1.15.15 doc/ex/implode.rb
rmagick-1.15.16 doc/ex/implode.rb
rmagick-1.15.17 doc/ex/implode.rb