Sha256: e93123864b87e53f34f9d15bb45add5de5324bab68bc25b29003495047ae69b6
Contents?: true
Size: 436 Bytes
Versions: 38
Compression:
Stored size: 436 Bytes
Contents
#! /usr/local/bin/ruby -w require 'RMagick' include Magick # Demonstrate the Image#add_noise method NOISE_TYPES = [UniformNoise, GaussianNoise, MultiplicativeGaussianNoise, ImpulseNoise, LaplacianNoise, PoissonNoise] img = Magick::Image.read('images/Flower_Hat.jpg').first NOISE_TYPES.each do |noise| copy = img.add_noise(noise) copy.write "add_noise_#{noise.to_s}.jpg" end exit
Version data entries
38 entries across 38 versions & 1 rubygems