Handling Changing X and Y Coordinates in IronOCR

Why do the X and Y coordinate locations change?

The X and Y coordinates change because images are upscaled when the resolution is determined to be too low for OCR to work effectively. Upscaling ensures that the text can be recognized more accurately by providing a clearer image to the OCR engine.

Details of the upscaling process can be found in the OcrInput.Pages object and also the OcrResult.Pages object. These objects provide metadata and results related to the page processing used during OCR.

You can also export the upscaled images using ContentAreaToBitmap method, which allows you to obtain a bitmap of the OCR content area:

If you wish to disable upscaling to keep the original image resolution, set TargetDPI = 0 for the OcrInput object. This disables the automatic adjustment of DPI, which is otherwise intended to improve OCR quality through resolution enhancement: