require "tiler/version"
require "tiler/image_tiler_2"
require "pp"

if __FILE__ == $0
  
  if ARGV.size != 1
    p "Usage: #{__FILE__} input_file"
    exit 1
  end

  begin
    Tiler::ImageTiler_2.batch_workers(ARGV.first, "output", 3)
    pp "Done"
    exit 0
  rescue => e
    pp "Error: #{e.message}"
    exit 1
  end

end
