Sha256: 1574becabdcc391d23d55c8765ffbac22595af49eb2f16d9ceb3178a10288ad1
Contents?: true
Size: 696 Bytes
Versions: 2
Compression:
Stored size: 696 Bytes
Contents
#!/usr/bin/env 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 do frames << img.implode(implosion) legend.annotate(frames, 0, 0, 10, 20, format('% 4.2f', implosion)) frames.matte = false implosion -= 0.10 end 7.times do implosion += 0.10 frames << img.implode(implosion) legend.annotate(frames, 0, 0, 10, 20, format('% 4.2f', implosion)) frames.matte = false end frames.delay = 10 frames.iterations = 0 puts 'Producing animation...' frames.write('implode.gif') exit
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rmagick-3.1.0 | doc/ex/implode.rb |
rmagick-3.0.0 | doc/ex/implode.rb |