AliyunImageCrop
@interface AliyunImageCrop : NSObject
* A class that defines image croppers.
-
* The image to be cropped.
Required.
Declaration
Objective-C
@property (nonatomic, strong) UIImage *originImage;
-
* The image size after cropping.
Required.
Declaration
Objective-C
@property (nonatomic) CGSize outputSize;
-
* The crop mode.
0 indicates fill mode. 1 indicates cut mode.
Declaration
Objective-C
@property (nonatomic) AliyunImageCropMode cropMode;
-
* The crop rectangle.
This property only takes effect when cut mode is selected. For example, if an image has a size of 200 x 200 pixels, the crop rectangle can be set to (0,0,100,100).
Declaration
Objective-C
@property (nonatomic) CGRect cropRect;
-
* The background color.
This property only takes effect when fill mode is selected.
Declaration
Objective-C
@property (nonatomic, strong) UIColor *fillBackgroundColor
-
* Gets the cropped image.
If an error occurred during cropping, nil is returned.
Declaration
Objective-C
- (UIImage *)generateImage;
Return Value
The cropped image.