lib/greyn.rb
#
# Convert an image to greyscale.
# @param file [String] image filename
#
# @return [void]
Convert an image to greyscale.
Convert an image to greyscale .
def convert(file)
      basename = base_filename(file)
      path = File.dirname(File.expand_path(file))
      TYPES.each do |type|
        image = ChunkyPNG::Image.from_file(File.expand_path(file))
        Greyscale.greyscale(image, type)
        image.save("#{path}/#{basename}_#{type}.png")
      end
    end
def convert ( file ) basename = base_filename ( file ) path = File . dirname ( File . expand_path ( file ) ) TYPES . each do | type | image = ChunkyPNG :: Image . from_file ( File . expand_path ( file ) ) Greyscale . greyscale ( image , type ) image . save ( "#{path}/#{basename}_#{type}.png" ) end end
Convert an image to greyscale.
Convert an image to greyscale .
None
void
file
None