Skip to content

SmartCrop: The padding value you provided exceeds the boundaries of the original image #263

@joebernard

Description

@joebernard

Describe the bug
I upgraded to v5.2.0. It returns a 400 error with these settings:

smartCrop: {
  faceIndex: 0,
  padding: 1
}

{"status":400,"code":"SmartCrop::PaddingOutOfBounds","message":"The padding value you provided exceeds the boundaries of the original image. Please try choosing a smaller value or applying padding via Sharp for greater specificity."}

No matter what padding value I try it returns the same error. If no padding is passed it does return a face very closely cropped and not really usable.

To Reproduce
smartCrop with a faceIndex and a non-zero padding

Expected behavior
smartCrop should allow a padding

Please complete the following information about the solution:

  • [5.2.0] Version: [e.g. v1.0.0]
  • [us-east-1] Region: [e.g. us-east-1]
  • [no] Was the solution modified from the version published on this repository?
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • [yes] Have you checked your service quotas for the sevices this solution uses?
  • [yes] Were there any errors in the CloudWatch Logs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions