Sha256: 8d3e324c75f6388256ce52d42d872259354c9edaed4d2bae09e8947241173185

Contents?: true

Size: 314 Bytes

Versions: 13

Compression:

Stored size: 314 Bytes

Contents

#!/usr/bin/env ruby -w

# Demonstrate the random_channel_threshold method

require 'rmagick'

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

geom = Magick::Geometry.new(Magick::QuantumRange/2)
img2 = img.random_threshold_channel(geom, Magick::RedChannel)

img2.write('random_threshold_channel.jpg')
exit

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/random_threshold_channel.rb
rmagick-windows-2.16.4 doc/ex/random_threshold_channel.rb
rmagick-windows-2.16.3 doc/ex/random_threshold_channel.rb
rmagick-windows-2.16.2 doc/ex/random_threshold_channel.rb
rmagick-windows-2.16.1 doc/ex/random_threshold_channel.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/random_threshold_channel.rb
rmagick-2.16.0 doc/ex/random_threshold_channel.rb
rmagick-2.15.4 doc/ex/random_threshold_channel.rb
rmagick-2.15.3 doc/ex/random_threshold_channel.rb
rmagick-2.15.2 doc/ex/random_threshold_channel.rb
rmagick-2.15.1 doc/ex/random_threshold_channel.rb
rmagick-2.15.0 doc/ex/random_threshold_channel.rb
rmagick-2.14.0 doc/ex/random_threshold_channel.rb