Class: FaceCropper
- Inherits:
-
Object
- Object
- FaceCropper
- Defined in:
- lib/face_cropper.rb,
lib/face_cropper/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
- #crop_and_upload! ⇒ Object
-
#initialize(params) ⇒ FaceCropper
constructor
A new instance of FaceCropper.
Constructor Details
#initialize(params) ⇒ FaceCropper
Returns a new instance of FaceCropper.
7 8 9 10 11 |
# File 'lib/face_cropper.rb', line 7 def initialize(params) @from_bucket = params[:from_bucket] @to_bucket = params[:to_bucket] @image_key = params[:image_key] end |
Instance Method Details
#crop_and_upload! ⇒ Object
13 14 15 16 17 18 |
# File 'lib/face_cropper.rb', line 13 def crop_and_upload! faces = detect_faces! puts faces.to_yaml tmp_original_image_path = download_original_image! upload_faces!(faces, tmp_original_image_path) end |