#!/usr/bin/env ruby
require 'fileutils'
require 'RMagick'
if ARGV.length != 1
abort("Usage: add_logo filename")
end
LOGO_IMAGE = 'add_logo.png'
= ARGV[0]
image_filename = Magick::Image.read(image_filename).first
image = Magick::Image.read(LOGO_IMAGE).first
logo .composite!(logo, Magick::SouthWestGravity, Magick::OverCompositeOp)
image.write(image_filename) image
$ add_logo espresso.jpg