Sha256: 164ba7f69f20757ffba26850fb55c7f5f2827bfb007ba92742ac8147bf20ac8c

Contents?: true

Size: 410 Bytes

Versions: 38

Compression:

Stored size: 410 Bytes

Contents

#!/home/software/ruby-1.6.8/bin/ruby -w

# Demonstrate the random_channel_threshold method

require 'RMagick'
include Magick

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

begin
    geom = Geometry.new(MaxRGB/2)
    img2 = img.random_threshold_channel(geom, RedChannel)
rescue NotImplementedError
    img2 = Image.read('images/notimplemented.gif').first
end

img2.write('random_threshold_channel.jpg')
exit

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
rmagick-1.10.0 doc/ex/random_threshold_channel.rb
rmagick-1.10.1 doc/ex/random_threshold_channel.rb
rmagick-1.12.0 doc/ex/random_threshold_channel.rb
rmagick-1.13.0 doc/ex/random_threshold_channel.rb
rmagick-1.11.0 doc/ex/random_threshold_channel.rb
rmagick-1.11.1 doc/ex/random_threshold_channel.rb
rmagick-1.15.1 doc/ex/random_threshold_channel.rb
rmagick-1.14.1 doc/ex/random_threshold_channel.rb
rmagick-1.14.0 doc/ex/random_threshold_channel.rb
rmagick-1.15.0 doc/ex/random_threshold_channel.rb
rmagick-1.15.10 doc/ex/random_threshold_channel.rb
rmagick-1.15.14 doc/ex/random_threshold_channel.rb
rmagick-1.15.11 doc/ex/random_threshold_channel.rb
rmagick-1.15.12 doc/ex/random_threshold_channel.rb
rmagick-1.15.13 doc/ex/random_threshold_channel.rb
rmagick-1.15.15 doc/ex/random_threshold_channel.rb
rmagick-1.15.2 doc/ex/random_threshold_channel.rb
rmagick-1.15.16 doc/ex/random_threshold_channel.rb
rmagick-1.15.17 doc/ex/random_threshold_channel.rb
rmagick-1.15.3 doc/ex/random_threshold_channel.rb