diff --git a/bin/benchmark-full b/bin/benchmark-full index 9ad22e5..b82b07c 100755 --- a/bin/benchmark-full +++ b/bin/benchmark-full @@ -66,9 +66,10 @@ module Morandi log " #{image_processor}:" stats = Hash.new { |hash, key| hash[key] = [] } + output_image_path = "#{input_image_path}-#{image_processor}-output.jpg" cmd = ['bundle', 'exec', '/usr/bin/time', '--format', TIME_FORMAT_PARSEABLE, - 'bin/process-single', input_image_path, image_processor, options.to_json] + 'bin/process-single', input_image_path, image_processor, output_image_path, options.to_json] ITERATIONS_PER_IMAGE.times do |_i| stdout_str, _status = Open3.capture2e(*cmd) diff --git a/bin/process-single b/bin/process-single index 1b51dc4..8dd5435 100755 --- a/bin/process-single +++ b/bin/process-single @@ -11,9 +11,9 @@ require 'morandi' input_file_path = ARGV[0] processor = ARGV[1] -options_json = ARGV[2] +output_file_path = ARGV[2] +options_json = ARGV[3] options = options_json ? JSON.parse(options_json) : { 'straighten' => 0.5, 'gamma' => 0.85 } -output_path = "#{input_file_path}-#{processor}-output.jpg" -Morandi.process(input_file_path, options, output_path, 'processor' => processor) +Morandi.process(input_file_path, options, output_file_path, 'processor' => processor)