Preparing search index...

    Function clampUpscaleFactor

    • Clamps an upscale factor so the upscaled image stays within MAX_OCR_RETRY_SIDE_PX.

      Parameters

      • scale: number

        Wanted upscale factor

      • image: ImageSize

        Dimensions of the image to upscale

      Returns number | undefined

      The factor to apply, or undefined when the clamped factor no longer enlarges the image