How to change resolution and/or size of the image

Question

How to change resolution and/or size of the image?

Answer

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. 

If the best resolution is known in advance, then it is possible to change it at the loading step:

PrepareImageMode.OverwriteResolution = true;
PrepareImageMode.XResolutionToOverwrite = Correct_Value;
PrepareImageMode.YResolutionToOverwrite = Correct_Value;

If the best resolution is unknown, then please use the following parameter instead:

PrepareImageMode.AutoOverwriteResolution = true 

With these changes, 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. This suggestion is only relevant if the image resolution was not changed during the loading step.

To modify the image stretch ratio and the image size, please use the property of ImageModification.StretchRatio and call ModifyImage() method with this ImageModification

Have more questions? Submit a request

Comments

1 comment

  • Avatar

    Selvam, Prabu

    Hi Nadezhda Solovyeva

    I am using Flexi Studio 12.0.1.263 version. I am facing this problem.. Due to this resolution issue, this particular vendor invoice always going as unrecognized..  I can manually change the resolution and process it successfully.. But every time we need to do it manually. Is it possible to do it flexi studio itself ?. I read your solution for this problem.. Where exactly, I need to use this solution.. Can you please help me on this ? 

    0

Please sign in to leave a comment.