瀏覽代碼

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

DarthSim 5 月之前
父節點
當前提交
484594cfbb
共有 2 個文件被更改,包括 1 次插入4 次删除
  1. 1 0
      CHANGELOG.md
  2. 0 4
      options/processing_options.go

+ 1 - 0
CHANGELOG.md

@@ -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

+ 0 - 4
options/processing_options.go

@@ -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 {