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