Skip to content

Commit

Permalink
Skip combine image if it already exists
Browse files Browse the repository at this point in the history
because otherwise it would include the combined image into the new combined ;)
It is needed to run the picture_set:clean_combine_images task before.
  • Loading branch information
ChrisBr committed Jun 29, 2018
1 parent 4c82bc4 commit e04ffa4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/tasks/picture_set.rake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace :picture_set do

def combine_images(date, path)
dir = File.join(path, date)
return if File.exists?(File.join(dir, "#{date}#{COMBINED_SUFFIX}")
begin
Syscall.execute("time montage -geometry '25%x25%+25+25<' -background '#{OPTS.background_color}' " \
"-title '#{OPTS.image_caption}' -font '#{OPTS.font}' -fill '#{OPTS.font_color}' " \
Expand Down

0 comments on commit e04ffa4

Please sign in to comment.