Returns a new image with a cropped portion of the original image.
Mac Catalyst 13.0+Beta
The rectangle, in image coordinates, to which to crop the image.
An image object cropped to the specified rectangle.
Due to Core Image's coordinate system mismatch with UIKit, this filtering approach may yield unexpected results when displayed in a UIImageView with contentMode. Be sure to back it with a CGImage so that it handles contentMode properly.
If you are displaying or processing your image primarily as a CGImageRef or UIImage, with no additional Core Image application, consider cropping in Core Graphics using the CGImageCreateWithImageInRect function to save processing overhead from conversion of images to CIImage. It makes most sense to use imageByCroppingToRect: when you already have CIImage in your pipeline.
Returns a new image created by inserting a cacheable intermediate.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.