跳轉到主要內容
這個方法會在用戶端實作。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 參數的值納入考量。

備註

方法 的用戶端實作必須確保,在該 方法 內擲出的所有例外狀況都會被攔截並處理,且不會有任何例外狀況傳播到 方法 外部。例外狀況若傳播到 方法 外部,可能會導致不可預期的結果 (例如程式終止) 。

另請參閱

IImageViewerEvents