跳转到主要内容
此方法在客户端实现。ABBYY FineReader Engine 会在更改 Image Viewer 中图像的分辨率之前调用该方法。在以下情况下会调用此过程:
  • 在 Image Editor 对话框的 Image Resolution 部分中单击 Button_CorrectResolution Apply 按钮
  • 在 Image Resolution 对话框中单击 OK 按钮
  • 在 Image Viewer 的 Image Properties 选项卡的 Resolution 字段中指定新的分辨率
该方法会将即将校正分辨率的页面索引以及新的分辨率值传递给客户端。借助此方法,可以取消该操作。 editimage_correctresolution_zoom50

语法

C++

HRESULT OnCorrectResolution(
  IIntsCollection* PageIndices,
  int              NewResolution,
  VARIANT_BOOL*    Cancel
);

C#

void OnCorrectResolution(
  IIntsCollection PageIndices,
  int             NewResolution,
  out bool        Cancel
);

Visual Basic .NET

Sub OnCorrectPerspective( _
  PageIndices As IIntsCollection, _
  NewResolution As Integer, _
  ByRef Cancel As Boolean _
)

参数

PageIndices [in] 包含将要更改分辨率的页面索引,以 IntsCollection 对象的形式表示。 NewResolution [in] 指定新分辨率值。 Cancel [out] 您可以将此变量设置为 TRUE,以指示应终止该过程。在这种情况下,分辨率不会更改。

返回值

[仅限 C++] 如果此方法返回的值不是 S_OK,则表示客户端发生了错误;在这种情况下,将不考虑 Cancel 参数的值。

备注

此 方法 的 client 实现必须确保:在该方法内部抛出的所有异常都会被捕获并得到处理,且不会有任何异常向方法外传播。异常一旦传播到方法外部,可能会导致不可预测的结果 (例如程序终止) 。

另请参见

IImageViewerEvents