Sha256: 11fe413866232a21f96bb09df68d6e7e7b8bdf3cf5cf2c11cbcc1934d748638e

Contents?: true

Size: 367 Bytes

Versions: 38

Compression:

Stored size: 367 Bytes

Contents

#! /usr/local/bin/ruby -w

require 'RMagick'
include Magick

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

begin

result = img.posterize

# Substitute the standard "Not Implemented" image
rescue NotImplementedError
    result = Magick::Image.read("images/notimplemented.gif").first
    result.resize!(img.columns, img.rows)
end

result.write('posterize.jpg')
exit

Version data entries

38 entries across 38 versions & 1 rubygems

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