Clamps an upscale factor so the upscaled image stays within MAX_OCR_RETRY_SIDE_PX.
Wanted upscale factor
Dimensions of the image to upscale
The factor to apply, or undefined when the clamped factor no longer enlarges the image
Clamps an upscale factor so the upscaled image stays within MAX_OCR_RETRY_SIDE_PX.