A list or range of sizes that augment an image constraint's default size.


@interface MLImageSizeConstraint : NSObject


You use an MLImageSizeConstraint to express what image sizes of an image feature a model will accept as input or produce as output.

Use type to determine which properties describe what image sizes the model's image feature expects as input or produces as output.

If type is:

Figure 1

An example of an image size that meets a range-based constraint

Graph diagram showing the constraint's rectangle defined by the width and height ranges of the constraint, and a blue rectangle, representing a valid image size. The diagram's X-axis spans from 0 to 250 pixels and the Y-axis spans from 0 to 200 pixels. The constraint rectangle, which has a dashed outline, has a width that spans from 50 to 250 pixels, and a height that spans from 100 to 200 pixels. The sample image size has its lower-left corner at the graph's origin and its upper-right corner is within the bounds of the constraint rectangle, at 150 pixels wide by 180 pixels high.


Determining Relevant Constraints


Indicator of which properties to inspect for this image size constraint.


The modes that determine how the model defines a feature's image size constraint.

Accessing the Image Size Ranges


The range of widths a model's image feature accepts as input or produces as output.


The range of heights a model's image feature accepts as input or produces as output.

Accessing the Enumerated Image Sizes


An array of image sizes a model's image feature accepts as input or produces as output.


The width and height of an image feature size.


Inherits From

Conforms To

See Also

Inspecting Acceptable Sizes


Additional sizes this image feature supports.