Don't check arguments number in applyCropOption; parseGravity should handle this

This commit is contained in:
DarthSim
2024-11-21 21:46:46 +03:00
parent f7433303e6
commit 484594cfbb
2 changed files with 1 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
- Fix detecting of width and height of HEIF images that include `irot` boxes.
- Set `Error` status for errorred traces in OpenTelemetry.
- (pro) Fix opject detection accuracy when using YOLOv8 or YOLOv10 models.
- (pro) Fix usage of the `obj` and `objw` gravity types inside the `crop` processing option.
## [3.26.1] - 2024-10-28
### Changed

View File

@@ -444,10 +444,6 @@ func applyGravityOption(po *ProcessingOptions, args []string) error {
}
func applyCropOption(po *ProcessingOptions, args []string) error {
if len(args) > 5 {
return fmt.Errorf("Invalid crop arguments: %v", args)
}
if w, err := strconv.ParseFloat(args[0], 64); err == nil && w >= 0 {
po.Crop.Width = w
} else {