We use FREngine10 to make ocr images. I need to resize images when program converts pdf file to tiff. I checked documentation but can't find anything about resizing image. I can change resoulution but i dont change image width and hight

Here is a sample;

IMultipageImageWriter writer = ImageProcessingEngine.FREngine.CreateMultipageImageWriter(convertedFilename, format); FRDocument frDoc = ImageProcessingEngine.FREngine.CreateFRDocumentFromImage(originalFile); try { int pagesCount = frDoc.Pages.Count; int height = 0, width = 0; for (int i = 0; i < pagesCount; i++) { FREngine.Image img = frDoc.Pages[i].ImageDocument.ColorImage; writer.AddPage(img); } } finally { Marshal.ReleaseComObject(writer); writer = null; frDoc.Close(); frDoc = null; if (!saveOriginalFile && File.Exists(originalFile)) { File.Delete(originalFile); } }

asked 11 Jun '15, 10:20

FKucuk's gravatar image


There are two ways to change the prepared image: either using the OverwriteResolution property of the PrepareImageMode object, or using the StretchRatio property of the ImageModification object. Pay your attention that there is the difference between the OverwriteResolution and the StretchRatio properties:

The main property of image for the FREngine is the image size in pixels. The image resolution (in terms of FREngine) determines the physical size (in inch, cm and so on) of the image. So, in case of using the OverwriteResolution property FREngine changes the resolution of image but does not change the quantity of physical pixels. In compare to OverwriteResolution, the StretchRatio property changes both the resolution and the pixels quantity of the image.

Also please see the Help file for your information: API Reference > Image-Related Objects > PrepareImageMode and ImageModification sections correspondingly.

What way is more suitable for you depends on your usage scenario.


answered 16 Jun '15, 13:26

Oksana%20Serdyuk's gravatar image

Oksana Serdyuk ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 11 Jun '15, 10:20

Seen: 1,160 times

Last updated: 28 Nov '15, 19:30

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal