Image-Related Objects Compatibility with Version 10

This section describes all changes to image-related objects which may require changes in the source code of your applications.

Object/Enumeration Property/Method/Constant What has happened? Comment
Image ImageDocument Removed The property is no longer supported. You can obtain the Image object only via the parent ImageDocument object, if necessary you can store the reference to the parent object by yourself.
WriteToFile The method does not support saving to PDF.

To save an image to PDF format, use the following procedure:

  1. Create the PDFExportParams object using the IEngine::CreatePDFExportParams method.
  2. Set its TextExportMode property to PEM_ImageOnly.
  3. Use these parameters during export to PDF format (e.g., using the IFRDocument::Export method).
GetPicture Renamed

The new name of the method is GetBitmap, which underlines that the method returns bitmap data. The parameters of the method have been changed:

  • This method does not receive as an input parameter the flags for the image color conversion. To obtain a gray bitmap of an image, you can work with the gray image plane of ImageDocument (IImageDocument::GrayImage) and call GetBitmap method for it.
  • The handle to the output bitmap is returned as the Handle object. This object manages memory allocation and allows you to avoid memory leaks while working with resources in memory. It also provides a method for conversion to __int64.
  • The format of the output bitmap has been changed. It now conforms to HBITMAP standard and is the same as input bitmap data for other FineReader Engine methods.
EstimateBitmapSize Input parameters number changed

This method does not receive as an input parameter the flags for the image color conversion.

This method estimates the size of memory that is to be allocated for the bitmap returned from the GetBitmap method called with the same parameters. Thus, its input parameters are analogous to those of GetBitmap.

ImageDocument ConvertCoordinates Removed Use the ConvertCoordinates method of the CoordinatesConverter object. This method works in the same way as the old one, but the new object is more flexible, allowing you to store the information about image modification state separately. Please notice that this method takes into account all the modifications of the image.
DescreenImage Renamed The new name of this method is SmoothTexture. This name reflects the purpose of the method better than the old one.
EvenBrightness Renamed, input parameters number changed

The new name of this method is EqualizeBrightness. This name reflects the purpose of the method better than the old one.

The method takes as an input parameter a Boolean value which specifies whether the background of the image is white. This additional information can help produce a clear, high-contrast image.

RemoveCameraBlur Renamed The new name of this method is RemoveMotionBlur. This name reflects the purpose of the method better than the old one.
SubtractColor Removed Instead use the RemoveColorObjectsEx method, which allows you to remove objects of several specified hues at once, and also receive the image of removed objects.
RemoveGarbage Behavior changed This method still searches for garbage on the black-and-white plane, but removes it from all color planes of the image.
RemoveCameraNoise Removed The method is no longer in use. Use the IImageDocument::RemoveNoise method instead. The new method can remove not only ISO noise, but also strongly correlated noise that can appear on overcompressed JPEG images.
GetPictureFlags Removed This enumeration is no longer in use. The methods that used these flags do not perform the color conversions now.
ImageDocumentsCollection Removed The object is no longer in use. The methods that used this object have been changed or removed. See details for the methods that used this object.
ImageTypeEnum IT_Deskewed Renamed The new name of the constant is IT_Modified. The constant is used to denote any modified image, not only a deskewed image.
PdfExtendedParams Removed The object is no longer in use. To save an image to PDF format, use the export methods with appropriate parameters (PDFExportModeEnum::PEM_ImageOnly).
MemoryImageFormatEnum Removed

Use BitmapBitsFormatEnum instead. The format interpretation has been changed.

Now memory image format is the same for input of methods consuming bitmap data (such as OpenBitmapBits method of the Engine object) and for output of other methods, for example, the GetBitmap method of the Image object. So you do not need to convert from one interpretation to another.

PrepareImageMode CorrectSkewMode Behavior changed The value of this property is ignored, if the IPrepareImageMode::CorrectSkew property is set to FALSE.







Removed These properties are obsolete. Use the IPrepareImageMode::CorrectSkewMode property instead.
ImageCompression Renamed, type changed This property is now called CompressImage and is of the ThreeStatePropertyValueEnum type. The default functions as before.
ImageCompressionEnum Removed The property which used this enumeration now has another type.



Removed Specify width and height of the training image using the ITrainingImage::SetBitmapBits method.
SetImageData Removed

Use the ITrainingImage::SetBitmapBits method instead. This method differs from the old one in the following aspects:

  • The pointer to a memory buffer containing image data is passed as __int64. This change has been made for 64-bit operating systems support.
  • The width and height of the training image are passed as parameters.

You can also use the new ITrainingImage::SetImageData method that allows you to load a training image from an existing image document.





Renamed The new names of the methods are InsertAt, DeleteAt, DeleteAll. Methods of all collections have been renamed to be uniform.
CopyFrom Removed The method is no longer supported. To create a copy of the collection, you can create a new collection using the IEngine::CreateTrainingImagesCollection method and add the same elements to it using the Add method.

3/24/2023 8:51:52 AM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.