While both properties control whether or not skew correction should be performed for the processed image, there are several important differences between them.
- The IPrepareImageMode::CorrectSkew property determines whether or not skew correction should be performed at image opening (e.g. on an IFRDocument::AddImageFile call)
The IPagePreprocessingParams::CorrectSkew determines whether or not skew correction should be performed during page preprocessing (e.g. on an IFRDocument::Preprocess call).
- The IPrepareImageMode::CorrectSkew property is a boolean value, so it can be either enabled with true or disabled with false.
The IPagePreprocessingParams::CorrectSkew property is of type ThreeStatePropertyValueEnum, so skew correction can be either enabled with TSPV_Yes, disabled with TSPV_No, or managed automatically with TSPV_Auto.
The cause for the value type difference is that by the time IFRDocument::Preprocess is called, the image skew may already have been corrected during image opening. With the TSPV_Auto value FineReader Engine can skip skew correction if it has already been performed earlier, or vice versa – perform it if it has been skipped.
If it is necessary to completely disable skew correction, it should be explicitly disabled via both properties – IPrepareImageMode::CorrectSkew should be set to false and IPagePreprocessingParams::CorrectSkew should be set to TSPV_No.