Sometimes images come with incorrect resolution. It's important to process images with correct resolution, because:
- Image OCR quality depends on the image physical size (and the physical size depends on its resolution)
- If the image resolution is incorrect, then the physical image size is also incorrect. The physical size might be enlarged for the incorrect resolution pages. 1 license counter unit is used to process 1 A4 page. If the mistaken image is as large as 2 A4 pages, then 2 license counter units will be used for the processing. This may use up all your license counters unexpectedly.
We recommend changing the resolution before it was opened.
If you know in advance, what would be the correct resolution, then please use
PrepareImageMode.OverwriteResolution = true;
PrepareImageMode.yResolutionToOverwrite = Correct_Value;
PrepareImageMode.XResolutionToOverwrite = Correct_Value;
If you don't know the resolution in advance, then please use
PrepareImageMode.AutoOverwriteResolution = true
This way, the new resolution will be used for image preprocessing (i.e. for binarization, deskewing, etc.) unless you process a vector PDF.
Note: The solution above does not work for vector PDFs, only for the raster ones. For vector PDFs, please use the below method instead.
To change the resolution of an image that is already opened, use the ChangeResolution method of the ImageDocument object.
To detect the best resolution from the specified range and change the resolution of the page image accordingly use the CorrectResolution method of the FRPage object.
To change the image resolution and the image size, please use the property of ImageModification.StretchRatio and call ModifyImage() method with this ImageModification.