Sha256: c4d0fc95b64e80b658b1713b61d58dff2d0f022030fe44dff621442b2a1a34d9

Contents?: true

Size: 279 Bytes

Versions: 6

Compression:

Stored size: 279 Bytes

Contents

#!/usr/bin/env ruby -w
require 'rmagick'

# Demonstrate the Image#threshold method

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rmagick-4.1.0.rc2 doc/ex/threshold.rb
rmagick-4.1.0.rc1 doc/ex/threshold.rb
rmagick-4.0.0 doc/ex/threshold.rb
rmagick-3.2.0 doc/ex/threshold.rb
rmagick-3.1.0 doc/ex/threshold.rb
rmagick-3.0.0 doc/ex/threshold.rb