Sha256: 664541fb3e51023726b990225e4bc8df177998e030eb7652fd528544d6ac0bf2
Contents?: true
Size: 678 Bytes
Versions: 28
Compression:
Stored size: 678 Bytes
Contents
#! /usr/local/bin/ruby -w require 'RMagick' include Magick img = Image.new(200,200) img.compression = LZWCompression bg = Image.read('plasma:fractal') { self.size = '200x200' } gc = Draw.new gc.stroke_width(2) gc.stroke('black') gc.fill('white') gc.roundrectangle(0, 0, 199, 199, 8, 8) gc.fill('yellow') gc.stroke('red') gc.circle(100, 100, 100, 25) gc.draw(img) img.write('matte_floodfill_before.gif') img.fuzz = 100 img = img.matte_floodfill(100, 100) # Composite the image over a nice bright background # so that the transparent pixels will be obvious. img = bg[0].composite(img, CenterGravity, OverCompositeOp) img.write('matte_floodfill_after.gif') exit
Version data entries
28 entries across 28 versions & 1 rubygems