RFSOutputImageCrop

Objective-C


@interface RFSOutputImageCrop : NSObject

Swift

class OutputImageCrop : NSObject

Crop settings for RFSOutputImageParams.

  • The aspect ratio according to which alignment is performed

    Declaration

    Objective-C

    @property (nonatomic, readonly) RFSOutputImageCropAspectRatio type;

    Swift

    var type: OutputImageCrop.AspectRatio { get }
  • The resize value to process. If the value doesn’t match AspectRatio type proportion or minimum size, an adjustment is applied. Use RFSOutputImageCropAspectRatio.adjustPreferredSize:forType: to check you size matches AspectRatio type proportions and minimum size.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize size;

    Swift

    var size: CGSize { get }
  • When an image is aligned by type, its original size may be insufficient, and in this case it needs to be supplemented, “padded”. padColor sets the value for the color that will be used for such a supplement.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIColor *padColor;

    Swift

    var padColor: UIColor? { get }
  • If set, the coordinates of the rectangle with the face in the original image prepared for the face crop are returned in the RFSDetectFaceResult.originalRect field. Default is NO

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL returnOriginalRect;

    Swift

    var returnOriginalRect: Bool { get }
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    RFS_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    RFS_EMPTY_INIT_UNAVAILABLE
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithType:(RFSOutputImageCropAspectRatio)type
                            size:(CGSize)size
                        padColor:(nullable UIColor *)padcolor
              returnOriginalRect:(BOOL)returnOriginalRect;

    Swift

    init(type: OutputImageCrop.AspectRatio, size: CGSize, padColor padcolor: UIColor?, returnOriginalRect: Bool)
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithType:(RFSOutputImageCropAspectRatio)type;

    Swift

    init(type: OutputImageCrop.AspectRatio)
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithType:(RFSOutputImageCropAspectRatio)type
                            size:(CGSize)size;

    Swift

    init(type: OutputImageCrop.AspectRatio, size: CGSize)
  • Calculates adjusted size for specified AspectRatio type.

    Declaration

    Objective-C

    + (CGSize)adjustPreferredSize:(CGSize)size
                          forType:(RFSOutputImageCropAspectRatio)type;

    Swift

    class func adjustPreferredSize(_ size: CGSize, forType type: OutputImageCrop.AspectRatio) -> CGSize