mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-09 19:52:30 +02:00
Don't check arguments number in applyCropOption; parseGravity should handle this
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
- Fix detecting of width and height of HEIF images that include `irot` boxes.
|
- Fix detecting of width and height of HEIF images that include `irot` boxes.
|
||||||
- Set `Error` status for errorred traces in OpenTelemetry.
|
- Set `Error` status for errorred traces in OpenTelemetry.
|
||||||
- (pro) Fix opject detection accuracy when using YOLOv8 or YOLOv10 models.
|
- (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
|
## [3.26.1] - 2024-10-28
|
||||||
### Changed
|
### Changed
|
||||||
|
@@ -444,10 +444,6 @@ func applyGravityOption(po *ProcessingOptions, args []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func applyCropOption(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 {
|
if w, err := strconv.ParseFloat(args[0], 64); err == nil && w >= 0 {
|
||||||
po.Crop.Width = w
|
po.Crop.Width = w
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user