# affineCrop Source: https://www.nianticspatial.com/docs/api/kotlin/com.nianticspatial.nsdk.utils.ImageMath.affineCrop/ affineCrop --- ## Declaration fun affineCrop(source: Size, target: Size): Matrix #### Summary Returns an affine transformation that crops the source size to match the aspect ratio of the target size. #### Returns An affine transformation matrix that crops the source to fit the target aspect ratio. ### Parameters | Name | Type | Summary | | --- | --- | --- | | source | Size | The size of the source container. | | target | Size | The size of the target container. | ---