Sha256: 6f13ceb9ce3da1d53bed08e99db479668e0ce54ff1db463e5842308bfb1c01d7

Contents?: true

Size: 267 Bytes

Versions: 38

Compression:

Stored size: 267 Bytes

Contents

#! /usr/local/bin/ruby -w
require 'RMagick'

# Demonstrate the Image#threshold method

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

# Use a threshold of 55% of MaxRGB.
img = img.threshold(Magick::MaxRGB*0.55)

#img.display
img.write('threshold.jpg')
exit

Version data entries

38 entries across 38 versions & 1 rubygems

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