Sha256: 0f2c142f974aba5ae31d9133bbaa95f82132e02021543f5011b020dfc61fbcd4

Contents?: true

Size: 381 Bytes

Versions: 47

Compression:

Stored size: 381 Bytes

Contents

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

# Demonstrate the Image#map method

img = Magick::Image.read('images/Flower_Hat.jpg')[0]

# "Read" the builtin Netscape format, which
# contains the 216 colors in the Netscape palette.
nsmap = Magick::Image.read('netscape:')[0]

# Map the original image colors into the Netscape colors.
after = img.map(nsmap)

after.write('map_f.jpg')

Version data entries

47 entries across 47 versions & 1 rubygems

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