Skip to content

Commit

Permalink
fix #374
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBAshton committed Feb 28, 2016
1 parent d9eeb40 commit c6307a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/wraith/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def save_images(config_name, history = false)
desc "crop_images [config_name]", "crops images to the same height"
def crop_images(config_name)
within_acceptable_limits do
logger.info "CROPPING IMAGES"
crop = Wraith::CropImages.new(config_name)
crop.crop_images
end
Expand Down
4 changes: 2 additions & 2 deletions lib/wraith/crop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ def crop_images
files = Dir.glob("#{wraith.directory}/*/*.png").sort

Parallel.each(files.each_slice(2), :in_processes => Parallel.processor_count) do |base, compare|
logger.info "cropping images"

width = image_dimensions(base)[0]
base_height = image_dimensions(base)[1]
compare_height = image_dimensions(compare)[1]
Expand All @@ -30,6 +28,8 @@ def crop_images
height_to_crop_to = compare_height
end

logger.debug "Cropping image: #{image_to_crop}"

crop_task(image_to_crop, height_to_crop_to, width)
end
end
Expand Down

0 comments on commit c6307a0

Please sign in to comment.