Enumeration Case


An option that scales an image to fit the input image dimensions while maintaining aspect ratio.


case scaleFit = 1


This option ensures the entire image fits into the Vision algorithm's input image dimensions by scaling down the longer dimension until it fits. This option pads the image along the shorter dimension to maintain aspect ratio.

See Also

Crop and Scale Options

case centerCrop

A scaling option that maintains aspect ratio to fit the short side, and crops the centered image on its long side.

case scaleFill

A scaling option that scales an image proportionally so that its shorter dimension fills the canvas, potentially cropping along the longer dimension.