@@ -4,6 +4,9 @@
### Added
- `trim` processing option.
+### Fixed
+- Fixed focus point crop calculation.
+
## [2.8.2] - 2020-01-13
### Changed
- Optimized memory usage.
@@ -324,8 +324,10 @@ func transformImage(ctx context.Context, img *vipsImage, data []byte, po *proces
cropWidth = scaleInt(cropWidth, scale)
cropHeight = scaleInt(cropHeight, scale)
- cropGravity.X *= scale
- cropGravity.Y *= scale
+ if cropGravity.Type != gravityFocusPoint {
+ cropGravity.X *= scale
+ cropGravity.Y *= scale
+ }
if !trimmed && scale != 1 && data != nil && canScaleOnLoad(imgtype, scale) {
if imgtype == imageTypeWEBP || imgtype == imageTypeSVG {