Sha256: 86be474522058229f71e6bef08a34cbf3c82540aaf5173e20a4ff9d0fcc61e68

Contents?: true

Size: 323 Bytes

Versions: 3

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

require 'image_voodoo'

# reads in the file specified by ARGV[0], transforming to greyscale and
# writing to the file specified by ARGV[1]
ImageVoodoo.with_image(ARGV[0]) do |img|
  img.greyscale do |img2|
    if ARGV[1]
      img2.save(ARGV[1])
    else
      img2.preview
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
image_voodoo-0.9.3 samples/file_greyscale.rb
image_voodoo-0.9.2 samples/file_greyscale.rb
image_voodoo-0.9.1 samples/file_greyscale.rb